mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Small random whitespace cleanups
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
18b7a2778d
commit
8bdc9d1ec4
3 changed files with 19 additions and 19 deletions
|
@ -59,12 +59,14 @@ void CleanerTableModel::setHeaderDataStrings(const QStringList &newHeaders)
|
||||||
static QPixmap *trashIconPixmap;
|
static QPixmap *trashIconPixmap;
|
||||||
|
|
||||||
// initialize the trash icon if necessary
|
// initialize the trash icon if necessary
|
||||||
static void initTrashIcon() {
|
static void initTrashIcon()
|
||||||
|
{
|
||||||
if (!trashIconPixmap)
|
if (!trashIconPixmap)
|
||||||
trashIconPixmap = new QPixmap(QIcon(":trash").pixmap(defaultIconMetrics().sz_small));
|
trashIconPixmap = new QPixmap(QIcon(":trash").pixmap(defaultIconMetrics().sz_small));
|
||||||
}
|
}
|
||||||
|
|
||||||
const QPixmap &trashIcon() {
|
const QPixmap &trashIcon()
|
||||||
|
{
|
||||||
return *trashIconPixmap;
|
return *trashIconPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,8 +74,7 @@ CylindersModel::CylindersModel(QObject *parent) : rows(0)
|
||||||
{
|
{
|
||||||
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
|
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
|
||||||
setHeaderDataStrings(QStringList() << "" << tr("Type") << tr("Size") << tr("Work press.") << tr("Start press.") << tr("End press.") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%")
|
setHeaderDataStrings(QStringList() << "" << tr("Type") << tr("Size") << tr("Work press.") << tr("Start press.") << tr("End press.") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%")
|
||||||
<< tr("Switch at")
|
<< tr("Switch at"));
|
||||||
);
|
|
||||||
|
|
||||||
initTrashIcon();
|
initTrashIcon();
|
||||||
}
|
}
|
||||||
|
@ -2354,7 +2355,6 @@ bool TagFilterModel::filterRow(int source_row, const QModelIndex &source_parent,
|
||||||
|
|
||||||
BuddyFilterModel::BuddyFilterModel(QObject *parent) : QStringListModel(parent), checkState(NULL)
|
BuddyFilterModel::BuddyFilterModel(QObject *parent) : QStringListModel(parent), checkState(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BuddyFilterModel *BuddyFilterModel::instance()
|
BuddyFilterModel *BuddyFilterModel::instance()
|
||||||
|
@ -2416,8 +2416,7 @@ void BuddyFilterModel::repopulate()
|
||||||
QStringList list;
|
QStringList list;
|
||||||
struct dive *dive;
|
struct dive *dive;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for_each_dive (i, dive)
|
for_each_dive (i, dive) {
|
||||||
{
|
|
||||||
QString buddy(dive->buddy);
|
QString buddy(dive->buddy);
|
||||||
QString divemaster(dive->divemaster);
|
QString divemaster(dive->divemaster);
|
||||||
if (!buddy.isEmpty() && !list.contains(buddy)) {
|
if (!buddy.isEmpty() && !list.contains(buddy)) {
|
||||||
|
@ -2467,7 +2466,6 @@ bool BuddyFilterModel::setData(const QModelIndex &index, const QVariant &value,
|
||||||
|
|
||||||
LocationFilterModel::LocationFilterModel(QObject *parent) : QStringListModel(parent), checkState(NULL)
|
LocationFilterModel::LocationFilterModel(QObject *parent) : QStringListModel(parent), checkState(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant LocationFilterModel::data(const QModelIndex &index, int role) const
|
QVariant LocationFilterModel::data(const QModelIndex &index, int role) const
|
||||||
|
@ -2539,8 +2537,7 @@ void LocationFilterModel::repopulate()
|
||||||
QStringList list;
|
QStringList list;
|
||||||
struct dive *dive;
|
struct dive *dive;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for_each_dive (i, dive)
|
for_each_dive (i, dive) {
|
||||||
{
|
|
||||||
QString location(dive->location);
|
QString location(dive->location);
|
||||||
if (!location.isEmpty() && !list.contains(location)) {
|
if (!location.isEmpty() && !list.contains(location)) {
|
||||||
list.append(location);
|
list.append(location);
|
||||||
|
|
|
@ -136,6 +136,7 @@ public:
|
||||||
TagFilter(QWidget *parent = 0);
|
TagFilter(QWidget *parent = 0);
|
||||||
virtual void showEvent(QShowEvent *);
|
virtual void showEvent(QShowEvent *);
|
||||||
virtual void hideEvent(QHideEvent *);
|
virtual void hideEvent(QHideEvent *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::FilterWidget ui;
|
Ui::FilterWidget ui;
|
||||||
};
|
};
|
||||||
|
@ -146,6 +147,7 @@ public:
|
||||||
BuddyFilter(QWidget *parent = 0);
|
BuddyFilter(QWidget *parent = 0);
|
||||||
virtual void showEvent(QShowEvent *);
|
virtual void showEvent(QShowEvent *);
|
||||||
virtual void hideEvent(QHideEvent *);
|
virtual void hideEvent(QHideEvent *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::FilterWidget ui;
|
Ui::FilterWidget ui;
|
||||||
};
|
};
|
||||||
|
@ -156,6 +158,7 @@ public:
|
||||||
LocationFilter(QWidget *parent = 0);
|
LocationFilter(QWidget *parent = 0);
|
||||||
virtual void showEvent(QShowEvent *);
|
virtual void showEvent(QShowEvent *);
|
||||||
virtual void hideEvent(QHideEvent *);
|
virtual void hideEvent(QHideEvent *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::FilterWidget ui;
|
Ui::FilterWidget ui;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue