diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
commit | 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch) | |
tree | 8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /qt-ui/divelogimportdialog.cpp | |
parent | 006265d7a088cff4fea665159dbb454956c2cd76 (diff) | |
download | subsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz |
Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 36e69d06f..41c906279 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -5,15 +5,14 @@ #include "ui_divelogimportdialog.h" const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { - {"", }, - {"APD Log Viewer", 1, 2, 16, 7, 18, 19, "Tab"}, - {"XP5", 1, 2, 10, -1, -1, -1, "Tab"}, - {"SensusCSV", 10, 11, -1, -1, -1, -1, ","}, - {NULL,} + { "", }, + { "APD Log Viewer", 1, 2, 16, 7, 18, 19, "Tab" }, + { "XP5", 1, 2, 10, -1, -1, -1, "Tab" }, + { "SensusCSV", 10, 11, -1, -1, -1, -1, "," }, + { NULL, } }; -DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : - QDialog(parent), +DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent), selector(true), ui(new Ui::DiveLogImportDialog) { @@ -52,7 +51,7 @@ DiveLogImportDialog::~DiveLogImportDialog() delete ui; } -#define VALUE_IF_CHECKED(x) (ui->x->isEnabled() ? ui->x->value() - 1: -1) +#define VALUE_IF_CHECKED(x) (ui->x->isEnabled() ? ui->x->value() - 1 : -1) void DiveLogImportDialog::on_buttonBox_accepted() { char *error = NULL; @@ -60,14 +59,14 @@ void DiveLogImportDialog::on_buttonBox_accepted() if (ui->tabWidget->currentIndex() == 0) { for (int i = 0; i < fileNames.size(); ++i) { parse_csv_file(fileNames[i].toUtf8().data(), ui->CSVTime->value() - 1, - ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature), - VALUE_IF_CHECKED(CSVpo2), - VALUE_IF_CHECKED(CSVcns), - VALUE_IF_CHECKED(CSVstopdepth), - ui->CSVSeparator->currentIndex(), - specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv", - ui->CSVUnits->currentIndex(), - &error); + ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature), + VALUE_IF_CHECKED(CSVpo2), + VALUE_IF_CHECKED(CSVcns), + VALUE_IF_CHECKED(CSVstopdepth), + ui->CSVSeparator->currentIndex(), + specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv", + ui->CSVUnits->currentIndex(), + &error); if (error != NULL) { MainWindow::instance()->showError(error); free(error); @@ -77,16 +76,16 @@ void DiveLogImportDialog::on_buttonBox_accepted() } else { for (int i = 0; i < fileNames.size(); ++i) { parse_manual_file(fileNames[i].toUtf8().data(), - ui->ManualSeparator->currentIndex(), - ui->Units->currentIndex(), - VALUE_IF_CHECKED(DiveNumber), - VALUE_IF_CHECKED(Date), VALUE_IF_CHECKED(Time), - VALUE_IF_CHECKED(Duration), VALUE_IF_CHECKED(Location), - VALUE_IF_CHECKED(Gps), VALUE_IF_CHECKED(MaxDepth), - VALUE_IF_CHECKED(MeanDepth), VALUE_IF_CHECKED(Buddy), - VALUE_IF_CHECKED(Notes), VALUE_IF_CHECKED(Weight), - VALUE_IF_CHECKED(Tags), - &error); + ui->ManualSeparator->currentIndex(), + ui->Units->currentIndex(), + VALUE_IF_CHECKED(DiveNumber), + VALUE_IF_CHECKED(Date), VALUE_IF_CHECKED(Time), + VALUE_IF_CHECKED(Duration), VALUE_IF_CHECKED(Location), + VALUE_IF_CHECKED(Gps), VALUE_IF_CHECKED(MaxDepth), + VALUE_IF_CHECKED(MeanDepth), VALUE_IF_CHECKED(Buddy), + VALUE_IF_CHECKED(Notes), VALUE_IF_CHECKED(Weight), + VALUE_IF_CHECKED(Tags), + &error); if (error != NULL) { MainWindow::instance()->showError(error); free(error); @@ -104,8 +103,8 @@ void DiveLogImportDialog::on_buttonBox_accepted() ui->CSV->setValue(VAL);\ ui->CSV->setEnabled(VAL >= 0);\ ui->BOX->setChecked(VAL >= 0);\ - ui->CSV->blockSignals(false);\ - }) + ui->CSV->blockSignals(false); \ +}) void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index) { if (specialCSV.contains(index)) { |