fixed race condition between notifcation and clipboard (cherry-pick with manual fix)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user