summaryrefslogtreecommitdiffstats
path: root/application/pages/ScreenshotsPage.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/ScreenshotsPage.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/ScreenshotsPage.cpp')
-rw-r--r--application/pages/ScreenshotsPage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/application/pages/ScreenshotsPage.cpp b/application/pages/ScreenshotsPage.cpp
index 2b2fe31f..5b406f3d 100644
--- a/application/pages/ScreenshotsPage.cpp
+++ b/application/pages/ScreenshotsPage.cpp
@@ -12,7 +12,6 @@
#include <QEvent>
#include <QPainter>
#include <QClipboard>
-#include <QDesktopServices>
#include <QKeyEvent>
#include <MultiMC.h>
@@ -26,6 +25,7 @@
#include "RWStorage.h"
#include <FileSystem.h>
+#include <DesktopServices.h>
typedef RWStorage<QString, QIcon> SharedIconCache;
typedef std::shared_ptr<SharedIconCache> SharedIconCachePtr;
@@ -271,12 +271,12 @@ void ScreenshotsPage::onItemActivated(QModelIndex index)
return;
auto info = m_model->fileInfo(index);
QString fileName = info.absoluteFilePath();
- FS::openFileInDefaultProgram(info.absoluteFilePath());
+ DesktopServices::openFile(info.absoluteFilePath());
}
void ScreenshotsPage::on_viewFolderBtn_clicked()
{
- FS::openDirInDefaultProgram(m_folder, true);
+ DesktopServices::openDirectory(m_folder, true);
}
void ScreenshotsPage::on_uploadBtn_clicked()
@@ -312,7 +312,7 @@ void ScreenshotsPage::on_uploadBtn_clicked()
auto link = QString("https://imgur.com/a/%1").arg(imgurAlbum->id());
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(link);
- QDesktopServices::openUrl(link);
+ DesktopServices::openUrl(link);
CustomMessageBox::selectable(
this, tr("Upload finished"),
tr("The <a href=\"%1\">link to the uploaded album</a> has been opened in the "