aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/aboutdialog.cpp9
-rw-r--r--src/forms/aboutdialog.h2
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;