summaryrefslogtreecommitdiffstats
path: root/logic/FileSystem.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-01-05 07:32:52 +0100
committerPetr Mrázek <peterix@gmail.com>2016-01-05 07:32:52 +0100
commit4d0caf6254fdb18f4626a3c7937e64422b40d40c (patch)
tree76b037c8f6b6c73f8438b85e8e05a2f59da89c17 /logic/FileSystem.cpp
parentd1e344f28f643c9fb0318feea0259be8ac72c8f7 (diff)
downloadMultiMC-4d0caf6254fdb18f4626a3c7937e64422b40d40c.tar
MultiMC-4d0caf6254fdb18f4626a3c7937e64422b40d40c.tar.gz
MultiMC-4d0caf6254fdb18f4626a3c7937e64422b40d40c.tar.lz
MultiMC-4d0caf6254fdb18f4626a3c7937e64422b40d40c.tar.xz
MultiMC-4d0caf6254fdb18f4626a3c7937e64422b40d40c.zip
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
Diffstat (limited to 'logic/FileSystem.cpp')
-rw-r--r--logic/FileSystem.cpp20
1 files changed, 2 insertions, 18 deletions
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 <QSaveFile>
#include <QFileInfo>
#include <QDebug>
-#include <QDesktopServices>
#include <QUrl>
+#include <QStandardPaths>
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
+}