summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorrobotbrainify <robotbrainify@gmail.com>2013-12-06 17:13:09 -0500
committerrobotbrainify <robotbrainify@gmail.com>2013-12-06 17:13:09 -0500
commite2728317e7b6d6b0301e3ca17becd78d6455107e (patch)
tree81a63ea7b7349c06a45a3970f2f2c825c7ab9ca1 /logic
parent5ad95134dc521d5eeb85cc37e6681b72b8d62c62 (diff)
downloadMultiMC-e2728317e7b6d6b0301e3ca17becd78d6455107e.tar
MultiMC-e2728317e7b6d6b0301e3ca17becd78d6455107e.tar.gz
MultiMC-e2728317e7b6d6b0301e3ca17becd78d6455107e.tar.lz
MultiMC-e2728317e7b6d6b0301e3ca17becd78d6455107e.tar.xz
MultiMC-e2728317e7b6d6b0301e3ca17becd78d6455107e.zip
Fixes to pasting
Diffstat (limited to 'logic')
-rw-r--r--logic/net/PasteUpload.cpp8
-rw-r--r--logic/net/PasteUpload.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/logic/net/PasteUpload.cpp b/logic/net/PasteUpload.cpp
index 9945d85e..efe0e053 100644
--- a/logic/net/PasteUpload.cpp
+++ b/logic/net/PasteUpload.cpp
@@ -52,7 +52,7 @@ void PasteUpload::downloadFinished()
return;
}
QString error;
- if (parseResult(doc, &error))
+ if (!parseResult(doc, &error))
{
emitFailed(error);
return;
@@ -61,7 +61,7 @@ void PasteUpload::downloadFinished()
// else the download failed
else
{
- emitFailed(QString("Network error: %s").arg(m_reply->errorString()));
+ emitFailed(QString("Network error: %1").arg(m_reply->errorString()));
m_reply.reset();
return;
}
@@ -78,7 +78,7 @@ 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 %s").arg(pasteUrl));
+ m_messageBox = CustomMessageBox::selectable(m_window, "Paste upload successful!",
+ QString("Find your paste at %1").arg(pasteUrl));
return true;
}
diff --git a/logic/net/PasteUpload.h b/logic/net/PasteUpload.h
index 27186ba6..3105d6a1 100644
--- a/logic/net/PasteUpload.h
+++ b/logic/net/PasteUpload.h
@@ -6,6 +6,7 @@
class PasteUpload : public Task
{
+ Q_OBJECT
public:
PasteUpload(QWidget *window, QString text);
QMessageBox *messageBox() const