void EditorTabWidget::markExecutionPoint(const QString& filePath, int line) { KTextEditor::MarkInterface* imark = documentMarkIf(filePath); if(!imark) return; #if (KDE_VERSION_MAJOR >= 3) && (KDE_VERSION_MINOR >= 3) imark->addMark(line-1, KTextEditor::MarkInterface::Execution); #else imark->addMark(line-1, KTextEditor::MarkInterface::markType05); #endif }
void EditorTabWidget::markDisabledBreakpoint(const QString& filePath, int line) { KTextEditor::MarkInterface* imark = documentMarkIf(filePath); m_markGuard = true; if(!imark) return; #if (KDE_VERSION_MAJOR >= 3) && (KDE_VERSION_MINOR >= 3) imark->addMark(line-1, KTextEditor::MarkInterface::BreakpointDisabled); #else imark->addMark(line-1, KTextEditor::MarkInterface::markType04); #endif m_markGuard = false; }
// Set/clear a mark in a document void DebuggerManager::setMark(const QString& filename, long line, bool set, int mark) { if((!filename.isEmpty()) && ViewManager::ref()->isOpened(filename)) { ::Document* qdoc = ViewManager::ref()->isOpened(filename)->document(); if(qdoc) { disconnectBreakpointSignals(qdoc); KTextEditor::Document* doc = qdoc->doc(); if(doc) { KTextEditor::MarkInterface *markIf = dynamic_cast<KTextEditor::MarkInterface*>(doc); if(markIf) { if(set) markIf->addMark(line, mark); else markIf->removeMark(line, mark); } } connectBreakpointSignals(qdoc); } } }
void EditorTabWidget::markPreExecutionPoint(const QString& filePath, int line) { KTextEditor::MarkInterface* imark = documentMarkIf(filePath); if(!imark) return; imark->addMark(line-1, KTextEditor::MarkInterface::markType08); }