fix issue 9346. add binary directory to window title to make it easier to deal with multiple cmake-gui instances

This commit is contained in:
Clinton Stimpson 2009-09-22 18:29:35 -04:00
parent 694338d566
commit ecfca5d0a8
2 changed files with 9 additions and 3 deletions

View File

@ -151,9 +151,6 @@ int main(int argc, char** argv)
app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png"));
CMakeSetupDialog dialog;
QString title = QString("CMake %1");
title = title.arg(cmVersion::GetCMakeVersion());
dialog.setWindowTitle(title);
dialog.show();
cmsys::CommandLineArguments arg;

View File

@ -62,6 +62,10 @@ void QCMakeThread::run()
CMakeSetupDialog::CMakeSetupDialog()
: ExitAfterGenerate(true), CacheModified(false), CurrentState(Interrupting)
{
QString title = QString(tr("CMake %1"));
title = title.arg(cmVersion::GetCMakeVersion());
this->setWindowTitle(title);
// create the GUI
QSettings settings;
settings.beginGroup("Settings/StartPath");
@ -513,6 +517,11 @@ void CMakeSetupDialog::onSourceDirectoryChanged(const QString& dir)
void CMakeSetupDialog::onBinaryDirectoryChanged(const QString& dir)
{
QString title = QString(tr("CMake %1 - %2"));
title = title.arg(cmVersion::GetCMakeVersion());
title = title.arg(dir);
this->setWindowTitle(title);
this->CacheModified = false;
this->CacheValues->cacheModel()->clear();
qobject_cast<QCMakeCacheModelDelegate*>(this->CacheValues->itemDelegate())->clearChanges();