Skip to content

Commit

Permalink
fix tidy modernize-use-override
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 committed Nov 13, 2024
1 parent 40aad44 commit a0a09f6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
16 changes: 8 additions & 8 deletions gui/filterdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TrackFilterData: public FilterData
startTime = stopTime.addMonths(-6);
startTime.setTime(QTime(0, 0, 1));
}
virtual void makeSettingGroup(SettingGroup& sg)
void makeSettingGroup(SettingGroup& sg) override
{
sg.addVarSetting(new BoolSetting("trks.inUse", inUse_));
sg.addVarSetting(new BoolSetting("trks.GPSFixes", GPSFixes));
Expand Down Expand Up @@ -111,7 +111,7 @@ class TrackFilterData: public FilterData
sg.addVarSetting(new IntSetting("trks.splitDist", splitDist));
sg.addVarSetting(new IntSetting("trks.splitDistUnit", splitDistUnit));
}
virtual QStringList makeOptionString();
QStringList makeOptionString() override;

public:
bool title;
Expand Down Expand Up @@ -146,8 +146,8 @@ class WayPtsFilterData: public FilterData
{
}

virtual QStringList makeOptionString();
virtual void makeSettingGroup(SettingGroup& sg)
QStringList makeOptionString() override;
void makeSettingGroup(SettingGroup& sg) override
{
sg.addVarSetting(new BoolSetting("wpts.inUse", inUse_));
sg.addVarSetting(new BoolSetting("wpts.radius", radius));
Expand Down Expand Up @@ -183,8 +183,8 @@ class RtTrkFilterData: public FilterData
{
}

virtual QStringList makeOptionString();
virtual void makeSettingGroup(SettingGroup& sg)
QStringList makeOptionString() override;
void makeSettingGroup(SettingGroup& sg) override
{
sg.addVarSetting(new BoolSetting("rttrk.inUse", inUse_));
sg.addVarSetting(new BoolSetting("rttrk.reverse", reverse_));
Expand Down Expand Up @@ -218,8 +218,8 @@ class MiscFltFilterData: public FilterData
{
}

virtual QStringList makeOptionString();
virtual void makeSettingGroup(SettingGroup& sg)
QStringList makeOptionString() override;
void makeSettingGroup(SettingGroup& sg) override
{
sg.addVarSetting(new BoolSetting("mscflt.nukeRoutes", nukeRoutes_));
sg.addVarSetting(new BoolSetting("mscflt.nukeTracks", nukeTracks_));
Expand Down
26 changes: 13 additions & 13 deletions gui/filterwidgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ class BoolFilterOption: public FilterOption
BoolFilterOption(bool& b, QAbstractButton* ck): b(b), checkBox(ck)
{
}
void setWidgetValue()
void setWidgetValue() override
{
checkBox->setChecked(b);
}
void getWidgetValue()
void getWidgetValue() override
{
b = checkBox->isChecked();
}
Expand All @@ -139,11 +139,11 @@ class IntSpinFilterOption: public FilterOption
{
sb->setRange(bottom, top);
}
void setWidgetValue()
void setWidgetValue() override
{
spinBox->setValue(val);
}
void getWidgetValue()
void getWidgetValue() override
{
val = spinBox->value();
}
Expand All @@ -160,11 +160,11 @@ class StringFilterOption: public FilterOption
StringFilterOption(QString& val, QLineEdit* le): val(val), lineEdit(le)
{
}
void setWidgetValue()
void setWidgetValue() override
{
lineEdit->setText(val);
}
void getWidgetValue()
void getWidgetValue() override
{
val = lineEdit->text();
}
Expand All @@ -188,11 +188,11 @@ class DoubleFilterOption: public FilterOption
{
le->setValidator(new QDoubleValidator(minVal, maxVal, decimals, le));
}
void setWidgetValue()
void setWidgetValue() override
{
lineEdit->setText(QString("%1").arg(val, 0, format, decimals));
}
void getWidgetValue()
void getWidgetValue() override
{
val = lineEdit->text().toDouble();
val = qMin(val, maxVal);
Expand All @@ -214,11 +214,11 @@ class DateTimeFilterOption: public FilterOption
DateTimeFilterOption(QDateTime& val, QDateTimeEdit* w): val(val), w(w)
{
}
void setWidgetValue()
void setWidgetValue() override
{
w->setDateTime(val);
}
void getWidgetValue()
void getWidgetValue() override
{
val = w->dateTime();
}
Expand All @@ -235,11 +235,11 @@ class ComboFilterOption: public FilterOption
ComboFilterOption(int& val, QComboBox* w): val(val), w(w)
{
}
void setWidgetValue()
void setWidgetValue() override
{
w->setCurrentIndex(val);
}
void getWidgetValue()
void getWidgetValue() override
{
val = w->currentIndex();
}
Expand Down Expand Up @@ -302,7 +302,7 @@ class TrackWidget: public FilterWidget
public:
TrackWidget(QWidget* parent, TrackFilterData& tf);

virtual void checkChecks()
void checkChecks() override
{
otherCheckX();
FilterWidget::checkChecks();
Expand Down
8 changes: 4 additions & 4 deletions gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class MainWindow: public QMainWindow
QString getFormatNameForExtension(const QString& ext);

protected:
void closeEvent(QCloseEvent*);
void changeEvent(QEvent*);
void closeEvent(QCloseEvent*) override;
void changeEvent(QEvent*) override;

private slots:
void aboutActionX();
Expand All @@ -118,8 +118,8 @@ private slots:
void browseOutputFile();
void closeActionX();
void donateActionX();
void dragEnterEvent(QDragEnterEvent*);
void dropEvent(QDropEvent* event);
void dragEnterEvent(QDragEnterEvent*) override;
void dropEvent(QDropEvent* event) override;
void filtersClicked();
void helpActionX();
void inputDeviceOptBtnClicked();
Expand Down
2 changes: 1 addition & 1 deletion gui/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public slots:


protected:
virtual void resizeEvent(QResizeEvent* event);
void resizeEvent(QResizeEvent* event) override;

};

Expand Down
20 changes: 10 additions & 10 deletions gui/setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class IntSetting: public VarSetting
{
public:
IntSetting(const QString& name, int& var): name_(name), var_(var) { }
void saveSetting(QSettings& st)
void saveSetting(QSettings& st) override
{
st.setValue(name_, var_);
}
void restoreSetting(QSettings& st)
void restoreSetting(QSettings& st) override
{
if (st.contains(name_)) {
var_ = st.value(name_).toInt();
Expand All @@ -65,11 +65,11 @@ class DoubleSetting: public VarSetting
{
public:
DoubleSetting(const QString& name, double& var): name_(name), var_(var) { }
void saveSetting(QSettings& st)
void saveSetting(QSettings& st) override
{
st.setValue(name_, var_);
}
void restoreSetting(QSettings& st)
void restoreSetting(QSettings& st) override
{
if (st.contains(name_)) {
var_ = st.value(name_).toDouble();
Expand All @@ -86,11 +86,11 @@ class StringSetting: public VarSetting
{
public:
StringSetting(const QString& name, QString& var): name_(name), var_(var) { }
void saveSetting(QSettings& st)
void saveSetting(QSettings& st) override
{
st.setValue(name_, var_);
}
void restoreSetting(QSettings& st)
void restoreSetting(QSettings& st) override
{
if (st.contains(name_)) {
var_ = st.value(name_).toString();
Expand All @@ -107,11 +107,11 @@ class BoolSetting: public VarSetting
{
public:
BoolSetting(const QString& name, bool& var): name_(name), var_(var) { }
void saveSetting(QSettings& st)
void saveSetting(QSettings& st) override
{
st.setValue(name_, var_);
}
void restoreSetting(QSettings& st)
void restoreSetting(QSettings& st) override
{
if (st.contains(name_)) {
var_ = st.value(name_).toBool();
Expand All @@ -128,11 +128,11 @@ class DateTimeSetting: public VarSetting
{
public:
DateTimeSetting(const QString& name, QDateTime& var): name_(name), var_(var) { }
void saveSetting(QSettings& st)
void saveSetting(QSettings& st) override
{
st.setValue(name_, var_);
}
void restoreSetting(QSettings& st)
void restoreSetting(QSettings& st) override
{
if (st.contains(name_)) {
var_ = st.value(name_).toDateTime();
Expand Down

0 comments on commit a0a09f6

Please sign in to comment.