236 qHistoryList->setCurrentItem (qHistoryList->item (History::pos () + 1)); |
236 qHistoryList->setCurrentItem (qHistoryList->item (History::pos () + 1)); |
237 } |
237 } |
238 |
238 |
239 // ============================================================================= |
239 // ============================================================================= |
240 void HistoryDialog::slot_clear () { |
240 void HistoryDialog::slot_clear () { |
241 if (QMessageBox::question (this, "Confirm", "Are you sure you want to " |
241 if (!confirm ("Are you sure you want to clear the edit history?\nThis cannot be undone.")) |
242 "clear the edit history?\nThis cannot be undone.", |
242 return; // Canceled |
243 (QMessageBox::Yes | QMessageBox::No), QMessageBox::No) != QMessageBox::Yes) |
|
244 { |
|
245 // Canceled |
|
246 return; |
|
247 } |
|
248 |
243 |
249 History::clear (); |
244 History::clear (); |
250 populateList (); |
245 populateList (); |
251 updateButtons (); |
246 updateButtons (); |
252 } |
247 } |