Small whitespace updates

We aren't really consistent. And I don't do this often enough. But based
on a few things that I saw in a recent commit, I wanted to at least fix
those. And then of course fixed everything in those two files.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-12-24 08:39:21 -08:00
parent 734bd6d459
commit eec69de7ab
2 changed files with 37 additions and 40 deletions

View file

@ -214,8 +214,7 @@ void SetpointDialog::buttonClicked(QAbstractButton *button)
MainWindow::instance()->graphics()->replot(); MainWindow::instance()->graphics()->replot();
} }
SetpointDialog::SetpointDialog(QWidget *parent) : SetpointDialog::SetpointDialog(QWidget *parent) : QDialog(parent),
QDialog(parent),
dc(0) dc(0)
{ {
ui.setupUi(this); ui.setupUi(this);
@ -281,8 +280,7 @@ void ShiftTimesDialog::changeTime()
ui.shiftedTime->setText(get_dive_date_string(amount + when)); ui.shiftedTime->setText(get_dive_date_string(amount + when));
} }
ShiftTimesDialog::ShiftTimesDialog(QWidget *parent) : ShiftTimesDialog::ShiftTimesDialog(QWidget *parent) : QDialog(parent),
QDialog(parent),
when(0) when(0)
{ {
ui.setupUi(this); ui.setupUi(this);
@ -346,8 +344,7 @@ bool ShiftImageTimesDialog::matchAll()
return matchAllImages; return matchAllImages;
} }
ShiftImageTimesDialog::ShiftImageTimesDialog(QWidget *parent, QStringList fileNames) : ShiftImageTimesDialog::ShiftImageTimesDialog(QWidget *parent, QStringList fileNames) : QDialog(parent),
QDialog(parent),
fileNames(fileNames), fileNames(fileNames),
m_amount(0), m_amount(0),
matchAllImages(false) matchAllImages(false)
@ -427,7 +424,8 @@ void ShiftImageTimesDialog::timeEditChanged()
{ {
if ((m_amount > 0) == ui.backwards->isChecked()) if ((m_amount > 0) == ui.backwards->isChecked())
m_amount *= -1; m_amount *= -1;
if (m_amount) updateInvalid(); if (m_amount)
updateInvalid();
} }
URLDialog::URLDialog(QWidget *parent) : QDialog(parent) URLDialog::URLDialog(QWidget *parent) : QDialog(parent)
@ -500,9 +498,8 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button)
} }
} }
FilterBase::FilterBase(FilterModelBase *model_, QWidget *parent) FilterBase::FilterBase(FilterModelBase *model_, QWidget *parent) : QWidget(parent),
: QWidget(parent) model(model_)
, model(model_)
{ {
ui.setupUi(this); ui.setupUi(this);
#if QT_VERSION >= 0x050200 #if QT_VERSION >= 0x050200
@ -738,7 +735,8 @@ QString TextHyperlinkEventFilter::fromCursorTilWhitespace(QTextCursor *cursor, c
} }
grownText = cursor->selectedText(); grownText = cursor->selectedText();
if (grownText.size() == oldSize) movedOk = false; if (grownText.size() == oldSize)
movedOk = false;
oldSize = grownText.size(); oldSize = grownText.size();
noSpaces = grownText.simplified().replace(" ", ""); noSpaces = grownText.simplified().replace(" ", "");
} while (grownText == noSpaces && movedOk); } while (grownText == noSpaces && movedOk);

View file

@ -25,8 +25,8 @@ CREATE_INSTANCE_METHOD(LocationFilterModel)
CREATE_INSTANCE_METHOD(SuitsFilterModel) CREATE_INSTANCE_METHOD(SuitsFilterModel)
CREATE_INSTANCE_METHOD(MultiFilterSortModel) CREATE_INSTANCE_METHOD(MultiFilterSortModel)
FilterModelBase::FilterModelBase(QObject *parent) : QStringListModel(parent) FilterModelBase::FilterModelBase(QObject *parent) : QStringListModel(parent),
, anyChecked(false) anyChecked(false)
{ {
} }
@ -373,8 +373,7 @@ void LocationFilterModel::addName(const QString &newName)
checkState.insert(checkState.begin(), true); checkState.insert(checkState.begin(), true);
} }
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent),
QSortFilterProxyModel(parent),
divesDisplayed(0), divesDisplayed(0),
justCleared(false), justCleared(false),
curr_dive_site(NULL) curr_dive_site(NULL)