diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-07-19 17:48:57 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-07-21 12:27:43 +0200 |
commit | 51a9ff7d4ead754838b675c3184ea7f56e0eb2fe (patch) | |
tree | 0ce64c9114246f94f1a42cc2edc81022ca918af9 /src/plugins/qtsupport/qtoutputformatter.cpp | |
parent | ebf4212f71a2a58fd7aaa1abc246c873e41a3b91 (diff) |
Qml Tooling: Fix debugging & profiling of .qml files loaded from resources
Don't expect that every url specifying a file is a local file url. Instead
let FileInProjectFinder handle urls with other schemes gracefully, too.
Change-Id: I72457d502ff1caf52f588e8ec41ab260882d1cf5
Reviewed-on: http://codereview.qt.nokia.com/1840
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Diffstat (limited to 'src/plugins/qtsupport/qtoutputformatter.cpp')
-rw-r--r-- | src/plugins/qtsupport/qtoutputformatter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp index 036521ac529..6d75f159096 100644 --- a/src/plugins/qtsupport/qtoutputformatter.cpp +++ b/src/plugins/qtsupport/qtoutputformatter.cpp @@ -196,11 +196,11 @@ void QtOutputFormatter::handleLink(const QString &href) ":(\\d+)$")); // column if (qmlLineColumnLink.indexIn(href) != -1) { - const QString fileName = QUrl(qmlLineColumnLink.cap(1)).toLocalFile(); + const QUrl fileUrl = QUrl(qmlLineColumnLink.cap(1)); const int line = qmlLineColumnLink.cap(2).toInt(); const int column = qmlLineColumnLink.cap(3).toInt(); - TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileName), line, column - 1); + TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileUrl), line, column - 1); return; } @@ -209,9 +209,9 @@ void QtOutputFormatter::handleLink(const QString &href) ":(\\d+)$")); // line if (qmlLineLink.indexIn(href) != -1) { - const QString fileName = QUrl(qmlLineLink.cap(1)).toLocalFile(); + const QUrl fileUrl = QUrl(qmlLineLink.cap(1)); const int line = qmlLineLink.cap(2).toInt(); - TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileName), line); + TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileUrl), line); return; } @@ -253,7 +253,7 @@ void QtOutputFormatter::handleLink(const QString &href) } } else if (!fi.exists()) { // map possible on-device path to source path - fileName = m_projectFinder.findFile(fileName); + fileName = m_projectFinder.findFile(QUrl::fromLocalFile(fileName)); } TextEditor::BaseTextEditorWidget::openEditorAt(fileName, line, 0); return; |