Commit 7a503864 authored by hjk's avatar hjk

Debugger: Clean up source utils

Change-Id: Ibfe20af9c4c413657b6a238337ff9af661857b3e
Reviewed-by: default avatarhjk <>
parent 3491b1f2
......@@ -52,20 +52,6 @@ void AbstractEditorSupport::updateDocument()
m_modelmanager->updateSourceFiles(QSet<QString>() << fileName());
QString AbstractEditorSupport::functionAt(const CppModelManager *modelManager,
const QString &fileName,
int line, int column)
if (!modelManager)
return QString();
const CPlusPlus::Snapshot snapshot = modelManager->snapshot();
if (const CPlusPlus::Document::Ptr document = snapshot.document(fileName))
return document->functionAt(line, column);
return QString();
QString AbstractEditorSupport::licenseTemplate(const QString &file, const QString &className)
return Internal::CppFileSettings::licenseTemplate(file, className);
......@@ -52,11 +52,6 @@ public:
void updateDocument();
unsigned revision() const { return m_revision; }
// TODO: find a better place for common utility functions
static QString functionAt(const CppModelManager *mm,
const QString &fileName,
int line, int column);
static QString licenseTemplate(const QString &file = QString(), const QString &className = QString());
This diff is collapsed.
......@@ -43,7 +43,7 @@ bool isCppEditor(TextEditor::BaseTextEditorWidget *editorWidget);
QString cppExpressionAt(TextEditor::BaseTextEditorWidget *editorWidget, int pos,
int *line, int *column, QString *function = 0);
QString fixCppExpression(const QString &exp);
QString cppFunctionAt(const QString &fileName, int line);
QString cppFunctionAt(const QString &fileName, int line, int column = 0);
// Get variables that are not initialized at a certain line
// of a function from the code model. Shadowed variables will
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment