summaryrefslogtreecommitdiffstats
path: root/application/pages/WorldListPage.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 /application/pages/WorldListPage.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 'application/pages/WorldListPage.cpp')
-rw-r--r--application/pages/WorldListPage.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/application/pages/WorldListPage.cpp b/application/pages/WorldListPage.cpp
index 4e7eeedc..befb6b5e 100644
--- a/application/pages/WorldListPage.cpp
+++ b/application/pages/WorldListPage.cpp
@@ -16,7 +16,7 @@
#include "WorldListPage.h"
#include "ui_WorldListPage.h"
#include "minecraft/WorldList.h"
-#include <FileSystem.h>
+#include <DesktopServices.h>
#include "dialogs/ModEditDialogCommon.h"
#include <QEvent>
#include <QKeyEvent>
@@ -123,7 +123,7 @@ void WorldListPage::on_rmWorldBtn_clicked()
void WorldListPage::on_viewFolderBtn_clicked()
{
- FS::openDirInDefaultProgram(m_worlds->dir().absolutePath(), true);
+ DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
}
QModelIndex WorldListPage::getSelectedWorld()
@@ -193,7 +193,8 @@ void WorldListPage::on_mcEditBtn_clicked()
if(program.size())
{
qint64 pid = 0;
- QProcess::startDetached(program, QStringList() << fullPath, mceditPath, &pid);
+
+ DesktopServices::openFile(program, fullPath, mceditPath, &pid);
if(pid == 0)
{
QMessageBox::warning(this->parentWidget(), tr("MCEdit failed to start!"), tr("MCEdit failed to start.\nIt may be necessary to reinstall it."));