diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-14 14:14:04 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-14 14:14:04 (GMT) |
commit | e4a1823f4356685202f7bbe988e9b5c8062436d3 (patch) | |
tree | 9807159829fb125f6de6c39a3e755b0dbaee455a | |
parent | 116f61c75cc2d5a26b08fe3341ed6711ecea4c72 (diff) | |
download | CMake-e4a1823f4356685202f7bbe988e9b5c8062436d3.zip CMake-e4a1823f4356685202f7bbe988e9b5c8062436d3.tar.gz CMake-e4a1823f4356685202f7bbe988e9b5c8062436d3.tar.bz2 |
ENH: add a check before delete cache
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index bd696c8..7b61cf8 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() |