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

View file

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