diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-30 22:14:24 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-19 10:33:12 +0000 |
commit | c27d4981e9c7ea441729cf7a955c0d44efa9aac3 (patch) | |
tree | 5cf457e94084917f75b51fc9195ad3e1ef0a58a0 /src/widgets/dialogs | |
parent | efeab107bfd631b9e372f4d69923f2f788919467 (diff) |
Fix nullptr literal 0s which would look odd as nullptr
These all invoke the QFlags<>(Zero *) ctor, which is designed to
accept a 0, but no other int. But in doing so, it requires passing
a nullptr literal, and 0 is not a nullptr literal accepted under
-Wzero-as-null-pointer-constant or similar warnings.
Fix by using the QFlags::QFlags() ctor instead.
Task-number: QTBUG-45291
Change-Id: I73f9c9f4de11eeb1ba04ace6c7121d17510ea29f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.h | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qfiledialog.h | 12 | ||||
-rw-r--r-- | src/widgets/dialogs/qfontdialog.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index fdb5bf55f0..de18e6f9ed 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -83,7 +83,7 @@ public: static QColor getColor(const QColor &initial = Qt::white, QWidget *parent = Q_NULLPTR, const QString &title = QString(), - ColorDialogOptions options = 0); + ColorDialogOptions options = ColorDialogOptions()); // obsolete static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = Q_NULLPTR, QWidget *parent = Q_NULLPTR); diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index bba8c5f3c7..ffe49a2dd2 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -205,14 +205,14 @@ public: const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0); + Options options = Options()); static QUrl getOpenFileUrl(QWidget *parent = Q_NULLPTR, const QString &caption = QString(), const QUrl &dir = QUrl(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0, + Options options = Options(), const QStringList &supportedSchemes = QStringList()); static QString getSaveFileName(QWidget *parent = Q_NULLPTR, @@ -220,14 +220,14 @@ public: const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0); + Options options = Options()); static QUrl getSaveFileUrl(QWidget *parent = Q_NULLPTR, const QString &caption = QString(), const QUrl &dir = QUrl(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0, + Options options = Options(), const QStringList &supportedSchemes = QStringList()); static QString getExistingDirectory(QWidget *parent = Q_NULLPTR, @@ -246,14 +246,14 @@ public: const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0); + Options options = Options()); static QList<QUrl> getOpenFileUrls(QWidget *parent = Q_NULLPTR, const QString &caption = QString(), const QUrl &dir = QUrl(), const QString &filter = QString(), QString *selectedFilter = Q_NULLPTR, - Options options = 0, + Options options = Options(), const QStringList &supportedSchemes = QStringList()); diff --git a/src/widgets/dialogs/qfontdialog.h b/src/widgets/dialogs/qfontdialog.h index b61137e4d0..c3c3050174 100644 --- a/src/widgets/dialogs/qfontdialog.h +++ b/src/widgets/dialogs/qfontdialog.h @@ -86,7 +86,7 @@ public: static QFont getFont(bool *ok, QWidget *parent = Q_NULLPTR); static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = Q_NULLPTR, const QString &title = QString(), - FontDialogOptions options = 0); + FontDialogOptions options = FontDialogOptions()); Q_SIGNALS: void currentFontChanged(const QFont &font); |