QtGui: Use Q_NULLPTR instead of 0 in all public headers

This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: I72ab40b21a9499b53a639564fa45884de17b6c98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-06-30 22:11:15 +02:00
parent 08f6b38ec7
commit a767014167
40 changed files with 119 additions and 119 deletions

View File

@ -505,7 +505,7 @@ public:
virtual void virtual_hook(int id, void *data);
virtual void *interface_cast(QAccessible::InterfaceType)
{ return 0; }
{ return Q_NULLPTR; }
protected:
friend class QAccessibleCache;
@ -676,7 +676,7 @@ public:
}
inline QAccessibleEvent(QAccessibleInterface *iface, QAccessible::Event typ)
: m_type(typ), m_object(0)
: m_type(typ), m_object(Q_NULLPTR)
{
Q_ASSERT(iface);
Q_ASSERT(m_type != QAccessible::ValueChanged);

View File

@ -59,7 +59,7 @@ class Q_GUI_EXPORT QAccessibleBridgePlugin : public QObject
{
Q_OBJECT
public:
explicit QAccessibleBridgePlugin(QObject *parent = 0);
explicit QAccessibleBridgePlugin(QObject *parent = Q_NULLPTR);
~QAccessibleBridgePlugin();
virtual QAccessibleBridge *create(const QString &key) = 0;

View File

@ -53,7 +53,7 @@ class Q_GUI_EXPORT QAccessiblePlugin : public QObject
{
Q_OBJECT
public:
explicit QAccessiblePlugin(QObject *parent = 0);
explicit QAccessiblePlugin(QObject *parent = Q_NULLPTR);
~QAccessiblePlugin();
virtual QAccessibleInterface *create(const QString &key, QObject *object) = 0;

View File

@ -48,7 +48,7 @@ public:
QBitmap(const QPixmap &);
QBitmap(int w, int h);
explicit QBitmap(const QSize &);
explicit QBitmap(const QString &fileName, const char *format=0);
explicit QBitmap(const QString &fileName, const char *format = Q_NULLPTR);
~QBitmap();
QBitmap &operator=(const QPixmap &);

View File

@ -48,7 +48,7 @@ class Q_GUI_EXPORT QIconEnginePlugin : public QObject
{
Q_OBJECT
public:
QIconEnginePlugin(QObject *parent = 0);
QIconEnginePlugin(QObject *parent = Q_NULLPTR);
~QIconEnginePlugin();
virtual QIconEngine *create(const QString &filename = QString()) = 0;

View File

@ -125,15 +125,15 @@ public:
QImage() Q_DECL_NOEXCEPT;
QImage(const QSize &size, Format format);
QImage(int width, int height, Format format);
QImage(uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
QImage(const uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
QImage(uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
QImage(const uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
QImage(uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = Q_NULLPTR, void *cleanupInfo = Q_NULLPTR);
QImage(const uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = Q_NULLPTR, void *cleanupInfo = Q_NULLPTR);
QImage(uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = Q_NULLPTR, void *cleanupInfo = Q_NULLPTR);
QImage(const uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = Q_NULLPTR, void *cleanupInfo = Q_NULLPTR);
#ifndef QT_NO_IMAGEFORMAT_XPM
explicit QImage(const char * const xpm[]);
#endif
explicit QImage(const QString &fileName, const char *format = 0);
explicit QImage(const QString &fileName, const char *format = Q_NULLPTR);
QImage(const QImage &);
#ifdef Q_COMPILER_RVALUE_REFS
@ -279,16 +279,16 @@ public:
bool load(QIODevice *device, const char* format);
bool load(const QString &fileName, const char* format=0);
bool loadFromData(const uchar *buf, int len, const char *format = 0);
inline bool loadFromData(const QByteArray &data, const char* aformat=0)
bool load(const QString &fileName, const char *format = Q_NULLPTR);
bool loadFromData(const uchar *buf, int len, const char *format = Q_NULLPTR);
inline bool loadFromData(const QByteArray &data, const char *aformat = Q_NULLPTR)
{ return loadFromData(reinterpret_cast<const uchar *>(data.constData()), data.size(), aformat); }
bool save(const QString &fileName, const char* format=0, int quality=-1) const;
bool save(QIODevice *device, const char* format=0, int quality=-1) const;
bool save(const QString &fileName, const char *format = Q_NULLPTR, int quality = -1) const;
bool save(QIODevice *device, const char *format = Q_NULLPTR, int quality = -1) const;
static QImage fromData(const uchar *data, int size, const char *format = 0);
inline static QImage fromData(const QByteArray &data, const char *format = 0)
static QImage fromData(const uchar *data, int size, const char *format = Q_NULLPTR);
inline static QImage fromData(const QByteArray &data, const char *format = Q_NULLPTR)
{ return fromData(reinterpret_cast<const uchar *>(data.constData()), data.size(), format); }
#if QT_DEPRECATED_SINCE(5, 0)

View File

@ -133,7 +133,7 @@ class Q_GUI_EXPORT QImageIOPlugin : public QObject
{
Q_OBJECT
public:
explicit QImageIOPlugin(QObject *parent = 0);
explicit QImageIOPlugin(QObject *parent = Q_NULLPTR);
virtual ~QImageIOPlugin();
enum Capability {

View File

@ -73,9 +73,9 @@ public:
};
Q_ENUM(CacheMode)
explicit QMovie(QObject *parent = 0);
explicit QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent = 0);
explicit QMovie(const QString &fileName, const QByteArray &format = QByteArray(), QObject *parent = 0);
explicit QMovie(QObject *parent = Q_NULLPTR);
explicit QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent = Q_NULLPTR);
explicit QMovie(const QString &fileName, const QByteArray &format = QByteArray(), QObject *parent = Q_NULLPTR);
~QMovie();
static QList<QByteArray> supportedFormats();

View File

@ -62,10 +62,10 @@ public:
bool play(QPainter *p);
bool load(QIODevice *dev, const char *format = 0);
bool load(const QString &fileName, const char *format = 0);
bool save(QIODevice *dev, const char *format = 0);
bool save(const QString &fileName, const char *format = 0);
bool load(QIODevice *dev, const char *format = Q_NULLPTR);
bool load(const QString &fileName, const char *format = Q_NULLPTR);
bool save(QIODevice *dev, const char *format = Q_NULLPTR);
bool save(const QString &fileName, const char *format = Q_NULLPTR);
QRect boundingRect() const;
void setBoundingRect(const QRect &r);

View File

@ -53,7 +53,7 @@ class Q_GUI_EXPORT QPictureFormatPlugin : public QObject
{
Q_OBJECT
public:
explicit QPictureFormatPlugin(QObject *parent = 0);
explicit QPictureFormatPlugin(QObject *parent = Q_NULLPTR);
~QPictureFormatPlugin();
virtual bool loadPicture(const QString &format, const QString &filename, QPicture *pic);

View File

@ -58,7 +58,7 @@ public:
explicit QPixmap(QPlatformPixmap *data);
QPixmap(int w, int h);
explicit QPixmap(const QSize &);
QPixmap(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
QPixmap(const QString& fileName, const char *format = Q_NULLPTR, Qt::ImageConversionFlags flags = Qt::AutoColor);
#ifndef QT_NO_IMAGEFORMAT_XPM
explicit QPixmap(const char * const xpm[]);
#endif
@ -131,19 +131,19 @@ public:
}
#endif
bool load(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool loadFromData(const uchar *buf, uint len, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
inline bool loadFromData(const QByteArray &data, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool save(const QString& fileName, const char* format = 0, int quality = -1) const;
bool save(QIODevice* device, const char* format = 0, int quality = -1) const;
bool load(const QString& fileName, const char *format = Q_NULLPTR, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool loadFromData(const uchar *buf, uint len, const char* format = Q_NULLPTR, Qt::ImageConversionFlags flags = Qt::AutoColor);
inline bool loadFromData(const QByteArray &data, const char* format = Q_NULLPTR, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool save(const QString& fileName, const char* format = Q_NULLPTR, int quality = -1) const;
bool save(QIODevice* device, const char* format = Q_NULLPTR, int quality = -1) const;
bool convertFromImage(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
inline QPixmap copy(int x, int y, int width, int height) const;
QPixmap copy(const QRect &rect = QRect()) const;
inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0);
void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0);
inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = Q_NULLPTR);
void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = Q_NULLPTR);
#if QT_DEPRECATED_SINCE(5, 0)
QT_DEPRECATED inline int serialNumber() const { return cacheKey() >> 32; }

View File

@ -320,8 +320,8 @@ class Q_GUI_EXPORT QStandardItemModel : public QAbstractItemModel
Q_PROPERTY(int sortRole READ sortRole WRITE setSortRole)
public:
explicit QStandardItemModel(QObject *parent = 0);
QStandardItemModel(int rows, int columns, QObject *parent = 0);
explicit QStandardItemModel(QObject *parent = Q_NULLPTR);
QStandardItemModel(int rows, int columns, QObject *parent = Q_NULLPTR);
~QStandardItemModel();
void setItemRoleNames(const QHash<int,QByteArray> &roleNames);
@ -415,7 +415,7 @@ Q_SIGNALS:
void itemChanged(QStandardItem *item);
protected:
QStandardItemModel(QStandardItemModelPrivate &dd, QObject *parent = 0);
QStandardItemModel(QStandardItemModelPrivate &dd, QObject *parent = Q_NULLPTR);
private:
friend class QStandardItemPrivate;

View File

@ -699,7 +699,7 @@ class Q_GUI_EXPORT QActionEvent : public QEvent
{
QAction *act, *bef;
public:
QActionEvent(int type, QAction *action, QAction *before = 0);
QActionEvent(int type, QAction *action, QAction *before = Q_NULLPTR);
~QActionEvent();
inline QAction *action() const { return act; }
@ -876,7 +876,7 @@ public:
#endif
explicit QTouchEvent(QEvent::Type eventType,
QTouchDevice *device = 0,
QTouchDevice *device = Q_NULLPTR,
Qt::KeyboardModifiers modifiers = Qt::NoModifier,
Qt::TouchPointStates touchPointStates = 0,
const QList<QTouchEvent::TouchPoint> &touchPoints = QList<QTouchEvent::TouchPoint>());

View File

@ -48,7 +48,7 @@ class Q_GUI_EXPORT QGenericPlugin : public QObject
{
Q_OBJECT
public:
explicit QGenericPlugin(QObject *parent = 0);
explicit QGenericPlugin(QObject *parent = Q_NULLPTR);
~QGenericPlugin();
virtual QObject* create(const QString& name, const QString &spec) = 0;

View File

@ -51,7 +51,7 @@ class Q_GUI_EXPORT QOffscreenSurface : public QObject, public QSurface
public:
explicit QOffscreenSurface(QScreen *screen = 0);
explicit QOffscreenSurface(QScreen *screen = Q_NULLPTR);
virtual ~QOffscreenSurface();
SurfaceType surfaceType() const Q_DECL_OVERRIDE;

View File

@ -143,7 +143,7 @@ class Q_GUI_EXPORT QOpenGLContext : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QOpenGLContext)
public:
explicit QOpenGLContext(QObject *parent = 0);
explicit QOpenGLContext(QObject *parent = Q_NULLPTR);
~QOpenGLContext();
void setFormat(const QSurfaceFormat &format);

View File

@ -58,8 +58,8 @@ public:
PartialUpdateBlend
};
explicit QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = 0);
explicit QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = 0);
explicit QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = Q_NULLPTR);
explicit QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = Q_NULLPTR);
~QOpenGLWindow();
UpdateBehavior updateBehavior() const;

View File

@ -46,7 +46,7 @@ class Q_GUI_EXPORT QRasterWindow : public QPaintDeviceWindow
Q_DECLARE_PRIVATE(QRasterWindow)
public:
explicit QRasterWindow(QWindow *parent = 0);
explicit QRasterWindow(QWindow *parent = Q_NULLPTR);
protected:
int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;

View File

@ -125,7 +125,7 @@ public:
};
Q_ENUM(Visibility)
explicit QWindow(QScreen *screen = 0);
explicit QWindow(QScreen *screen = Q_NULLPTR);
explicit QWindow(QWindow *parent);
virtual ~QWindow();
@ -360,12 +360,12 @@ private:
#ifndef Q_QDOC
template <> inline QWindow *qobject_cast<QWindow*>(QObject *o)
{
if (!o || !o->isWindowType()) return 0;
if (!o || !o->isWindowType()) return Q_NULLPTR;
return static_cast<QWindow*>(o);
}
template <> inline const QWindow *qobject_cast<const QWindow*>(const QObject *o)
{
if (!o || !o->isWindowType()) return 0;
if (!o || !o->isWindowType()) return Q_NULLPTR;
return static_cast<const QWindow*>(o);
}
#endif // !Q_QDOC

View File

@ -86,7 +86,7 @@ public:
inline void fill(float value);
double determinant() const;
QMatrix4x4 inverted(bool *invertible = 0) const;
QMatrix4x4 inverted(bool *invertible = Q_NULLPTR) const;
QMatrix4x4 transposed() const;
QMatrix3x3 normalMatrix() const;

View File

@ -118,7 +118,7 @@ public:
void write(int offset, const void *data, int count);
void allocate(const void *data, int count);
inline void allocate(int count) { allocate(0, count); }
inline void allocate(int count) { allocate(Q_NULLPTR, count); }
void *map(QOpenGLBuffer::Access access);
void *mapRange(int offset, int count, QOpenGLBuffer::RangeAccessFlags access);

View File

@ -156,7 +156,7 @@ public:
};
Q_ENUM(LoggingMode)
explicit QOpenGLDebugLogger(QObject *parent = 0);
explicit QOpenGLDebugLogger(QObject *parent = Q_NULLPTR);
~QOpenGLDebugLogger();
bool initialize();

View File

@ -402,7 +402,7 @@ public:
protected:
QOpenGLFunctionsPrivate *d_ptr;
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != 0; }
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != Q_NULLPTR; }
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLFunctions::OpenGLFeatures)

View File

@ -66,7 +66,7 @@ public:
};
Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
explicit QOpenGLShader(QOpenGLShader::ShaderType type, QObject *parent = 0);
explicit QOpenGLShader(QOpenGLShader::ShaderType type, QObject *parent = Q_NULLPTR);
virtual ~QOpenGLShader();
QOpenGLShader::ShaderType shaderType() const;
@ -83,7 +83,7 @@ public:
GLuint shaderId() const;
static bool hasOpenGLShaders(ShaderType type, QOpenGLContext *context = 0);
static bool hasOpenGLShaders(ShaderType type, QOpenGLContext *context = Q_NULLPTR);
private:
friend class QOpenGLShaderProgram;
@ -101,7 +101,7 @@ class Q_GUI_EXPORT QOpenGLShaderProgram : public QObject
{
Q_OBJECT
public:
explicit QOpenGLShaderProgram(QObject *parent = 0);
explicit QOpenGLShaderProgram(QObject *parent = Q_NULLPTR);
virtual ~QOpenGLShaderProgram();
bool addShader(QOpenGLShader *shader);
@ -288,7 +288,7 @@ public:
void setUniformValueArray(const char *name, const QMatrix4x3 *values, int count);
void setUniformValueArray(const char *name, const QMatrix4x4 *values, int count);
static bool hasOpenGLShaderPrograms(QOpenGLContext *context = 0);
static bool hasOpenGLShaderPrograms(QOpenGLContext *context = Q_NULLPTR);
private Q_SLOTS:
void shaderDestroyed();

View File

@ -409,54 +409,54 @@ public:
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setData(int mipLevel, int layer,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setData(int mipLevel,
PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setData(PixelFormat sourceFormat, PixelType sourceType,
void *data, const QOpenGLPixelTransferOptions * const options = 0);
void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setData(int mipLevel, int layer, CubeMapFace cubeFace,
PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = 0);
const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setData(int mipLevel, int layer,
PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = 0);
const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setData(int mipLevel,
PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = 0);
const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setData(PixelFormat sourceFormat, PixelType sourceType,
const void *data, const QOpenGLPixelTransferOptions * const options = 0);
const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
// Compressed data upload
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
QT_DEPRECATED void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setCompressedData(int mipLevel, int layer,
int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setCompressedData(int mipLevel, int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
QT_DEPRECATED void setCompressedData(int dataSize, void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
#endif // QT_DEPRECATED_SINCE(5, 3)
void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,
int dataSize, const void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setCompressedData(int mipLevel, int layer,
int dataSize, const void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setCompressedData(int mipLevel, int dataSize, const void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
void setCompressedData(int dataSize, const void *data,
const QOpenGLPixelTransferOptions * const options = 0);
const QOpenGLPixelTransferOptions * const options = Q_NULLPTR);
// Helpful overloads for setData
void setData(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);

View File

@ -50,7 +50,7 @@ class Q_GUI_EXPORT QOpenGLTimerQuery : public QObject
Q_OBJECT
public:
explicit QOpenGLTimerQuery(QObject *parent = 0);
explicit QOpenGLTimerQuery(QObject *parent = Q_NULLPTR);
~QOpenGLTimerQuery();
bool create();
@ -78,7 +78,7 @@ class Q_GUI_EXPORT QOpenGLTimeMonitor : public QObject
Q_OBJECT
public:
explicit QOpenGLTimeMonitor(QObject *parent = 0);
explicit QOpenGLTimeMonitor(QObject *parent = Q_NULLPTR);
~QOpenGLTimeMonitor();
void setSampleCount(int sampleCount);

View File

@ -123,7 +123,7 @@ class QAbstractOpenGLFunctionsPrivate
{
public:
QAbstractOpenGLFunctionsPrivate()
: owningContext(0),
: owningContext(Q_NULLPTR),
initialized(false)
{}

View File

@ -50,7 +50,7 @@ class Q_GUI_EXPORT QOpenGLVertexArrayObject : public QObject
Q_OBJECT
public:
explicit QOpenGLVertexArrayObject(QObject* parent = 0);
explicit QOpenGLVertexArrayObject(QObject* parent = Q_NULLPTR);
~QOpenGLVertexArrayObject();
bool create();

View File

@ -61,7 +61,7 @@ public:
// 'window' can be a child window, in which case 'region' is in child window coordinates and
// offset is the (child) window's offset in relation to the window surface.
void flush(const QRegion &region, QWindow *window = 0, const QPoint &offset = QPoint());
void flush(const QRegion &region, QWindow *window = Q_NULLPTR, const QPoint &offset = QPoint());
void resize(const QSize &size);
QSize size() const;

View File

@ -102,10 +102,10 @@ public:
void setGreenF(qreal green);
void setBlueF(qreal blue);
void getRgb(int *r, int *g, int *b, int *a = 0) const;
void getRgb(int *r, int *g, int *b, int *a = Q_NULLPTR) const;
void setRgb(int r, int g, int b, int a = 255);
void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = 0) const;
void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = Q_NULLPTR) const;
void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0);
QRgb rgba() const;
@ -129,10 +129,10 @@ public:
qreal hsvSaturationF() const;
qreal valueF() const;
void getHsv(int *h, int *s, int *v, int *a = 0) const;
void getHsv(int *h, int *s, int *v, int *a = Q_NULLPTR) const;
void setHsv(int h, int s, int v, int a = 255);
void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = 0) const;
void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = Q_NULLPTR) const;
void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0);
int cyan() const;
@ -145,10 +145,10 @@ public:
qreal yellowF() const;
qreal blackF() const;
void getCmyk(int *c, int *m, int *y, int *k, int *a = 0);
void getCmyk(int *c, int *m, int *y, int *k, int *a = Q_NULLPTR);
void setCmyk(int c, int m, int y, int k, int a = 255);
void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0);
void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = Q_NULLPTR);
void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
int hslHue() const; // 0 <= hue < 360
@ -159,10 +159,10 @@ public:
qreal hslSaturationF() const;
qreal lightnessF() const;
void getHsl(int *h, int *s, int *l, int *a = 0) const;
void getHsl(int *h, int *s, int *l, int *a = Q_NULLPTR) const;
void setHsl(int h, int s, int l, int a = 255);
void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const;
void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = Q_NULLPTR) const;
void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
QColor toRgb() const;

