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
This commit is contained in:
parent
d1e344f28f
commit
4d0caf6254
19 changed files with 235 additions and 72 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
// FIXME: mixing logic and UI!!!!
|
||||
#include <QInputDialog>
|
||||
|
@ -11,6 +10,7 @@
|
|||
#include "settings/SettingsObject.h"
|
||||
#include "BaseInstance.h"
|
||||
#include "minecraft/MinecraftInstance.h"
|
||||
#include <DesktopServices.h>
|
||||
|
||||
MCEditTool::MCEditTool(SettingsObjectPtr settings, InstancePtr instance, QObject *parent)
|
||||
: BaseDetachedTool(settings, instance, parent)
|
||||
|
@ -84,7 +84,7 @@ void MCEditTool::runImpl()
|
|||
#endif
|
||||
if(program.size())
|
||||
{
|
||||
QProcess::startDetached(program, QStringList() << save, mceditPath);
|
||||
DesktopServices::openFile(program, save, mceditPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue