summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-03-02 10:26:51 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-03-02 10:26:51 (GMT)
commitb6e312df6cc087dbf45becb91bd43b35913e3684 (patch)
treed0c2e8661f9447c3e49a42cb9a9b83b5f79b5149 /src
parent1bc449a16051f09028cfcb78ebdffa6ee0440572 (diff)
downloadQt-b6e312df6cc087dbf45becb91bd43b35913e3684.zip
Qt-b6e312df6cc087dbf45becb91bd43b35913e3684.tar.gz
Qt-b6e312df6cc087dbf45becb91bd43b35913e3684.tar.bz2
2nd part of revert of commit 435bbd4be73768f617e4a
After a mess-up by git rebase... Reviewed-by: ogoffart
Diffstat (limited to 'src')
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index 9aac554..880f8ab 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -747,13 +747,8 @@ bool QStyledItemDelegate::editorEvent(QEvent *event,
return false;
}
- Qt::CheckState state;
- if ( flags & Qt::ItemIsTristate ) {
- state = static_cast<Qt::CheckState>( (value.toInt() + 1) % 3 );
- } else {
- state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked
+ Qt::CheckState state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked
? Qt::Unchecked : Qt::Checked);
- }
return model->setData(index, state, Qt::CheckStateRole);
}