From d934e6483190d7d173051380c62bc040911b42cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 7 Jul 2014 00:02:04 +0200 Subject: Tweak the response to successful uploads (screenshots, log pastes) The url will now be shown as link, put into the clipboard AND opened in a browser. At the same time. To avoid losing the URL. --- logic/net/PasteUpload.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'logic/net/PasteUpload.cpp') diff --git a/logic/net/PasteUpload.cpp b/logic/net/PasteUpload.cpp index ec0b2c60..ccd7dc48 100644 --- a/logic/net/PasteUpload.cpp +++ b/logic/net/PasteUpload.cpp @@ -77,9 +77,8 @@ bool PasteUpload::parseResult(QJsonDocument doc) QLOG_ERROR() << "paste.ee reported error:" << QString(object.value("error").toString()); return false; } - // FIXME: not the place for GUI things. - QString pasteUrl = object.value("paste").toObject().value("link").toString(); - QDesktopServices::openUrl(pasteUrl); + m_pasteLink = object.value("paste").toObject().value("link").toString(); + m_pasteID = object.value("paste").toObject().value("id").toString(); return true; } -- cgit v1.2.3