diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-02 10:26:51 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-02 10:26:51 (GMT) |
commit | b6e312df6cc087dbf45becb91bd43b35913e3684 (patch) | |
tree | d0c2e8661f9447c3e49a42cb9a9b83b5f79b5149 /src/gui/itemviews | |
parent | 1bc449a16051f09028cfcb78ebdffa6ee0440572 (diff) | |
download | Qt-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/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qstyleditemdelegate.cpp | 7 |
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); } |