diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-02 09:52:47 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-02 10:02:35 (GMT) |
commit | 1bc449a16051f09028cfcb78ebdffa6ee0440572 (patch) | |
tree | cd5d78459ef1c44d2973467ba90bcccb72f5cb49 /src/gui/itemviews | |
parent | cb9051c79e5937ad8441100aaf67553e28ba0700 (diff) | |
download | Qt-1bc449a16051f09028cfcb78ebdffa6ee0440572.zip Qt-1bc449a16051f09028cfcb78ebdffa6ee0440572.tar.gz Qt-1bc449a16051f09028cfcb78ebdffa6ee0440572.tar.bz2 |
Revert "ItemViews: make it possible for chekcable items to get partiallyChecked"
This reverts commit 435bbd4be73768f617e4a4083a345d1d8d62daa3.
Reviewed-By: ogoffart
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qitemdelegate.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index 9069ce4..7d8e103 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -1297,14 +1297,8 @@ bool QItemDelegate::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); } |