mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
Ask for confirmation before clearing search history (closes #598605)
This commit is contained in:
parent
ca762139f6
commit
7f12bb5dfb
1 changed files with 5 additions and 1 deletions
|
@ -221,7 +221,11 @@ void SearchEngine::displayPatternContextMenu(QPoint) {
|
|||
QAction *act = myMenu.exec(QCursor::pos());
|
||||
if(act != 0) {
|
||||
if(act == &clearHistoryAct) {
|
||||
searchHistory.setStringList(QStringList());
|
||||
// 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();
|
||||
|
|
Loading…
Reference in a new issue