diff --git a/src/widgets/historywidget.cpp b/src/widgets/historywidget.cpp index 866060e5..f5d7f17b 100644 --- a/src/widgets/historywidget.cpp +++ b/src/widgets/historywidget.cpp @@ -96,7 +96,7 @@ void HistoryWidget::addLine(const QString& path, const QString& fileName) History history; HISTORY_FILE_NAME unpackFileName = history.unpackFileName(fileName); - QString url; + QString url = "https://imgur.com/" + unpackFileName.file; // load pixmap QPixmap pixmap; @@ -153,6 +153,16 @@ void HistoryWidget::addLine(const QString& path, const QString& fileName) buttonDelete->setIcon(QIcon(":/img/material/black/delete.svg")); buttonDelete->setMinimumHeight(HISTORYPIXMAP_MAX_PREVIEW_HEIGHT); connect(buttonDelete, &QPushButton::clicked, this, [=]() { + if (ConfigHandler().historyConfirmationToDelete() && + QMessageBox::No == + QMessageBox::question( + this, + tr("Confirm to delete"), + tr("Are you sure you want to delete a screenshot from the " + "latest uploads and server?"), + QMessageBox::Yes | QMessageBox::No)) { + return; + } QDesktopServices::openUrl( QUrl(QStringLiteral("https://imgur.com/delete/%1") .arg(unpackFileName.token)));