View File

@ -92,7 +92,7 @@ public:
bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
qreal determinant() const { return _m11*_m22 - _m12*_m21; }
QMatrix inverted(bool *invertible = 0) const Q_REQUIRED_RESULT;
QMatrix inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
bool operator==(const QMatrix &) const;
bool operator!=(const QMatrix &) const;

View File

@ -408,9 +408,9 @@ public:
void drawText(const QPointF &p, const QString &str, int tf, int justificationPadding);
void drawText(const QRectF &r, int flags, const QString &text, QRectF *br=0);
void drawText(const QRect &r, int flags, const QString &text, QRect *br=0);
inline void drawText(int x, int y, int w, int h, int flags, const QString &text, QRect *br=0);
void drawText(const QRectF &r, int flags, const QString &text, QRectF *br = Q_NULLPTR);
void drawText(const QRect &r, int flags, const QString &text, QRect *br = Q_NULLPTR);
inline void drawText(int x, int y, int w, int h, int flags, const QString &text, QRect *br = Q_NULLPTR);
void drawText(const QRectF &r, const QString &text, const QTextOption &o = QTextOption());
@ -453,7 +453,7 @@ public:
static void setRedirected(const QPaintDevice *device, QPaintDevice *replacement,
const QPoint& offset = QPoint());
static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = 0);
static QPaintDevice *redirected(const QPaintDevice *device, QPoint *offset = Q_NULLPTR);
static void restoreRedirected(const QPaintDevice *device);
void beginNativePainting();

