summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMakeCacheView.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2010-12-18 02:04:57 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2010-12-18 02:04:57 (GMT)
commit3f158c6dfab7420696498ed4386761d847b6e943 (patch)
treefacc533c1bbc7a4ead03f95cf93c5a933ac57882 /Source/QtDialog/QCMakeCacheView.cxx
parentd11c70295b072d19c90c3e5d415d27de10253615 (diff)
downloadCMake-3f158c6dfab7420696498ed4386761d847b6e943.zip
CMake-3f158c6dfab7420696498ed4386761d847b6e943.tar.gz
CMake-3f158c6dfab7420696498ed4386761d847b6e943.tar.bz2
cmake-gui: always enable generate button.
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx28
1 files changed, 21 insertions, 7 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index d90307a..562396d 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -200,6 +200,7 @@ QCMakeCacheModel::QCMakeCacheModel(QObject* p)
NewPropertyCount(0),
View(FlatView)
{
+ this->ShowNewProperties = true;
QStringList labels;
labels << tr("Name") << tr("Value");
this->setHorizontalHeaderLabels(labels);
@@ -214,6 +215,11 @@ static uint qHash(const QCMakeProperty& p)
return qHash(p.Key);
}
+void QCMakeCacheModel::setShowNewProperties(bool f)
+{
+ this->ShowNewProperties = f;
+}
+
void QCMakeCacheModel::clear()
{
this->QStandardItemModel::clear();
@@ -226,13 +232,21 @@ void QCMakeCacheModel::clear()
void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
{
- QSet<QCMakeProperty> newProps = props.toSet();
- QSet<QCMakeProperty> newProps2 = newProps;
- QSet<QCMakeProperty> oldProps = this->properties().toSet();
-
- oldProps.intersect(newProps);
- newProps.subtract(oldProps);
- newProps2.subtract(newProps);
+ QSet<QCMakeProperty> newProps, newProps2;
+
+ if(this->ShowNewProperties)
+ {
+ newProps = props.toSet();
+ newProps2 = newProps;
+ QSet<QCMakeProperty> oldProps = this->properties().toSet();
+ oldProps.intersect(newProps);
+ newProps.subtract(oldProps);
+ newProps2.subtract(newProps);
+ }
+ else
+ {
+ newProps2 = props.toSet();
+ }
bool b = this->blockSignals(true);