summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-02-14 09:14:04 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2008-02-14 09:14:04 -0500
commite4a1823f4356685202f7bbe988e9b5c8062436d3 (patch)
tree9807159829fb125f6de6c39a3e755b0dbaee455a
parent116f61c75cc2d5a26b08fe3341ed6711ecea4c72 (diff)
downloadcmake-e4a1823f4356685202f7bbe988e9b5c8062436d3.tar.gz
ENH: add a check before delete cache
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index bd696c8852..7b61cf8342 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -543,9 +543,18 @@ void CMakeSetupDialog::doReloadCache()
}
void CMakeSetupDialog::doDeleteCache()
-{
+{
+ QString title = tr("Delete Cache");
+ QString message = "Are you sure you want to delete the cache?";
+ QMessageBox::StandardButton btn;
+ btn = QMessageBox::information(this, title, message,
+ QMessageBox::Yes | QMessageBox::No);
+ if(btn == QMessageBox::No)
+ {
+ return;
+ }
QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
- "deleteCache", Qt::QueuedConnection);
+ "deleteCache", Qt::QueuedConnection);
}
void CMakeSetupDialog::doAbout()