From 2feedf46fa86c19095a9f302d1d7a44d3416384d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 15 May 2019 07:42:14 -0700 Subject: Cleanup: small coding style fixes And addressing a cut and paste error in a comment. Signed-off-by: Dirk Hohndel --- desktop-widgets/printer.cpp | 4 ++-- desktop-widgets/simplewidgets.cpp | 4 ++-- desktop-widgets/tab-widgets/TabDiveInformation.cpp | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'desktop-widgets') 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(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; -- cgit v1.2.3-70-g09d2