View File

@ -96,7 +96,7 @@ public:
qreal m21, qreal m22, qreal m23,
qreal m31, qreal m32, qreal m33);
QTransform inverted(bool *invertible = 0) const Q_REQUIRED_RESULT;
QTransform inverted(bool *invertible = Q_NULLPTR) const Q_REQUIRED_RESULT;
QTransform adjoint() const Q_REQUIRED_RESULT;
QTransform transposed() const Q_REQUIRED_RESULT;

View File

@ -90,7 +90,7 @@ public:
QTextDocument *document() const;
void registerHandler(int objectType, QObject *component);
void unregisterHandler(int objectType, QObject *component = 0);
void unregisterHandler(int objectType, QObject *component = Q_NULLPTR);
QTextObjectInterface *handlerForObject(int objectType) const;
Q_SIGNALS:

View File

@ -93,11 +93,11 @@ public:
QRect boundingRect(QChar) const;
QRect boundingRect(const QString &text) const;
QRect boundingRect(const QRect &r, int flags, const QString &text, int tabstops=0, int *tabarray=0) const;
QRect boundingRect(const QRect &r, int flags, const QString &text, int tabstops = 0, int *tabarray = Q_NULLPTR) const;
inline QRect boundingRect(int x, int y, int w, int h, int flags, const QString &text,
int tabstops=0, int *tabarray=0) const
int tabstops = 0, int *tabarray = Q_NULLPTR) const
{ return boundingRect(QRect(x, y, w, h), flags, text, tabstops, tabarray); }
QSize size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const;
QSize size(int flags, const QString& str, int tabstops = 0, int *tabarray = Q_NULLPTR) const;
QRect tightBoundingRect(const QString &text) const;
@ -161,8 +161,8 @@ public:
QRectF boundingRect(const QString &string) const;
QRectF boundingRect(QChar) const;
QRectF boundingRect(const QRectF &r, int flags, const QString& string, int tabstops=0, int *tabarray=0) const;
QSizeF size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const;
QRectF boundingRect(const QRectF &r, int flags, const QString& string, int tabstops = 0, int *tabarray = Q_NULLPTR) const;
QSizeF size(int flags, const QString& str, int tabstops = 0, int *tabarray = Q_NULLPTR) const;
QRectF tightBoundingRect(const QString &text) const;

