diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-09 14:05:20 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-09 14:05:20 (GMT) |
commit | f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2 (patch) | |
tree | 56b9e94aea9571cda947dca8ca5bfc000c6effed /src/gui/itemviews/qstyleditemdelegate.cpp | |
parent | d85b149a5c7f3532f8e1a593a79298c9ae38a95f (diff) | |
parent | bb966fe9dd8be25530da5a66727c7fe2123fafbb (diff) | |
download | Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.zip Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.gz Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui/itemviews/qstyleditemdelegate.cpp')
-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); } |