diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-27 13:44:22 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-27 13:44:22 +0100 |
commit | ce050716c2e4f1dd56fbd3fa3290bfe258ea1af6 (patch) | |
tree | 08fd568718b2d664003ae65513b940942a808b0e /src/forms | |
parent | Using boost::program_options instead of libconfig (diff) | |
download | smolbote-ce050716c2e4f1dd56fbd3fa3290bfe258ea1af6.tar.xz |
Passing unknown command line parameters to the Configuration
- no longer compiling CookiesForm that we don't use
Diffstat (limited to 'src/forms')
-rw-r--r-- | src/forms/aboutdialog.cpp | 9 | ||||
-rw-r--r-- | src/forms/aboutdialog.h | 2 |
2 files changed, 5 insertions, 6 deletions
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 <boost/version.hpp> -// 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 *>(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; |