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 <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
c3addaca17
commit
9cb68cdea0
@ -356,12 +356,12 @@ class Q_OPENGL_EXPORT QGLWidget : public QWidget
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QGLWidget)
|
||||
public:
|
||||
explicit QGLWidget(QWidget* parent=0,
|
||||
const QGLWidget* shareWidget = 0, Qt::WindowFlags f=0);
|
||||
explicit QGLWidget(QGLContext *context, QWidget* parent=0,
|
||||
const QGLWidget* shareWidget = 0, Qt::WindowFlags f=0);
|
||||
explicit QGLWidget(const QGLFormat& format, QWidget* parent=0,
|
||||
const QGLWidget* shareWidget = 0, Qt::WindowFlags f=0);
|
||||
explicit QGLWidget(QWidget* parent=Q_NULLPTR,
|
||||
const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
|
||||
explicit QGLWidget(QGLContext *context, QWidget* parent=Q_NULLPTR,
|
||||
const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
|
||||
explicit QGLWidget(const QGLFormat& format, QWidget* parent=Q_NULLPTR,
|
||||
const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
|
||||
~QGLWidget();
|
||||
|
||||
void qglColor(const QColor& c) const;
|
||||
@ -442,9 +442,9 @@ protected:
|
||||
|
||||
QGLWidget(QGLWidgetPrivate &dd,
|
||||
const QGLFormat &format = QGLFormat(),
|
||||
QWidget *parent = 0,
|
||||
const QGLWidget* shareWidget = 0,
|
||||
Qt::WindowFlags f = 0);
|
||||
QWidget *parent = Q_NULLPTR,
|
||||
const QGLWidget* shareWidget = Q_NULLPTR,
|
||||
Qt::WindowFlags f = Qt::WindowFlags());
|
||||
private:
|
||||
Q_DISABLE_COPY(QGLWidget)
|
||||
|
||||
|
@ -52,8 +52,9 @@ class Q_PRINTSUPPORT_EXPORT QPrintPreviewDialog : public QDialog
|
||||
Q_DECLARE_PRIVATE(QPrintPreviewDialog)
|
||||
|
||||
public:
|
||||
explicit QPrintPreviewDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QPrintPreviewDialog(QPrinter *printer, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QPrintPreviewDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
explicit QPrintPreviewDialog(QPrinter *printer, QWidget *parent = Q_NULLPTR,
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QPrintPreviewDialog();
|
||||
|
||||
using QDialog::open;
|
||||
|
@ -62,8 +62,9 @@ public:
|
||||
FitInView
|
||||
};
|
||||
|
||||
explicit QPrintPreviewWidget(QPrinter *printer, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QPrintPreviewWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QPrintPreviewWidget(QPrinter *printer, QWidget *parent = Q_NULLPTR,
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
explicit QPrintPreviewWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QPrintPreviewWidget();
|
||||
|
||||
qreal zoomFactor() const;
|
||||
|
@ -51,7 +51,7 @@ class Q_WIDGETS_EXPORT QDialog : public QWidget
|
||||
Q_PROPERTY(bool modal READ isModal WRITE setModal)
|
||||
|
||||
public:
|
||||
explicit QDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
|
||||
explicit QDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~QDialog();
|
||||
|
||||
enum DialogCode { Rejected, Accepted };
|
||||
@ -90,7 +90,7 @@ public Q_SLOTS:
|
||||
void showExtension(bool);
|
||||
|
||||
protected:
|
||||
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0);
|
||||
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
|
||||
#if defined(Q_OS_WINCE)
|
||||
bool event(QEvent *e);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -61,9 +61,10 @@ class Q_WIDGETS_EXPORT QProgressDialog : public QDialog
|
||||
Q_PROPERTY(QString labelText READ labelText WRITE setLabelText)
|
||||
|
||||
public:
|
||||
explicit QProgressDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QProgressDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QProgressDialog(const QString &labelText, const QString &cancelButtonText,
|
||||
int minimum, int maximum, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
int minimum, int maximum, QWidget *parent = Q_NULLPTR,
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QProgressDialog();
|
||||
|
||||
void setLabel(QLabel *label);
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
|
||||
Q_DECLARE_FLAGS(WizardOptions, WizardOption)
|
||||
|
||||
explicit QWizard(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QWizard(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QWizard();
|
||||
|
||||
int addPage(QWizardPage *page);
|
||||
|
@ -47,7 +47,7 @@ class Q_WIDGETS_EXPORT QGraphicsProxyWidget : public QGraphicsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QGraphicsProxyWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
|
||||
QGraphicsProxyWidget(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
|
||||
~QGraphicsProxyWidget();
|
||||
|
||||
void setWidget(QWidget *widget);
|
||||
|
@ -192,7 +192,7 @@ public:
|
||||
QGraphicsRectItem *addRect(const QRectF &rect, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsTextItem *addText(const QString &text, const QFont &font = QFont());
|
||||
QGraphicsSimpleTextItem *addSimpleText(const QString &text, const QFont &font = QFont());
|
||||
QGraphicsProxyWidget *addWidget(QWidget *widget, Qt::WindowFlags wFlags = 0);
|
||||
QGraphicsProxyWidget *addWidget(QWidget *widget, Qt::WindowFlags wFlags = Qt::WindowFlags());
|
||||
inline QGraphicsEllipseItem *addEllipse(qreal x, qreal y, qreal w, qreal h, const QPen &pen = QPen(), const QBrush &brush = QBrush())
|
||||
{ return addEllipse(QRectF(x, y, w, h), pen, brush); }
|
||||
inline QGraphicsLineItem *addLine(qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen = QPen())
|
||||
|
@ -74,7 +74,7 @@ class Q_WIDGETS_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphic
|
||||
Q_PROPERTY(bool autoFillBackground READ autoFillBackground WRITE setAutoFillBackground)
|
||||
Q_PROPERTY(QGraphicsLayout* layout READ layout WRITE setLayout NOTIFY layoutChanged)
|
||||
public:
|
||||
QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
|
||||
QGraphicsWidget(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFlags wFlags = Qt::WindowFlags());
|
||||
~QGraphicsWidget();
|
||||
QGraphicsLayout *layout() const;
|
||||
void setLayout(QGraphicsLayout *layout);
|
||||
@ -213,7 +213,7 @@ protected:
|
||||
virtual void ungrabMouseEvent(QEvent *event);
|
||||
virtual void grabKeyboardEvent(QEvent *event);
|
||||
virtual void ungrabKeyboardEvent(QEvent *event);
|
||||
QGraphicsWidget(QGraphicsWidgetPrivate &, QGraphicsItem *parent, Qt::WindowFlags wFlags = 0);
|
||||
QGraphicsWidget(QGraphicsWidgetPrivate &, QGraphicsItem *parent, Qt::WindowFlags wFlags = Qt::WindowFlags());
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QGraphicsWidget)
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
PartialUpdate
|
||||
};
|
||||
|
||||
explicit QOpenGLWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
explicit QOpenGLWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~QOpenGLWidget();
|
||||
|
||||
void setUpdateBehavior(UpdateBehavior updateBehavior);
|
||||
|
@ -203,7 +203,7 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(RenderFlags, RenderFlag)
|
||||
|
||||
explicit QWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
explicit QWidget(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~QWidget();
|
||||
|
||||
int devType() const Q_DECL_OVERRIDE;
|
||||
@ -593,7 +593,7 @@ public:
|
||||
|
||||
QWindow *windowHandle() const;
|
||||
|
||||
static QWidget *createWindowContainer(QWindow *window, QWidget *parent=0, Qt::WindowFlags flags=0);
|
||||
static QWidget *createWindowContainer(QWindow *window, QWidget *parent=Q_NULLPTR, Qt::WindowFlags flags=Qt::WindowFlags());
|
||||
|
||||
friend class QDesktopScreenWidget;
|
||||
|
||||
|
@ -58,8 +58,9 @@ class Q_WIDGETS_EXPORT QDockWidget : public QWidget
|
||||
Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle DESIGNABLE true)
|
||||
|
||||
public:
|
||||
explicit QDockWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QDockWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QDockWidget(const QString &title, QWidget *parent = Q_NULLPTR,
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
explicit QDockWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QDockWidget();
|
||||
|
||||
QWidget *widget() const;
|
||||
|
@ -54,7 +54,7 @@ class Q_WIDGETS_EXPORT QFrame : public QWidget
|
||||
Q_PROPERTY(QRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false)
|
||||
|
||||
public:
|
||||
explicit QFrame(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
explicit QFrame(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~QFrame();
|
||||
|
||||
int frameStyle() const;
|
||||
@ -108,7 +108,7 @@ protected:
|
||||
|
||||
|
||||
protected:
|
||||
QFrame(QFramePrivate &dd, QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
QFrame(QFramePrivate &dd, QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
void initStyleOption(QStyleOptionFrame *option) const;
|
||||
|
||||
private:
|
||||
|
@ -58,8 +58,8 @@ class Q_WIDGETS_EXPORT QLabel : public QFrame
|
||||
Q_PROPERTY(QString selectedText READ selectedText)
|
||||
|
||||
public:
|
||||
explicit QLabel(QWidget *parent=0, Qt::WindowFlags f=0);
|
||||
explicit QLabel(const QString &text, QWidget *parent=0, Qt::WindowFlags f=0);
|
||||
explicit QLabel(QWidget *parent=Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
|
||||
explicit QLabel(const QString &text, QWidget *parent=Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
|
||||
~QLabel();
|
||||
|
||||
QString text() const;
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
Q_ENUM(DockOption)
|
||||
Q_DECLARE_FLAGS(DockOptions, DockOption)
|
||||
|
||||
explicit QMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
explicit QMainWindow(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QMainWindow();
|
||||
|
||||
QSize iconSize() const;
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
QMdiSubWindow *activeSubWindow() const;
|
||||
QList<QMdiSubWindow *> subWindowList(WindowOrder order = CreationOrder) const;
|
||||
|
||||
QMdiSubWindow *addSubWindow(QWidget *widget, Qt::WindowFlags flags = 0);
|
||||
QMdiSubWindow *addSubWindow(QWidget *widget, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
void removeSubWindow(QWidget *widget);
|
||||
|
||||
QBrush background() const;
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(SubWindowOptions, SubWindowOption)
|
||||
|
||||
QMdiSubWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
QMdiSubWindow(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~QMdiSubWindow();
|
||||
|
||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||
|
@ -47,8 +47,8 @@ class Q_WIDGETS_EXPORT QSplashScreen : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = 0);
|
||||
QSplashScreen(QWidget *parent, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = 0);
|
||||
explicit QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
|
||||
QSplashScreen(QWidget *parent, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags());
|
||||
virtual ~QSplashScreen();
|
||||
|
||||
void setPixmap(const QPixmap &pixmap);
|
||||
|
@ -51,7 +51,7 @@ class Q_WIDGETS_EXPORT QToolBox : public QFrame
|
||||
Q_PROPERTY(int count READ count)
|
||||
|
||||
public:
|
||||
explicit QToolBox(QWidget *parent = 0, Qt::WindowFlags f = 0);
|
||||
explicit QToolBox(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~QToolBox();
|
||||
|
||||
int addItem(QWidget *widget, const QString &text);
|
||||
|
Loading…
Reference in New Issue
Block a user