diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-05-15 07:42:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-15 07:42:14 -0700 |
commit | 2feedf46fa86c19095a9f302d1d7a44d3416384d (patch) | |
tree | c5555f630309bc6808acbf7b3957346e745dcb65 /desktop-widgets | |
parent | 1bdf00b2b472078a0b24f1c269782d822cb96e02 (diff) | |
download | subsurface-2feedf46fa86c19095a9f302d1d7a44d3416384d.tar.gz |
Cleanup: small coding style fixes
And addressing a cut and paste error in a comment.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/printer.cpp | 4 | ||||
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 4 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveInformation.cpp | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index 4b7123adb..b617fde11 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -100,9 +100,9 @@ void Printer::flowRender() emit(progessUpdated(lrint((end * 80.0 / fullPageResolution) + done))); // add new pages only in print mode, while previewing we don't add new pages - if (printMode == Printer::PRINT) + if (printMode == Printer::PRINT) { static_cast<QPrinter*>(paintDevice)->newPage(); - else { + } else { painter.end(); return; } diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index abaf5b372..f28f8c6a0 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -376,9 +376,9 @@ void ShiftImageTimesDialog::updateInvalid() ui.invalidFilesText->hide(); QDateTime time_first = QDateTime::fromTime_t(first_selected_dive()->when, Qt::UTC); QDateTime time_last = QDateTime::fromTime_t(last_selected_dive()->when, Qt::UTC); - if (first_selected_dive() == last_selected_dive()) + if (first_selected_dive() == last_selected_dive()) { ui.invalidFilesText->setPlainText(tr("Selected dive date/time") + ": " + time_first.toString()); - else { + } else { ui.invalidFilesText->setPlainText(tr("First selected dive date/time") + ": " + time_first.toString()); ui.invalidFilesText->append(tr("Last selected dive date/time") + ": " + time_last.toString()); } diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index 4511f9b61..d55cb48b6 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -86,8 +86,7 @@ void TabDiveInformation::updateProfile() if (current_dive->surface_pressure.mbar == 0) { ui->atmPressVal->clear(); // If no atm pressure for dive then clear text box - } - else { + } else { ui->atmPressVal->setEnabled(true); QString pressStr; |