Cleanup: small coding style fixes

And addressing a cut and paste error in a comment.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-05-15 07:42:14 -07:00
parent 1bdf00b2b4
commit 2feedf46fa
8 changed files with 13 additions and 17 deletions

View file

@ -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;
}

View file

@ -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());
}

View file

@ -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;