Add option to auto copy URL after upload (#553)
This commit is contained in:
@@ -77,7 +77,13 @@ void ImgurUploader::handleReply(QNetworkReply *reply) {
|
||||
m_imageURL.setUrl(data[QStringLiteral("link")].toString());
|
||||
m_deleteImageURL.setUrl(QStringLiteral("https://imgur.com/delete/%1").arg(
|
||||
data[QStringLiteral("deletehash")].toString()));
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user