summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-28 14:43:30 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-28 14:43:30 -0800
commit5f01321ae142d4ecbe847e1d67b897d71e6f94ec (patch)
tree1b786c37a156631a016754bcf1549b12505a9d64
parent5649086d6122a1c143f49832a85be7ccc90475ca (diff)
downloadsubsurface-5f01321ae142d4ecbe847e1d67b897d71e6f94ec.tar.gz
Update qt4 patch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--packaging/ubuntu/0001-Make-build-with-Qt4.patch29
1 files changed, 16 insertions, 13 deletions
diff --git a/packaging/ubuntu/0001-Make-build-with-Qt4.patch b/packaging/ubuntu/0001-Make-build-with-Qt4.patch
index 6192db31a..7a14f639a 100644
--- a/packaging/ubuntu/0001-Make-build-with-Qt4.patch
+++ b/packaging/ubuntu/0001-Make-build-with-Qt4.patch
@@ -1,9 +1,12 @@
-From 82dccbcff56fc32775dc715cecd7e1fc359d08aa Mon Sep 17 00:00:00 2001
+From 6c59f4c0fa925d1254668390f32229da93b44c75 Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk@hohndel.org>
-Date: Sun, 25 Jan 2015 14:26:25 -0800
+Date: Wed, 28 Jan 2015 14:42:12 -0800
Subject: [PATCH] Make build with Qt4
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
+
+Conflicts:
+ qt-ui/downloadfromdivecomputer.cpp
---
qt-ui/divelogimportdialog.cpp | 30 ++++++++++++++++++++++++++++++
qt-ui/downloadfromdivecomputer.cpp | 12 ++++++++++++
@@ -11,12 +14,12 @@ Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
-index 1b37258b2a47..114b275d985d 100644
+index 5cda9036eb94..57648e081050 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -375,14 +375,22 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
seabear = true;
- firstLine = "Sample time;Sample depth;Sample ndl;Sample tts;Sample stopdepth;Sample temperature;Sample pressure";
+ firstLine = "Sample time;Sample depth;Sample NDL;Sample TTS;Sample stopdepth;Sample temperature;Sample pressure";
blockSignals(true);
+#if QT_VERSION >= 0x050000
ui->knownImports->setCurrentText("Seabear CSV");
@@ -39,7 +42,7 @@ index 1b37258b2a47..114b275d985d 100644
@@ -390,7 +398,11 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
if (triggeredBy == KNOWNTYPES && value == 1) {
- firstLine = "Sample time\tSample depth\t\t\t\t\tSample pO₂\t\t\t\t\t\t\t\t\tSample temperature\t\tSample cns\tSample stopdepth";
+ firstLine = "Sample time\tSample depth\t\t\t\t\tSample pO₂\t\t\t\t\t\t\t\t\tSample temperature\t\tSample CNS\tSample stopdepth";
blockSignals(true);
+#if QT_VERSION >= 0x050000
ui->CSVSeparator->setCurrentText(tr("Tab"));
@@ -84,10 +87,10 @@ index 1b37258b2a47..114b275d985d 100644
if (separator == "Tab")
separator = "\t";
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
-index c6679255088c..a4d953ffe947 100644
+index cd3dd90d0cc2..e5ddab840b03 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
-@@ -594,19 +594,31 @@ QVariant DiveImportedModel::data(const QModelIndex &index, int role) const
+@@ -600,19 +600,31 @@ QVariant DiveImportedModel::data(const QModelIndex &index, int role) const
void DiveImportedModel::changeSelected(QModelIndex clickedIndex)
{
checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()];
@@ -100,21 +103,21 @@ index c6679255088c..a4d953ffe947 100644
void DiveImportedModel::selectAll()
{
- memset(checkStates, true, lastIndex - firstIndex);
+ memset(checkStates, true, lastIndex - firstIndex + 1);
+#if QT_VERSION >= 0x050000
- dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole);
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
+#else
-+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1));
++ dataChanged(index(0, 0), index(0, lastIndex - firstIndex));
+#endif
}
void DiveImportedModel::selectNone()
{
- memset(checkStates, false, lastIndex - firstIndex);
+ memset(checkStates, false, lastIndex - firstIndex + 1);
+#if QT_VERSION >= 0x050000
- dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole);
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole);
+#else
-+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1));
++ dataChanged(index(0, 0), index(0, lastIndex - firstIndex ));
+#endif
}