ENH: add a check before delete cache

This commit is contained in:
Bill Hoffman 2008-02-14 09:14:04 -05:00
parent 116f61c75c
commit e4a1823f43
1 changed files with 11 additions and 2 deletions

View File

@ -544,8 +544,17 @@ void CMakeSetupDialog::doReloadCache()
void CMakeSetupDialog::doDeleteCache() 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(), QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
"deleteCache", Qt::QueuedConnection); "deleteCache", Qt::QueuedConnection);
} }
void CMakeSetupDialog::doAbout() void CMakeSetupDialog::doAbout()