Ejemplo n.º 1
0
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
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
// 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);
    }
  }
}
Ejemplo n.º 4
0
void EditorTabWidget::markPreExecutionPoint(const QString& filePath, int line)
{
  KTextEditor::MarkInterface* imark = documentMarkIf(filePath);
  if(!imark) return;
  imark->addMark(line-1, KTextEditor::MarkInterface::markType08);
}