From c97a239c2904080b86c58b85b922ae838b25b4da Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Tue, 9 Jun 2020 23:06:31 +0200 Subject: [PATCH] fix deprecated warning Qt::WindowFlags = nullptr Use default constructor instead Qt::Widget 0x00000000 This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow. --- sources/newelementwizard.h | 2 +- sources/qetmainwindow.h | 2 +- sources/qetprintpreviewdialog.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/newelementwizard.h b/sources/newelementwizard.h index 95f239ef8..bfe59f58b 100644 --- a/sources/newelementwizard.h +++ b/sources/newelementwizard.h @@ -41,7 +41,7 @@ class NewElementWizard : public QWizard // constructors, destructor public: - NewElementWizard(QWidget * = nullptr, Qt::WindowFlags = nullptr); + NewElementWizard(QWidget * = nullptr, Qt::WindowFlags = Qt::Widget); ~NewElementWizard() override; void preselectedLocation(const ElementsLocation &location); diff --git a/sources/qetmainwindow.h b/sources/qetmainwindow.h index 890d542ab..033574401 100644 --- a/sources/qetmainwindow.h +++ b/sources/qetmainwindow.h @@ -28,7 +28,7 @@ class QETMainWindow : public QMainWindow { // constructor, destructor public: - QETMainWindow(QWidget * = nullptr, Qt::WindowFlags = nullptr); + QETMainWindow(QWidget * = nullptr, Qt::WindowFlags = Qt::Widget); ~QETMainWindow() override; // methods diff --git a/sources/qetprintpreviewdialog.h b/sources/qetprintpreviewdialog.h index 4b60109a3..aa6433172 100644 --- a/sources/qetprintpreviewdialog.h +++ b/sources/qetprintpreviewdialog.h @@ -36,7 +36,7 @@ class QETPrintPreviewDialog : public QDialog { // constructors, destructor public: - QETPrintPreviewDialog(QETProject *, QPrinter *, QWidget * = nullptr, Qt::WindowFlags = nullptr); + QETPrintPreviewDialog(QETProject *, QPrinter *, QWidget * = nullptr, Qt::WindowFlags = Qt::Widget); ~QETPrintPreviewDialog() override; private: QETPrintPreviewDialog(const QETPrintPreviewDialog &);