diff options
Diffstat (limited to 'Source/QtDialog/QCMakeCacheView.cxx')
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 729b9d8..4bb160e 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -207,7 +207,7 @@ void QCMakeCacheView::setSearchFilter(const QString& s) QCMakeCacheModel::QCMakeCacheModel(QObject* p) : QAbstractTableModel(p), - NewCount(0), ModifiedValues(false), EditEnabled(true) + NewCount(0), EditEnabled(true) { } @@ -215,11 +215,6 @@ QCMakeCacheModel::~QCMakeCacheModel() { } -bool QCMakeCacheModel::modifiedValues() const -{ - return this->ModifiedValues; -} - static uint qHash(const QCMakeCacheProperty& p) { return qHash(p.Key); @@ -247,7 +242,6 @@ void QCMakeCacheModel::setProperties(const QCMakeCachePropertyList& props) qSort(tmp); this->Properties += tmp; - this->ModifiedValues = NewCount != 0; this->reset(); } @@ -266,6 +260,11 @@ bool QCMakeCacheModel::editEnabled() const return this->EditEnabled; } +int QCMakeCacheModel::newCount() const +{ + return this->NewCount; +} + int QCMakeCacheModel::columnCount (const QModelIndex& /*p*/ ) const { return 2; @@ -361,19 +360,16 @@ bool QCMakeCacheModel::setData (const QModelIndex& idx, const QVariant& value, i if(idx.column() == 0 && (role == Qt::DisplayRole || role == Qt::EditRole)) { this->Properties[idx.row()].Key = value.toString(); - this->ModifiedValues = true; emit this->dataChanged(idx, idx); } else if(idx.column() == 1 && (role == Qt::DisplayRole || role == Qt::EditRole)) { this->Properties[idx.row()].Value = value.toString(); - this->ModifiedValues = true; emit this->dataChanged(idx, idx); } else if(idx.column() == 1 && (role == Qt::CheckStateRole)) { this->Properties[idx.row()].Value = value.toInt() == Qt::Checked; - this->ModifiedValues = true; emit this->dataChanged(idx, idx); } return false; |