From 4d0caf6254fdb18f4626a3c7937e64422b40d40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 5 Jan 2016 07:32:52 +0100 Subject: GH-1389 wrap QDesktopServices and QProcess::startDetached Essentially do not pass some environment variables to subprocesses: * LD_PRELOAD * LD_LIBRARY_PATH * LD_DEBUG * QT_PLUGIN_PATH * QT_FONTPATH --- logic/FileSystem.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'logic/FileSystem.cpp') diff --git a/logic/FileSystem.cpp b/logic/FileSystem.cpp index 006356b3..049f1e38 100644 --- a/logic/FileSystem.cpp +++ b/logic/FileSystem.cpp @@ -6,8 +6,8 @@ #include #include #include -#include #include +#include namespace FS { @@ -304,22 +304,6 @@ QString DirNameFromString(QString string, QString inDir) return dirName; } -void openDirInDefaultProgram(QString path, bool ensureExists) -{ - QDir parentPath; - QDir dir(path); - if (!dir.exists()) - { - parentPath.mkpath(dir.absolutePath()); - } - QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); -} - -void openFileInDefaultProgram(QString filename) -{ - QDesktopServices::openUrl(QUrl::fromLocalFile(filename)); -} - // Does the directory path contain any '!'? If yes, return true, otherwise false. // (This is a problem for Java) bool checkProblemticPathJava(QDir folder) @@ -449,4 +433,4 @@ bool createShortCut(QString location, QString dest, QStringList args, QString na return false; #endif } -} \ No newline at end of file +} -- cgit v1.2.3