aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerengine.cpp
diff options
context:
space:
mode:
authorAurindam Jana <[email protected]>2012-02-22 11:50:05 +0100
committerAurindam Jana <[email protected]>2012-02-27 11:01:13 +0100
commita167498ea1884fce716e2196cd37251c321f829b (patch)
tree37d720072850490563727ac978467b81920925fd /src/plugins/debugger/debuggerengine.cpp
parentd75d70c5520fb7ecbe3fdb6911eecb5ad0eb2061 (diff)
ScriptConsole: Show File and Line Info
Show File and Line Info for items that have the info. Clicking on the item opens the file and sets the cursor position on the line. The context menu also provides option to copy contents and option to clear the view. Change-Id: I161de392ba35e37d323b049371619b01c617c798 Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerengine.cpp')
-rw-r--r--src/plugins/debugger/debuggerengine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index ccd03eb75c3..36ce8e53456 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -66,6 +66,7 @@
#include <utils/savedaction.h>
#include <utils/qtcassert.h>
+#include <utils/fileinprojectfinder.h>
#include <QDebug>
#include <QTimer>
@@ -312,6 +313,7 @@ public:
bool m_isStateDebugging;
+ Utils::FileInProjectFinder m_fileFinder;
// Testing
void handleAutoTests();
void handleAutoTestLine(int line);
@@ -1282,6 +1284,16 @@ DebuggerLanguages DebuggerEngine::languages() const
return d->m_languages;
}
+QString DebuggerEngine::toFileInProject(const QUrl &fileUrl)
+{
+ // make sure file finder is properly initialized
+ d->m_fileFinder.setProjectDirectory(startParameters().projectSourceDirectory);
+ d->m_fileFinder.setProjectFiles(startParameters().projectSourceFiles);
+ d->m_fileFinder.setSysroot(startParameters().sysroot);
+
+ return d->m_fileFinder.findFile(fileUrl);
+}
+
bool DebuggerEngine::debuggerActionsEnabled() const
{
return debuggerActionsEnabled(d->m_state);