summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-19 21:52:41 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-19 21:52:41 -0800
commit762315e7eef47c1a5357e9c8691676707e3c630e (patch)
tree8c1a25f1a026e920ff416677a759eb3708aa38f2 /qt-ui/downloadfromdivecomputer.cpp
parent6a2efd9ff6e3657c35612f65c322ded25c984532 (diff)
downloadsubsurface-762315e7eef47c1a5357e9c8691676707e3c630e.tar.gz
Update Qt4 patch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp12
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