aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/editormanager/systemeditor.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-05-25 07:05:32 +0200
committerhjk <hjk@qt.io>2021-05-28 09:13:23 +0000
commit2ccf5e2795df1b10a958c5413b82140568da67fb (patch)
tree4adc6ac2f8e3bdf4c80ed9fc13b215d848473722 /src/plugins/coreplugin/editormanager/systemeditor.cpp
parentce04dcdcf2f85e417e1d3aaad61b95eaccae401d (diff)
Core: Use FilePath in ExternalEditor interface
Change-Id: If3360eb7db9cec373551c2eb0fcffaf3bc5460e6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/editormanager/systemeditor.cpp')
-rw-r--r--src/plugins/coreplugin/editormanager/systemeditor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/editormanager/systemeditor.cpp b/src/plugins/coreplugin/editormanager/systemeditor.cpp
index c8ccd88ca7e..30840881006 100644
--- a/src/plugins/coreplugin/editormanager/systemeditor.cpp
+++ b/src/plugins/coreplugin/editormanager/systemeditor.cpp
@@ -25,6 +25,8 @@
#include "systemeditor.h"
+#include <utils/fileutils.h>
+
#include <QStringList>
#include <QUrl>
#include <QDesktopServices>
@@ -53,11 +55,11 @@ QString SystemEditor::displayName() const
return tr("System Editor");
}
-bool SystemEditor::startEditor(const QString &fileName, QString *errorMessage)
+bool SystemEditor::startEditor(const FilePath &filePath, QString *errorMessage)
{
Q_UNUSED(errorMessage)
QUrl url;
- url.setPath(fileName);
+ url.setPath(filePath.toString());
url.setScheme(QLatin1String("file"));
if (!QDesktopServices::openUrl(url)) {
if (errorMessage)