[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] addons/katebuild-plugin: avoid that files are opened duplicated, we want canonical names, if
From: Christoph Cullmann <cullmann () kde ! org>
Date: 2016-09-30 8:07:59
Message-ID: E1bpsrP-0001WB-Gx () code ! kde ! org
[Download RAW message or body]
Git commit cdd89582a7c22fdbb8709a0047f324df79e10684 by Christoph Cullmann.
Committed on 30/09/2016 at 08:07.
Pushed by cullmann into branch 'master'.
avoid that files are opened duplicated, we want canonical names, if possible
M +7 -2 addons/katebuild-plugin/plugin_katebuild.cpp
http://commits.kde.org/kate/cdd89582a7c22fdbb8709a0047f324df79e10684
diff --git a/addons/katebuild-plugin/plugin_katebuild.cpp b/addons/katebuild-plugin/plugin_katebuild.cpp
index 86f9303..c6a7471 100644
--- a/addons/katebuild-plugin/plugin_katebuild.cpp
+++ b/addons/katebuild-plugin/plugin_katebuild.cpp
@@ -370,7 +370,7 @@ void KateBuildView::slotErrorSelected(QTreeWidgetItem *item)
const int column = item->data(2, Qt::UserRole).toInt();
// open file (if needed, otherwise, this will activate only the right view...)
- m_win->openUrl(QUrl::fromUserInput(filename));
+ m_win->openUrl(QUrl::fromLocalFile(filename));
// any view active?
if (!m_win->activeView()) {
@@ -828,9 +828,14 @@ void KateBuildView::processLine(const QString &line)
filename = m_make_dir + QLatin1Char('/') + filename;
}
+ // get canonical path, if possible, to avoid duplicated opened files
+ auto canonicalFilePath(QFileInfo(filename).canonicalFilePath());
+ if (!canonicalFilePath.isEmpty()) {
+ filename = canonicalFilePath;
+ }
+
// Now we have the data we need show the error/warning
addError(filename, line_n, QString(), msg);
-
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic