summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMake.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2007-11-03 23:48:59 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2007-11-03 23:48:59 (GMT)
commit8770969464008b9f1ceb04bb7ea5784cd2000a9f (patch)
treee9456eb4d045fbff8ba4a5f6774a9a6bae532ee4 /Source/QtDialog/QCMake.cxx
parent3135561227dc7ee9980e5badc1fae1e86e672a44 (diff)
downloadCMake-8770969464008b9f1ceb04bb7ea5784cd2000a9f.zip
CMake-8770969464008b9f1ceb04bb7ea5784cd2000a9f.tar.gz
CMake-8770969464008b9f1ceb04bb7ea5784cd2000a9f.tar.bz2
ENH: Allow working with empty build directories.
Make output window a bit smaller compared to cache view. Prompt on X'ing window as well as hitting cancel. Color new cache values red, and put them first.
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r--Source/QtDialog/QCMake.cxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index a81d6af..495d404 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -61,21 +61,27 @@ void QCMake::loadCache(const QString& dir)
void QCMake::setSourceDirectory(const QString& dir)
{
- this->SourceDirectory = dir;
- emit this->sourceDirChanged(dir);
+ if(this->SourceDirectory != dir)
+ {
+ this->SourceDirectory = dir;
+ emit this->sourceDirChanged(dir);
+ }
}
void QCMake::setBinaryDirectory(const QString& dir)
{
- cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
- this->BinaryDirectory = dir;
- this->CMakeInstance->GetCacheManager()->LoadCache(dir.toLocal8Bit().data());
- QCMakeCachePropertyList props = this->properties();
- emit this->propertiesChanged(props);
- cmCacheManager::CacheIterator itm = cachem->NewIterator();
- if ( itm.Find("CMAKE_HOME_DIRECTORY"))
+ if(this->BinaryDirectory != dir)
{
- setSourceDirectory(itm.GetValue());
+ cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
+ this->BinaryDirectory = dir;
+ this->CMakeInstance->GetCacheManager()->LoadCache(dir.toLocal8Bit().data());
+ QCMakeCachePropertyList props = this->properties();
+ emit this->propertiesChanged(props);
+ cmCacheManager::CacheIterator itm = cachem->NewIterator();
+ if ( itm.Find("CMAKE_HOME_DIRECTORY"))
+ {
+ setSourceDirectory(itm.GetValue());
+ }
}
}