View File

@ -109,11 +109,11 @@ class Q_GUI_EXPORT QTextDocument : public QObject
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged)
public:
explicit QTextDocument(QObject *parent = 0);
explicit QTextDocument(const QString &text, QObject *parent = 0);
explicit QTextDocument(QObject *parent = Q_NULLPTR);
explicit QTextDocument(const QString &text, QObject *parent = Q_NULLPTR);
~QTextDocument();
QTextDocument *clone(QObject *parent = 0) const;
QTextDocument *clone(QObject *parent = Q_NULLPTR) const;
bool isEmpty() const;
virtual void clear();

View File

@ -62,7 +62,7 @@ class Q_GUI_EXPORT QTextInlineObject
{
public:
QTextInlineObject(int i, QTextEngine *e) : itm(i), eng(e) {}
inline QTextInlineObject() : itm(0), eng(0) {}
inline QTextInlineObject() : itm(0), eng(Q_NULLPTR) {}
inline bool isValid() const { return eng; }
QRectF rect() const;
@ -100,7 +100,7 @@ public:
// does itemization
QTextLayout();
QTextLayout(const QString& text);
QTextLayout(const QString& text, const QFont &font, QPaintDevice *paintdevice = 0);
QTextLayout(const QString& text, const QFont &font, QPaintDevice *paintdevice = Q_NULLPTR);
QTextLayout(const QTextBlock &b);
~QTextLayout();
@ -202,7 +202,7 @@ private:
class Q_GUI_EXPORT QTextLine
{
public:
inline QTextLine() : index(0), eng(0) {}
inline QTextLine() : index(0), eng(Q_NULLPTR) {}
inline bool isValid() const { return eng; }
QRectF rect() const;
@ -247,7 +247,7 @@ public:
int lineNumber() const { return index; }
void draw(QPainter *p, const QPointF &point, const QTextLayout::FormatRange *selection = 0) const;
void draw(QPainter *p, const QPointF &point, const QTextLayout::FormatRange *selection = Q_NULLPTR) const;
#if !defined(QT_NO_RAWFONT)
QList<QGlyphRun> glyphRuns(int from = -1, int length = -1) const;

View File

@ -190,7 +190,7 @@ class Q_GUI_EXPORT QTextBlock
friend class QSyntaxHighlighter;
public:
inline QTextBlock(QTextDocumentPrivate *priv, int b) : p(priv), n(b) {}
inline QTextBlock() : p(0), n(0) {}
inline QTextBlock() : p(Q_NULLPTR), n(0) {}
inline QTextBlock(const QTextBlock &o) : p(o.p), n(o.n) {}
inline QTextBlock &operator=(const QTextBlock &o) { p = o.p; n = o.n; return *this; }
@ -247,7 +247,7 @@ public:
friend class QTextBlock;
iterator(const QTextDocumentPrivate *priv, int begin, int end, int f) : p(priv), b(begin), e(end), n(f) {}
public:
iterator() : p(0), b(0), e(0), n(0) {}
iterator() : p(Q_NULLPTR), b(0), e(0), n(0) {}
iterator(const iterator &o) : p(o.p), b(o.b), e(o.e), n(o.n) {}
QTextFragment fragment() const;
@ -289,7 +289,7 @@ class Q_GUI_EXPORT QTextFragment
{
public:
inline QTextFragment(const QTextDocumentPrivate *priv, int f, int fe) : p(priv), n(f), ne(fe) {}
inline QTextFragment() : p(0), n(0), ne(0) {}
inline QTextFragment() : p(Q_NULLPTR), n(0), ne(0) {}
inline QTextFragment(const QTextFragment &o) : p(o.p), n(o.n), ne(o.ne) {}
inline QTextFragment &operator=(const QTextFragment &o) { p = o.p; n = o.n; ne = o.ne; return *this; }

View File

@ -48,7 +48,7 @@ class QTextTablePrivate;
class Q_GUI_EXPORT QTextTableCell
{
public:
QTextTableCell() : table(0) {}
QTextTableCell() : table(Q_NULLPTR) {}
~QTextTableCell() {}
QTextTableCell(const QTextTableCell &o) : table(o.table), fragment(o.fragment) {}
QTextTableCell &operator=(const QTextTableCell &o)
@ -63,7 +63,7 @@ public:
int rowSpan() const;
int columnSpan() const;
inline bool isValid() const { return table != 0; }
inline bool isValid() const { return table != Q_NULLPTR; }
QTextCursor firstCursorPosition() const;
QTextCursor lastCursorPosition() const;

View File

@ -52,7 +52,7 @@ class Q_GUI_EXPORT QValidator : public QObject
{
Q_OBJECT
public:
explicit QValidator(QObject * parent = 0);
explicit QValidator(QObject * parent = Q_NULLPTR);
~QValidator();
enum State {
@ -86,8 +86,8 @@ class Q_GUI_EXPORT QIntValidator : public QValidator
Q_PROPERTY(int top READ top WRITE setTop NOTIFY topChanged)
public:
explicit QIntValidator(QObject * parent = 0);
QIntValidator(int bottom, int top, QObject *parent = 0);
explicit QIntValidator(QObject * parent = Q_NULLPTR);
QIntValidator(int bottom, int top, QObject *parent = Q_NULLPTR);
~QIntValidator();
QValidator::State validate(QString &, int &) const Q_DECL_OVERRIDE;
@ -123,8 +123,8 @@ class Q_GUI_EXPORT QDoubleValidator : public QValidator
Q_PROPERTY(Notation notation READ notation WRITE setNotation NOTIFY notationChanged)
public:
explicit QDoubleValidator(QObject * parent = 0);
QDoubleValidator(double bottom, double top, int decimals, QObject *parent = 0);
explicit QDoubleValidator(QObject * parent = Q_NULLPTR);
QDoubleValidator(double bottom, double top, int decimals, QObject *parent = Q_NULLPTR);
~QDoubleValidator();
enum Notation {
@ -167,8 +167,8 @@ class Q_GUI_EXPORT QRegExpValidator : public QValidator
Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp NOTIFY regExpChanged)
public:
explicit QRegExpValidator(QObject *parent = 0);
explicit QRegExpValidator(const QRegExp& rx, QObject *parent = 0);
explicit QRegExpValidator(QObject *parent = Q_NULLPTR);
explicit QRegExpValidator(const QRegExp& rx, QObject *parent = Q_NULLPTR);
~QRegExpValidator();
virtual QValidator::State validate(QString& input, int& pos) const Q_DECL_OVERRIDE;
@ -197,8 +197,8 @@ class Q_GUI_EXPORT QRegularExpressionValidator : public QValidator
Q_PROPERTY(QRegularExpression regularExpression READ regularExpression WRITE setRegularExpression NOTIFY regularExpressionChanged)
public:
explicit QRegularExpressionValidator(QObject *parent = 0);
explicit QRegularExpressionValidator(const QRegularExpression &re, QObject *parent = 0);
explicit QRegularExpressionValidator(QObject *parent = Q_NULLPTR);
explicit QRegularExpressionValidator(const QRegularExpression &re, QObject *parent = Q_NULLPTR);
~QRegularExpressionValidator();
virtual QValidator::State validate(QString &input, int &pos) const Q_DECL_OVERRIDE;