diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2007-11-09 20:18:49 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2007-11-09 20:18:49 (GMT) |
commit | 57e46c74d427e7d0ad19fa8671110908cf325cd9 (patch) | |
tree | 7cf188fae4d424ac0c384c3a65795eafd374dfc3 /Source/QtDialog/QCMakeCacheView.cxx | |
parent | e5bb99e01077a8ac084bbd6dbf8e2f81390b5cd9 (diff) | |
download | CMake-57e46c74d427e7d0ad19fa8671110908cf325cd9.zip CMake-57e46c74d427e7d0ad19fa8671110908cf325cd9.tar.gz CMake-57e46c74d427e7d0ad19fa8671110908cf325cd9.tar.bz2 |
BUG: Don't prompt for unsaved changes if no changes were made.
ENH: Error messages go to output window instead of message boxes.
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; |