From ce050716c2e4f1dd56fbd3fa3290bfe258ea1af6 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 27 Jan 2018 13:44:22 +0100 Subject: Passing unknown command line parameters to the Configuration - no longer compiling CookiesForm that we don't use --- src/forms/aboutdialog.cpp | 9 ++++----- src/forms/aboutdialog.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/forms') diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp index 89cb23e..5b788bd 100644 --- a/src/forms/aboutdialog.cpp +++ b/src/forms/aboutdialog.cpp @@ -11,10 +11,6 @@ #include "version.h" #include -// The extra level of indirection will allow the preprocessor to expand the macros before they are converted to strings. -#define STRINGIFY(x) #x -#define STR(x) STRINGIFY(x) - // compiler // clang also defines __GNUC__, so we need to check for clang first #if defined(__clang__) @@ -32,7 +28,10 @@ AboutDialog::AboutDialog(QWidget *parent) setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(this); - ui->icon->setPixmap(qApp->windowIcon().pixmap(72, 72)); + // clang-tidy: don't use static_cast to downcast from a base to a derived class, + // use dynamic_cast instead + //ui->icon->setPixmap(qApp->windowIcon().pixmap(72, 72)); + ui->icon->setPixmap(dynamic_cast(QApplication::instance())->windowIcon().pixmap(72, 72)); auto *aboutLabel = new QLabel(this); aboutLabel->setWordWrap(true); diff --git a/src/forms/aboutdialog.h b/src/forms/aboutdialog.h index 1a1b4eb..3175939 100644 --- a/src/forms/aboutdialog.h +++ b/src/forms/aboutdialog.h @@ -22,7 +22,7 @@ class AboutDialog : public QDialog public: explicit AboutDialog(QWidget *parent = nullptr); - ~AboutDialog(); + ~AboutDialog() override; private: Ui::AboutDialog *ui; -- cgit v1.2.1