summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorrobotbrainify <robotbrainify@gmail.com>2013-12-06 17:17:32 -0500
committerrobotbrainify <robotbrainify@gmail.com>2013-12-06 17:17:32 -0500
commit4548930e34f5bc325c62ac5b6c5a1701ce914683 (patch)
tree8710677546c74962d4d3ea1ee454ff604a17c7bf /logic
parente2728317e7b6d6b0301e3ca17becd78d6455107e (diff)
downloadMultiMC-4548930e34f5bc325c62ac5b6c5a1701ce914683.tar
MultiMC-4548930e34f5bc325c62ac5b6c5a1701ce914683.tar.gz
MultiMC-4548930e34f5bc325c62ac5b6c5a1701ce914683.tar.lz
MultiMC-4548930e34f5bc325c62ac5b6c5a1701ce914683.tar.xz
MultiMC-4548930e34f5bc325c62ac5b6c5a1701ce914683.zip
Open the url direectly.
Diffstat (limited to 'logic')
-rw-r--r--logic/net/PasteUpload.cpp4
-rw-r--r--logic/net/PasteUpload.h5
2 files changed, 2 insertions, 7 deletions
diff --git a/logic/net/PasteUpload.cpp b/logic/net/PasteUpload.cpp
index efe0e053..acf09291 100644
--- a/logic/net/PasteUpload.cpp
+++ b/logic/net/PasteUpload.cpp
@@ -4,6 +4,7 @@
#include <QJsonObject>
#include <QJsonDocument>
#include "gui/dialogs/CustomMessageBox.h"
+#include <QDesktopServices>
PasteUpload::PasteUpload(QWidget *window, QString text) : m_text(text), m_window(window)
{
@@ -78,7 +79,6 @@ bool PasteUpload::parseResult(QJsonDocument doc, QString *parseError)
return false;
}
QString pasteUrl = object.value("paste").toObject().value("link").toString();
- m_messageBox = CustomMessageBox::selectable(m_window, "Paste upload successful!",
- QString("Find your paste at %1").arg(pasteUrl));
+ QDesktopServices::openUrl(pasteUrl);
return true;
}
diff --git a/logic/net/PasteUpload.h b/logic/net/PasteUpload.h
index 3105d6a1..917a0016 100644
--- a/logic/net/PasteUpload.h
+++ b/logic/net/PasteUpload.h
@@ -9,10 +9,6 @@ class PasteUpload : public Task
Q_OBJECT
public:
PasteUpload(QWidget *window, QString text);
- QMessageBox *messageBox() const
- {
- return m_messageBox;
- }
protected:
virtual void executeTask();
@@ -22,7 +18,6 @@ private:
QString m_text;
QString m_error;
QWidget *m_window;
- QMessageBox *m_messageBox;
std::shared_ptr<QNetworkReply> m_reply;
public
slots: