NOISSUE Refactor and sanitize MultiMC startup/shutdown
* Always create main window. * Properly handle netowrk manager - it was created twice, leading to potential crashes.
This commit is contained in:
parent
37cc59c04d
commit
8b952b3870
17 changed files with 116 additions and 144 deletions
|
@ -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<QNetworkReply>(rep);
|
||||
setStatus(tr("Uploading to paste.ee"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue