From 5153271278c7f5f96a0893085af4f5bae022cbe3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 6 Aug 2017 17:26:07 -0400 Subject: [PATCH 1/2] ElidedButton: Add missing override specifier on paintEvent() --- Source/Core/DolphinQt2/QtUtils/ElidedButton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/QtUtils/ElidedButton.h b/Source/Core/DolphinQt2/QtUtils/ElidedButton.h index bce6593f8d..96668df145 100644 --- a/Source/Core/DolphinQt2/QtUtils/ElidedButton.h +++ b/Source/Core/DolphinQt2/QtUtils/ElidedButton.h @@ -15,6 +15,6 @@ public: void setElideMode(Qt::TextElideMode elide_mode); private: - void paintEvent(QPaintEvent* event); + void paintEvent(QPaintEvent* event) override; Qt::TextElideMode m_elide_mode; }; From 2363be4c630d58346c80a856d2fdb8d2afaa4eb3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 6 Aug 2017 17:31:26 -0400 Subject: [PATCH 2/2] ElidedButton: Make constructor explicit Prevents implicit conversions to ElidedButton. --- Source/Core/DolphinQt2/QtUtils/ElidedButton.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/QtUtils/ElidedButton.h b/Source/Core/DolphinQt2/QtUtils/ElidedButton.h index 96668df145..4783513d0d 100644 --- a/Source/Core/DolphinQt2/QtUtils/ElidedButton.h +++ b/Source/Core/DolphinQt2/QtUtils/ElidedButton.h @@ -9,8 +9,8 @@ class ElidedButton : public QPushButton { public: - ElidedButton(const QString& text = QStringLiteral(""), - Qt::TextElideMode elide_mode = Qt::ElideRight); + explicit ElidedButton(const QString& text = QStringLiteral(""), + Qt::TextElideMode elide_mode = Qt::ElideRight); Qt::TextElideMode elideMode() const; void setElideMode(Qt::TextElideMode elide_mode);