fixed race condition between notifcation and clipboard (cherry-pick with manual fix)

This commit is contained in:
Yuriy Puchkov
2020-10-27 16:52:26 +02:00
parent 2bae14416e
commit f9f396bd69
2 changed files with 2 additions and 2 deletions

View File

@@ -79,10 +79,10 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
resultStatus = true;
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(
QObject::tr("URL copied to clipboard."));
Controller::getInstance()->updateRecentScreenshots();
QApplication::clipboard()->setText(imageUrl().toString());
close();
} else {
onUploadOk();

View File

@@ -198,9 +198,9 @@ void ImgS3Uploader::handleReplyUpload(QNetworkReply* reply)
// Copy url to clipboard if required
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
QApplication::clipboard()->setText(imageUrl().toString());
SystemNotification().sendMessage(tr("URL copied to clipboard."));
Controller::getInstance()->updateRecentScreenshots();
QApplication::clipboard()->setText(imageUrl().toString());
close();
} else {
onUploadOk();