From 9cb68cdea0fbf646315d972d8926b8d55c87cb02 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 1 Jul 2015 14:47:33 +0200 Subject: Make QWidget *=0, Qt::WindowFlags f=0 functions use Q_NULLPTR This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: If9721e8b1ab3b4cd6e3e366362cae314f451bbed Reviewed-by: Giuseppe D'Angelo --- src/widgets/dialogs/qinputdialog.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/widgets/dialogs/qinputdialog.h') diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h index 84130d5f90..600f6c9753 100644 --- a/src/widgets/dialogs/qinputdialog.h +++ b/src/widgets/dialogs/qinputdialog.h @@ -83,7 +83,7 @@ public: DoubleInput }; - QInputDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); + QInputDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); ~QInputDialog(); void setInputMode(InputMode mode); @@ -153,27 +153,29 @@ public: static QString getText(QWidget *parent, const QString &title, const QString &label, QLineEdit::EchoMode echo = QLineEdit::Normal, - const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0, + const QString &text = QString(), bool *ok = Q_NULLPTR, + Qt::WindowFlags flags = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone); static QString getMultiLineText(QWidget *parent, const QString &title, const QString &label, - const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0, - Qt::InputMethodHints inputMethodHints = Qt::ImhNone); + const QString &text = QString(), bool *ok = Q_NULLPTR, + Qt::WindowFlags flags = Qt::WindowFlags(), + Qt::InputMethodHints inputMethodHints = Qt::ImhNone); static QString getItem(QWidget *parent, const QString &title, const QString &label, const QStringList &items, int current = 0, bool editable = true, - bool *ok = 0, Qt::WindowFlags flags = 0, + bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone); static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, - int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0); + int step = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); static double getDouble(QWidget *parent, const QString &title, const QString &label, double value = 0, double minValue = -2147483647, double maxValue = 2147483647, - int decimals = 1, bool *ok = 0, Qt::WindowFlags flags = 0); + int decimals = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()); #if QT_DEPRECATED_SINCE(5, 0) QT_DEPRECATED static inline int getInteger(QWidget *parent, const QString &title, const QString &label, int value = 0, int minValue = -2147483647, int maxValue = 2147483647, - int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0) + int step = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()) { return getInt(parent, title, label, value, minValue, maxValue, step, ok, flags); } -- cgit v1.2.3