diff options
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index c57aa1ef2..4e5b27c6b 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -602,19 +602,31 @@ 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 |