diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-07-25 18:40:19 -0700 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-07-26 16:32:51 +0300 |
commit | 0e6c3db24c77331f52d17fd22494565dbafc6f84 (patch) | |
tree | f59cf5c3d29d108972919a9ee12b7c47ab77d45e /desktop-widgets/downloadfromdivecomputer.cpp | |
parent | 00c0f94d8c8623aa97f3f5c44a79bd8e53c8fd94 (diff) | |
download | subsurface-0e6c3db24c77331f52d17fd22494565dbafc6f84.tar.gz |
Whitespace cleanup desktop-widget
Not entirely script based because of the broken 'else if'.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index 1daf26d7b..4b5a0c917 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -1,19 +1,19 @@ // SPDX-License-Identifier: GPL-2.0 #include "desktop-widgets/downloadfromdivecomputer.h" -#include "core/qthelper.h" -#include "desktop-widgets/mainwindow.h" -#include "desktop-widgets/divelistview.h" #include "core/display.h" +#include "core/qthelper.h" +#include "core/subsurface-qt/SettingsObjectWrapper.h" #include "core/subsurface-string.h" #include "core/uemis.h" -#include "core/subsurface-qt/SettingsObjectWrapper.h" -#include "qt-models/models.h" +#include "desktop-widgets/divelistview.h" +#include "desktop-widgets/mainwindow.h" #include "qt-models/diveimportedmodel.h" +#include "qt-models/models.h" -#include <QTimer> #include <QFileDialog> #include <QMessageBox> #include <QShortcut> +#include <QTimer> DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f), downloading(false), @@ -122,8 +122,8 @@ void DownloadFromDCWidget::updateProgressBar() if (IS_FP_SAME(progress_bar_fraction, 0.0)) { ui.progressBar->setFormat(tr("Connecting to dive computer")); #if defined(Q_OS_MAC) - // on mac the progress bar doesn't show its text - ui.progressText->setText(tr("Connecting to dive computer")); + // on mac the progress bar doesn't show its text + ui.progressText->setText(tr("Connecting to dive computer")); #endif } else { ui.progressBar->setFormat("%p%"); @@ -241,7 +241,7 @@ void DownloadFromDCWidget::on_vendor_currentIndexChanged(const QString &vendor) fill_device_list(dcType); } -void DownloadFromDCWidget::on_product_currentIndexChanged(const QString&) +void DownloadFromDCWidget::on_product_currentIndexChanged(const QString &) { updateDeviceEnabled(); } @@ -334,7 +334,8 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() // // We shouldn't do this for memory dumps. if ((product == "OSTC 3" || product == "OSTC 3+" || product == "OSTC cR" || - product == "OSTC Sport" || product == "OSTC 4") && !data->saveDump()) { + product == "OSTC Sport" || product == "OSTC 4") && + !data->saveDump()) { ostcFirmwareCheck = new OstcFirmwareCheck(product); } } @@ -359,7 +360,7 @@ void DownloadFromDCWidget::pickLogFile() QFileInfo fi(filename); filename = fi.absolutePath().append(QDir::separator()).append("subsurface.log"); QString logFile = QFileDialog::getSaveFileName(this, tr("Choose file for dive computer download logfile"), - filename, tr("Log files") + " (*.log)"); + filename, tr("Log files") + " (*.log)"); if (!logFile.isEmpty()) { free(logfile_name); logfile_name = copy_qstring(logFile); @@ -385,7 +386,7 @@ void DownloadFromDCWidget::pickDumpFile() QFileInfo fi(filename); filename = fi.absolutePath().append(QDir::separator()).append("subsurface.bin"); QString dumpFile = QFileDialog::getSaveFileName(this, tr("Choose file for dive computer binary dump file"), - filename, tr("Dump files") + " (*.bin)"); + filename, tr("Dump files") + " (*.bin)"); if (!dumpFile.isEmpty()) { free(dumpfile_name); dumpfile_name = copy_qstring(dumpFile); @@ -437,7 +438,7 @@ void DownloadFromDCWidget::on_ok_clicked() // record all the dives in the 'real' dive_table for (int i = 0; i < downloadTable.nr; i++) { - if (diveImportedModel->data(diveImportedModel->index(i, 0),Qt::CheckStateRole) == Qt::Checked) + if (diveImportedModel->data(diveImportedModel->index(i, 0), Qt::CheckStateRole) == Qt::Checked) record_dive(downloadTable.dives[i]); else clear_dive(downloadTable.dives[i]); @@ -546,7 +547,7 @@ void DownloadFromDCWidget::bluetoothSelectionDialogIsFinished(int result) if (result == QDialog::Accepted) { /* Make the selected Bluetooth device default */ ui.device->setEditText(btDeviceSelectionDialog->getSelectedDeviceText()); - } else if (result == QDialog::Rejected){ + } else if (result == QDialog::Rejected) { /* Disable Bluetooth download mode */ ui.bluetoothMode->setChecked(false); } @@ -577,4 +578,3 @@ void DownloadFromDCWidget::fill_device_list(int dc_type) if (deviceIndex >= 0) ui.device->setCurrentIndex(deviceIndex); } - |