From 8b952b387041341f556edcf0bb34576a2fc88568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 6 Nov 2016 21:58:54 +0100 Subject: NOISSUE Refactor and sanitize MultiMC startup/shutdown * Always create main window. * Properly handle netowrk manager - it was created twice, leading to potential crashes. --- api/logic/net/PasteUpload.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api/logic/net/PasteUpload.cpp') diff --git a/api/logic/net/PasteUpload.cpp b/api/logic/net/PasteUpload.cpp index 4b671d6f..a03a4c64 100644 --- a/api/logic/net/PasteUpload.cpp +++ b/api/logic/net/PasteUpload.cpp @@ -36,8 +36,7 @@ void PasteUpload::executeTask() request.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); request.setRawHeader("Content-Length", QByteArray::number(m_text.size())); - auto worker = ENV.qnam(); - QNetworkReply *rep = worker->post(request, buf); + QNetworkReply *rep = ENV.qnam().post(request, buf); m_reply = std::shared_ptr(rep); setStatus(tr("Uploading to paste.ee")); -- cgit v1.2.3