--- a/src/gui/itemviews/qstyleditemdelegate.cpp Mon Mar 15 12:43:09 2010 +0200
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp Thu Apr 08 14:19:33 2010 +0300
@@ -747,13 +747,8 @@
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);
}