diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogexportdialog.cpp | 7 | ||||
-rw-r--r-- | qt-ui/divelogexportdialog.h | 4 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 34 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 12 | ||||
-rw-r--r-- | qt-ui/plannerSettings.ui | 4 |
5 files changed, 3 insertions, 58 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index 8c6d2899f..43c41550f 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -1,9 +1,8 @@ #include <QFileDialog> #include <QShortcut> #include <QSettings> -#if QT_VERSION >= 0x050000 #include <QtConcurrent> -#endif + #include "divelogexportdialog.h" #include "diveshareexportdialog.h" #include "ui_divelogexportdialog.h" @@ -314,11 +313,7 @@ void DiveLogExportDialog::on_buttonBox_accepted() settings.endGroup(); // the non XSLT exports are called directly above, the XSLT based ons are called here if (!stylesheet.isEmpty()) -#if QT_VERSION >= 0x050000 future = QtConcurrent::run(export_dives_xslt, filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8()); -#else - export_dives_xslt(filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8()); -#endif } } diff --git a/qt-ui/divelogexportdialog.h b/qt-ui/divelogexportdialog.h index 524416414..14f8f4539 100644 --- a/qt-ui/divelogexportdialog.h +++ b/qt-ui/divelogexportdialog.h @@ -3,9 +3,7 @@ #include <QDialog> #include <QTextStream> -#if QT_VERSION >= 0x050000 #include <QFuture> -#endif #include "helpers.h" #include "statistics.h" @@ -30,9 +28,7 @@ slots: void on_exportGroup_buttonClicked(QAbstractButton *); private: -#if QT_VERSION >= 0x050000 QFuture<int> future; -#endif Ui::DiveLogExportDialog *ui; void showExplanation(); void exportHtmlInit(const QString &filename); diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index f4e43ef90..ce12ef7ec 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -377,22 +377,14 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) seabear = true; 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"); -#else - ui->knownImports->setCurrentIndex(4); -#endif blockSignals(false); } else if (firstLine.contains("Tauchgangs-Nr.:")) { xp5 = true; //"Abgelaufene Tauchzeit (Std:Min.)\tTiefe\tStickstoff Balkenanzeige\tSauerstoff Balkenanzeige\tAufstiegsgeschwindigkeit\tRestluftzeit\tRestliche Tauchzeit\tDekompressionszeit (Std:Min)\tDekostopp-Tiefe\tTemperatur\tPO2\tPressluftflasche\tLesen des Druckes\tStatus der Verbindung\tTauchstatus"; firstLine = "Sample time\tSample depth\t\t\t\t\t\t\t\tSample temperature\t"; blockSignals(true); -#if QT_VERSION >= 0x050000 ui->knownImports->setCurrentText("XP5"); -#else - ui->knownImports->setCurrentIndex(2); -#endif blockSignals(false); } @@ -401,17 +393,9 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) apd=true; 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")); -#else - ui->CSVSeparator->setCurrentIndex(0); -#endif if (triggeredBy == INITIAL && fileNames.first().contains(".apd", Qt::CaseInsensitive)) -#if QT_VERSION >= 0x050000 ui->knownImports->setCurrentText("APD Log Viewer"); -#else - ui->knownImports->setCurrentIndex(1); -#endif blockSignals(false); } @@ -430,16 +414,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) separator = ";"; if (ui->CSVSeparator->currentText() != separator) { blockSignals(true); -#if QT_VERSION >= 0x050000 ui->CSVSeparator->setCurrentText(separator); -#else - if (separator == "Tab") - ui->CSVSeparator->setCurrentIndex(0); - else if (separator == ",") - ui->CSVSeparator->setCurrentIndex(1); - else - ui->CSVSeparator->setCurrentIndex(2); -#endif blockSignals(false); currColumns = firstLine.split(separator); } @@ -490,16 +465,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) if (ui->CSVSeparator->currentText() != separator || separator == "Tab") { ui->CSVSeparator->blockSignals(true); -#if QT_VERSION >= 0x050000 ui->CSVSeparator->setCurrentText(separator); -#else - if (separator == "Tab") - ui->CSVSeparator->setCurrentIndex(0); - else if (separator == ",") - ui->CSVSeparator->setCurrentIndex(1); - else - ui->CSVSeparator->setCurrentIndex(2); -#endif ui->CSVSeparator->blockSignals(false); if (separator == "Tab") separator = "\t"; diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 4e5b27c6b..c57aa1ef2 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -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 diff --git a/qt-ui/plannerSettings.ui b/qt-ui/plannerSettings.ui index 89ffc89e1..440fb534a 100644 --- a/qt-ui/plannerSettings.ui +++ b/qt-ui/plannerSettings.ui @@ -338,8 +338,8 @@ </item> <item row="5" column="1"> <widget class="QComboBox" name="rebreathermode"> - <property name="currentIndex"> - <number>0</number> + <property name="currentText"> + <string/> </property> <property name="maxVisibleItems"> <number>6</number> |