Revert "Update Qt4 patch"

This reverts commit 762315e7ee.

Oops, this was supposed to update the patch, not update and apply it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-02-22 08:30:34 -08:00
parent df73f328f8
commit 2866a604b4
6 changed files with 14 additions and 137 deletions

View file

@ -602,31 +602,19 @@ QVariant DiveImportedModel::data(const QModelIndex &index, int role) const
void DiveImportedModel::changeSelected(QModelIndex clickedIndex)
{
checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()];
#if QT_VERSION >= 0x050000
dataChanged(index(0, clickedIndex.row()), index(0, clickedIndex.row()), QVector<int>() << Qt::CheckStateRole);
#else
dataChanged(index(0, clickedIndex.row()), index(0, clickedIndex.row()));
#endif
}
void DiveImportedModel::selectAll()
{
memset(checkStates, true, lastIndex - firstIndex + 1);
#if QT_VERSION >= 0x050000
dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
#else
dataChanged(index(0, 0), index(0, lastIndex - firstIndex));
#endif
}
void DiveImportedModel::selectNone()
{
memset(checkStates, false, lastIndex - firstIndex + 1);
#if QT_VERSION >= 0x050000
dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
#else
dataChanged(index(0, 0), index(0, lastIndex - firstIndex ));
#endif
}
Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const