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:
Petr Mrázek 2016-01-05 07:32:52 +01:00
parent d1e344f28f
commit 4d0caf6254
19 changed files with 235 additions and 72 deletions

View file

@ -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
}
}
}