diff options
author | robotbrainify <robotbrainify@gmail.com> | 2013-12-06 17:17:32 -0500 |
---|---|---|
committer | robotbrainify <robotbrainify@gmail.com> | 2013-12-06 17:17:32 -0500 |
commit | 4548930e34f5bc325c62ac5b6c5a1701ce914683 (patch) | |
tree | 8710677546c74962d4d3ea1ee454ff604a17c7bf /logic | |
parent | e2728317e7b6d6b0301e3ca17becd78d6455107e (diff) | |
download | MultiMC-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.cpp | 4 | ||||
-rw-r--r-- | logic/net/PasteUpload.h | 5 |
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: |