From 7c535452f97947c0bf77a1da0323b86b9e514c8f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 3 Mar 2014 13:25:55 -0800 Subject: Whitespace cleanup Minor change to the perl postprocessing script and resulting changes to the affected source files. This deals with two issues: - "foreach"-like structures were not always treated correctly - some longer calculations that ended on "+ constant" were reformatted in a rather unatractive manner In one source file (divelist.c) I ended up adding braces to the sources... trying to cascade the indentation further down without having the block there seemed a lot more trouble than it's worth. Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 2 +- qt-ui/divelogimportdialog.cpp | 3 +-- qt-ui/groupedlineedit.cpp | 2 +- qt-ui/maintab.cpp | 2 +- qt-ui/mainwindow.cpp | 4 ++-- qt-ui/profile/divecartesianaxis.cpp | 4 ++-- 6 files changed, 8 insertions(+), 9 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index dd4aacba2..ab4e301ad 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -120,7 +120,7 @@ void DiveListView::restoreExpandedRows() { setAnimated(false); Q_FOREACH(const int & i, expandedRows) - setExpanded(model()->index(i, 0), true); + setExpanded(model()->index(i, 0), true); setAnimated(true); } void DiveListView::fixMessyQtModelBehaviour() diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 41c906279..bff49156f 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -103,8 +103,7 @@ 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)) { diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp index 3ed6d239a..517623119 100644 --- a/qt-ui/groupedlineedit.cpp +++ b/qt-ui/groupedlineedit.cpp @@ -109,7 +109,7 @@ QStringList GroupedLineEdit::getBlockStringList() QStringList retList; Private::Block block; foreach(block, d->blocks) - retList.append(block.text); + retList.append(block.text); return retList; } diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 2af6b7b27..7305ee422 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -872,7 +872,7 @@ void MainTab::saveTags() QString tag; taglist_clear(mydive->tag_list); foreach(tag, ui.tagWidget->getBlockStringList()) - taglist_add_tag(mydive->tag_list, tag.toUtf8().data());); + taglist_add_tag(mydive->tag_list, tag.toUtf8().data());); } void MainTab::on_tagWidget_textChanged() diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 43f596eb2..d25635c66 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -621,7 +621,7 @@ void MainWindow::initialUiSetup() } #define TOOLBOX_PREF_BUTTON(pref, setting, button) \ - prefs.pref = s.value(#setting).toBool(); \ + prefs.pref = s.value(#setting).toBool(); \ ui.button->setChecked(prefs.pref); void MainWindow::readSettings() @@ -835,7 +835,7 @@ void MainWindow::removeRecentFile(QStringList failedFiles) } } - foreach (QString file, failedFiles) + foreach(QString file, failedFiles) files.removeAll(file); for (int c = 1; c <= 4; c++) { diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp index 2373b5f2f..585fe8076 100644 --- a/qt-ui/profile/divecartesianaxis.cpp +++ b/qt-ui/profile/divecartesianaxis.cpp @@ -238,9 +238,9 @@ void DiveCartesianAxis::updateTicks() } Q_FOREACH(DiveTextItem * item, labels) - item->setVisible(textVisibility); + item->setVisible(textVisibility); Q_FOREACH(DiveLineItem * item, lines) - item->setVisible(lineVisibility); + item->setVisible(lineVisibility); } void DiveCartesianAxis::animateChangeLine(const QLineF &newLine) -- cgit v1.2.3-70-g09d2