mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Update qt4 patch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5649086d61
commit
5f01321ae1
1 changed files with 16 additions and 13 deletions
|
|
@ -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>
|
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
|
Subject: [PATCH] Make build with Qt4
|
||||||
|
|
||||||
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
qt-ui/downloadfromdivecomputer.cpp
|
||||||
---
|
---
|
||||||
qt-ui/divelogimportdialog.cpp | 30 ++++++++++++++++++++++++++++++
|
qt-ui/divelogimportdialog.cpp | 30 ++++++++++++++++++++++++++++++
|
||||||
qt-ui/downloadfromdivecomputer.cpp | 12 ++++++++++++
|
qt-ui/downloadfromdivecomputer.cpp | 12 ++++++++++++
|
||||||
|
|
@ -11,12 +14,12 @@ Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
||||||
3 files changed, 44 insertions(+), 2 deletions(-)
|
3 files changed, 44 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
|
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
|
--- a/qt-ui/divelogimportdialog.cpp
|
||||||
+++ b/qt-ui/divelogimportdialog.cpp
|
+++ b/qt-ui/divelogimportdialog.cpp
|
||||||
@@ -375,14 +375,22 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
@@ -375,14 +375,22 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
||||||
seabear = true;
|
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);
|
blockSignals(true);
|
||||||
+#if QT_VERSION >= 0x050000
|
+#if QT_VERSION >= 0x050000
|
||||||
ui->knownImports->setCurrentText("Seabear CSV");
|
ui->knownImports->setCurrentText("Seabear CSV");
|
||||||
|
|
@ -39,7 +42,7 @@ index 1b37258b2a47..114b275d985d 100644
|
||||||
|
|
||||||
@@ -390,7 +398,11 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
@@ -390,7 +398,11 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
||||||
if (triggeredBy == KNOWNTYPES && value == 1) {
|
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);
|
blockSignals(true);
|
||||||
+#if QT_VERSION >= 0x050000
|
+#if QT_VERSION >= 0x050000
|
||||||
ui->CSVSeparator->setCurrentText(tr("Tab"));
|
ui->CSVSeparator->setCurrentText(tr("Tab"));
|
||||||
|
|
@ -84,10 +87,10 @@ index 1b37258b2a47..114b275d985d 100644
|
||||||
if (separator == "Tab")
|
if (separator == "Tab")
|
||||||
separator = "\t";
|
separator = "\t";
|
||||||
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
|
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
|
--- a/qt-ui/downloadfromdivecomputer.cpp
|
||||||
+++ b/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)
|
void DiveImportedModel::changeSelected(QModelIndex clickedIndex)
|
||||||
{
|
{
|
||||||
checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()];
|
checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()];
|
||||||
|
|
@ -100,21 +103,21 @@ index c6679255088c..a4d953ffe947 100644
|
||||||
|
|
||||||
void DiveImportedModel::selectAll()
|
void DiveImportedModel::selectAll()
|
||||||
{
|
{
|
||||||
memset(checkStates, true, lastIndex - firstIndex);
|
memset(checkStates, true, lastIndex - firstIndex + 1);
|
||||||
+#if QT_VERSION >= 0x050000
|
+#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
|
+#else
|
||||||
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1));
|
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex));
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveImportedModel::selectNone()
|
void DiveImportedModel::selectNone()
|
||||||
{
|
{
|
||||||
memset(checkStates, false, lastIndex - firstIndex);
|
memset(checkStates, false, lastIndex - firstIndex + 1);
|
||||||
+#if QT_VERSION >= 0x050000
|
+#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
|
+#else
|
||||||
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1));
|
+ dataChanged(index(0, 0), index(0, lastIndex - firstIndex ));
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue