Add the override classifier for some overridden functions (#4674)

To fix the next compilation warning inconsistent-missing-override: "'xxx' overrides a member function but is not marked 'override'".
This commit is contained in:
Dmytro
2025-07-21 07:46:16 -07:00
committed by GitHub
parent f9929c9f7a
commit e48921be90
4 changed files with 12 additions and 12 deletions

View File

@@ -220,7 +220,7 @@ public:
bool operator< (GcWindow right) const { return geometry().x() < right.geometry().x(); }
// we paint a heading if there is space in the top margin
void paintEvent (QPaintEvent * event);
void paintEvent (QPaintEvent * event) override;
// mouse actions -- resizing and dragging tiles
//bool eventFilter(QObject *object, QEvent *e);

View File

@@ -252,14 +252,14 @@ class MetricOverviewItem : public ChartSpaceItem
MetricOverviewItem(ChartSpace *parent, QString name, QString symbol);
~MetricOverviewItem();
void itemPaint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
void itemGeometryChanged();
void setData(RideItem *item);
void setDateRange(DateRange);
void itemPaint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override;
void itemGeometryChanged() override;
void setData(RideItem *item) override;
void setDateRange(DateRange) override;
virtual void displayTileEditMenu(const QPoint& pos) override;
QWidget *config() { return configwidget; }
QWidget *config() override { return configwidget; }
// create and config
static ChartSpaceItem *create(ChartSpace *parent) { return new MetricOverviewItem(parent, "PowerIndex", "power_index"); }

View File

@@ -230,7 +230,7 @@ public:
protected:
double fh() { QFontMetrics fm(baseFont); return fm.height(); }
double spacer() { return (2 * dpiYFactor); }
QSplitterHandle *createHandle() {
QSplitterHandle *createHandle() override {
if (this->tabView)
{
if (this->tabView->viewType() == VIEW_TRAIN)

View File

@@ -112,12 +112,12 @@ class Perspective : public GcWindow
void tabSelected(int id, bool forride);
void tabMoved(int from, int to);
void tabMenu(int index, int x);
virtual void dragEnterEvent(QDragEnterEvent *);
virtual void dropEvent(QDropEvent *);
void resizeEvent(QResizeEvent *);
virtual void dragEnterEvent(QDragEnterEvent *) override;
virtual void dropEvent(QDropEvent *) override;
void resizeEvent(QResizeEvent *) override;
void resize();
void showEvent(QShowEvent *);
bool eventFilter(QObject *object, QEvent *e);
void showEvent(QShowEvent *) override;
bool eventFilter(QObject *object, QEvent *e) override;
// My widget signals and events
void styleChanged(int, bool force=false);