fix - Copy URL after upload doesn't work

This commit is contained in:
Yuriy Puchkov
2021-02-17 17:45:38 +02:00
parent 8110970d8e
commit abba420186

View File

@@ -108,8 +108,14 @@ void ImgurUploader::handleReply(QNetworkReply* reply)
imageName = history.packFileName("imgur", deleteToken, imageName);
history.save(m_pixmap, imageName);
onUploadOk();
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
QApplication::clipboard()->setText(m_imageURL.toString());
SystemNotification().sendMessage(
QObject::tr("URL copied to clipboard."));
close();
} else {
onUploadOk();
}
} else {
m_infoLabel->setText(reply->errorString());
}