mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Ask for confirmation before clearing search history (closes #598605)
This commit is contained in:
@@ -221,8 +221,12 @@ void SearchEngine::displayPatternContextMenu(QPoint) {
|
||||
QAction *act = myMenu.exec(QCursor::pos());
|
||||
if(act != 0) {
|
||||
if(act == &clearHistoryAct) {
|
||||
// Ask for confirmation
|
||||
if(QMessageBox::question(this, tr("Confirmation"), tr("Are you sure you want to clear the history?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
|
||||
// Clear history
|
||||
searchHistory.setStringList(QStringList());
|
||||
}
|
||||
}
|
||||
else if (act == &pasteAct) {
|
||||
search_pattern->paste();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user