equal
deleted
inserted
replaced
1295 return false; |
1295 return false; |
1296 } else { |
1296 } else { |
1297 return false; |
1297 return false; |
1298 } |
1298 } |
1299 |
1299 |
1300 Qt::CheckState state; |
1300 Qt::CheckState state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked |
1301 if ( flags & Qt::ItemIsTristate ) { |
|
1302 state = static_cast<Qt::CheckState>( (value.toInt() + 1) % 3 ); |
|
1303 } else { |
|
1304 state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked |
|
1305 ? Qt::Unchecked : Qt::Checked); |
1301 ? Qt::Unchecked : Qt::Checked); |
1306 } |
|
1307 |
|
1308 return model->setData(index, state, Qt::CheckStateRole); |
1302 return model->setData(index, state, Qt::CheckStateRole); |
1309 } |
1303 } |
1310 |
1304 |
1311 /*! |
1305 /*! |
1312 \internal |
1306 \internal |