OSDN Git Service

0 to Q_NULLPTR, incomplete
authorIvailo Monev <xakepa10@laimg.moc>
Thu, 3 Nov 2016 22:13:13 +0000 (22:13 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Thu, 3 Nov 2016 22:13:13 +0000 (22:13 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
48 files changed:
src/core/animation/qabstractanimation.h
src/core/animation/qanimationgroup.h
src/core/animation/qparallelanimationgroup.h
src/core/animation/qpauseanimation.h
src/core/animation/qpropertyanimation.h
src/core/animation/qsequentialanimationgroup.h
src/core/animation/qvariantanimation.h
src/core/codecs/qtextcodecplugin.h
src/core/concurrent/qfuturewatcher.h
src/core/concurrent/qthreadpool.h
src/core/global/qglobal.h.cmake
src/core/io/qbuffer.h
src/core/io/qfile.h
src/core/io/qfileinfo.cpp
src/core/io/qfilesystemwatcher.h
src/core/io/qiodevice.h
src/core/io/qprocess.h
src/core/io/qsettings.h
src/core/io/qtextstream.cpp
src/core/kernel/qabstracteventdispatcher.h
src/core/kernel/qabstractitemmodel.cpp
src/core/kernel/qabstractitemmodel.h
src/core/kernel/qeventdispatcher_glib_p.h
src/core/kernel/qeventdispatcher_unix_p.h
src/core/kernel/qeventloop.h
src/core/kernel/qobject.h
src/core/kernel/qobjectdefs.h
src/core/kernel/qsharedmemory.h
src/core/kernel/qsignalmapper.h
src/core/kernel/qsocketnotifier.h
src/core/kernel/qtimer.h
src/core/kernel/qtranslator.h
src/core/kernel/qvariant.h
src/core/plugin/qlibrary.h
src/core/plugin/qpluginloader.h
src/core/thread/qthread.h
src/core/tools/qbytearray.h
src/core/tools/qlocale.cpp
src/core/tools/qlocale.h
src/core/tools/qlocale_tools.cpp
src/core/tools/qscopedpointer.h
src/core/tools/qsharedpointer_impl.h
src/core/tools/qstring.cpp
src/core/tools/qstring.h
src/core/tools/qtimeline.h
src/tools/moc/generator.cpp
src/tools/moc/parser.cpp
src/tools/moc/parser.h

index 40b2b43..267edcf 100644 (file)
@@ -84,7 +84,7 @@ public:
         DeleteWhenStopped
     };
 
-    QAbstractAnimation(QObject *parent = 0);
+    QAbstractAnimation(QObject *parent = Q_NULLPTR);
     virtual ~QAbstractAnimation();
 
     State state() const;
@@ -119,7 +119,7 @@ public Q_SLOTS:
     void setCurrentTime(int msecs);
 
 protected:
-    QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = 0);
+    QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = Q_NULLPTR);
     bool event(QEvent *event);
 
     virtual void updateCurrentTime(int currentTime) = 0;
@@ -138,7 +138,7 @@ class Q_CORE_EXPORT QAnimationDriver : public QObject
     Q_DECLARE_PRIVATE(QAnimationDriver)
 
 public:
-    QAnimationDriver(QObject *parent = 0);
+    QAnimationDriver(QObject *parent = Q_NULLPTR);
 
     void advance();
     void install();
@@ -149,7 +149,7 @@ protected:
     virtual void started() {};
     virtual void stopped() {};
 
-    QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = 0);
+    QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = Q_NULLPTR);
 
 private:
     friend class QUnifiedTimer;
index 755b2ed..1e9afd5 100644 (file)
@@ -56,7 +56,7 @@ class Q_CORE_EXPORT QAnimationGroup : public QAbstractAnimation
     Q_OBJECT
 
 public:
-    QAnimationGroup(QObject *parent = 0);
+    QAnimationGroup(QObject *parent = Q_NULLPTR);
     ~QAnimationGroup();
 
     QAbstractAnimation *animationAt(int index) const;
index 858812e..537f601 100644 (file)
@@ -57,7 +57,7 @@ class Q_CORE_EXPORT QParallelAnimationGroup : public QAnimationGroup
     Q_OBJECT
 
 public:
-    QParallelAnimationGroup(QObject *parent = 0);
+    QParallelAnimationGroup(QObject *parent = Q_NULLPTR);
     ~QParallelAnimationGroup();
 
     int duration() const;
index 215322f..427be97 100644 (file)
@@ -58,8 +58,8 @@ class Q_CORE_EXPORT QPauseAnimation : public QAbstractAnimation
     Q_OBJECT
     Q_PROPERTY(int duration READ duration WRITE setDuration)
 public:
-    QPauseAnimation(QObject *parent = 0);
-    QPauseAnimation(int msecs, QObject *parent = 0);
+    QPauseAnimation(QObject *parent = Q_NULLPTR);
+    QPauseAnimation(int msecs, QObject *parent = Q_NULLPTR);
     ~QPauseAnimation();
 
     int duration() const;
index efe71d1..8b1272c 100644 (file)
@@ -58,8 +58,8 @@ class Q_CORE_EXPORT QPropertyAnimation : public QVariantAnimation
     Q_PROPERTY(QObject* targetObject READ targetObject WRITE setTargetObject)
 
 public:
-    QPropertyAnimation(QObject *parent = 0);
-    QPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = 0);
+    QPropertyAnimation(QObject *parent = Q_NULLPTR);
+    QPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = Q_NULLPTR);
     ~QPropertyAnimation();
 
     QObject *targetObject() const;
index 3e4cf7b..8f7fa10 100644 (file)
@@ -59,7 +59,7 @@ class Q_CORE_EXPORT QSequentialAnimationGroup : public QAnimationGroup
     Q_PROPERTY(QAbstractAnimation* currentAnimation READ currentAnimation NOTIFY currentAnimationChanged)
 
 public:
-    QSequentialAnimationGroup(QObject *parent = 0);
+    QSequentialAnimationGroup(QObject *parent = Q_NULLPTR);
     ~QSequentialAnimationGroup();
 
     QPauseAnimation *addPause(int msecs);
index 5f5a022..36f9445 100644 (file)
@@ -68,7 +68,7 @@ public:
     typedef QPair<qreal, QVariant> KeyValue;
     typedef QVector<KeyValue> KeyValues;
 
-    QVariantAnimation(QObject *parent = 0);
+    QVariantAnimation(QObject *parent = Q_NULLPTR);
     ~QVariantAnimation();
 
     QVariant startValue() const;
@@ -97,7 +97,7 @@ Q_SIGNALS:
     void valueChanged(const QVariant &value);
 
 protected:
-    QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent = 0);
+    QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent = Q_NULLPTR);
     bool event(QEvent *event);
 
     void updateCurrentTime(int);
index 11ab1b4..456f51d 100644 (file)
@@ -68,7 +68,7 @@ class Q_CORE_EXPORT QTextCodecPlugin : public QObject, public QTextCodecFactoryI
     Q_OBJECT
     Q_INTERFACES(QTextCodecFactoryInterface:QFactoryInterface)
 public:
-    explicit QTextCodecPlugin(QObject *parent = 0);
+    explicit QTextCodecPlugin(QObject *parent = Q_NULLPTR);
     ~QTextCodecPlugin();
 
     virtual QList<QByteArray> names() const = 0;
index d4eb49c..ea36c83 100644 (file)
@@ -63,7 +63,7 @@ class Q_CORE_EXPORT QFutureWatcherBase : public QObject
     Q_DECLARE_PRIVATE(QFutureWatcherBase)
 
 public:
-    QFutureWatcherBase(QObject *parent = 0);
+    QFutureWatcherBase(QObject *parent = Q_NULLPTR);
 
     int progressValue() const;
     int progressMinimum() const;
index c721148..5ba46fe 100644 (file)
@@ -61,7 +61,7 @@ class Q_CORE_EXPORT QThreadPool : public QObject
     friend class QFutureInterfaceBase;
 
 public:
-    QThreadPool(QObject *parent = 0);
+    QThreadPool(QObject *parent = Q_NULLPTR);
     ~QThreadPool();
 
     static QThreadPool *globalInstance();
index e9f98e7..ac885f6 100644 (file)
@@ -1332,14 +1332,14 @@ public:
     inline ~QGlobalStaticDeleter()
     {
         delete globalStatic.pointer;
-        globalStatic.pointer = 0;
+        globalStatic.pointer = Q_NULLPTR;
         globalStatic.destroyed = true;
     }
 };
 
 #define Q_GLOBAL_STATIC_INIT(TYPE, NAME)                                      \
         static QGlobalStatic<TYPE > this_ ## NAME                             \
-                            = { QAtomicPointer<TYPE>(0), false }
+                            = { QAtomicPointer<TYPE>(Q_NULLPTR), false }
 
 #define Q_GLOBAL_STATIC(TYPE, NAME)                                           \
     static TYPE *NAME()                                                       \
@@ -1347,7 +1347,7 @@ public:
         Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_);                              \
         if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) {       \
             TYPE *x = new TYPE;                                               \
-            if (!this__StaticVar_.pointer.testAndSetOrdered(0, x))            \
+            if (!this__StaticVar_.pointer.testAndSetOrdered(Q_NULLPTR, x))    \
                 delete x;                                                     \
             else                                                              \
                 static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \
index 4aa27da..babef6b 100644 (file)
@@ -59,8 +59,8 @@ class Q_CORE_EXPORT QBuffer : public QIODevice
 
 public:
 #ifndef QT_NO_QOBJECT
-     explicit QBuffer(QObject *parent = 0);
-     QBuffer(QByteArray *buf, QObject *parent = 0);
+     explicit QBuffer(QObject *parent = Q_NULLPTR);
+     QBuffer(QByteArray *buf, QObject *parent = Q_NULLPTR);
 #else
      QBuffer();
      explicit QBuffer(QByteArray *buf);
index 83ef01b..acd4607 100644 (file)
@@ -175,7 +175,7 @@ protected:
 #ifdef QT_NO_QOBJECT
     QFile(QFilePrivate &dd);
 #else
-    QFile(QFilePrivate &dd, QObject *parent = 0);
+    QFile(QFilePrivate &dd, QObject *parent = Q_NULLPTR);
 #endif
 
     qint64 readData(char *data, qint64 maxlen);
index e2901c8..1c68d86 100644 (file)
@@ -397,7 +397,7 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const
         return true;
 
     Qt::CaseSensitivity sensitive;
-    if (d->fileEngine == 0 || fileinfo.d_ptr->fileEngine == 0) {
+    if (!d->fileEngine || !fileinfo.d_ptr->fileEngine) {
         if (d->fileEngine != fileinfo.d_ptr->fileEngine) // one is native, the other is a custom file-engine
             return false;
 
@@ -609,7 +609,7 @@ bool QFileInfo::isRelative() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return true;
-    if (d->fileEngine == 0)
+    if (!d->fileEngine)
         return d->fileEntry.isRelative();
     return d->fileEngine->isRelativePath();
 }
@@ -642,7 +642,7 @@ bool QFileInfo::exists() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ExistsAttribute);
         return d->metaData.exists();
@@ -828,7 +828,7 @@ bool QFileInfo::isReadable() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserReadPermission))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserReadPermission);
         return (d->metaData.permissions() & QFile::ReadUser) != 0;
@@ -846,7 +846,7 @@ bool QFileInfo::isWritable() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserWritePermission))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserWritePermission);
         return (d->metaData.permissions() & QFile::WriteUser) != 0;
@@ -864,7 +864,7 @@ bool QFileInfo::isExecutable() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserExecutePermission))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserExecutePermission);
         return (d->metaData.permissions() & QFile::ExeUser) != 0;
@@ -883,7 +883,7 @@ bool QFileInfo::isHidden() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::HiddenAttribute))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::HiddenAttribute);
         return d->metaData.isHidden();
@@ -903,7 +903,7 @@ bool QFileInfo::isFile() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::FileType))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::FileType);
         return d->metaData.isFile();
@@ -922,7 +922,7 @@ bool QFileInfo::isDir() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::DirectoryType))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::DirectoryType);
         return d->metaData.isDirectory();
@@ -952,7 +952,7 @@ bool QFileInfo::isSymLink() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::LinkType))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::LinkType);
         return d->metaData.isLink();
@@ -970,7 +970,7 @@ bool QFileInfo::isRoot() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return true;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         return d->fileEntry.isRoot();
     }
     return d->getFileFlags(QAbstractFileEngine::RootFlag);
@@ -1030,7 +1030,7 @@ uint QFileInfo::ownerId() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return 0;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::UserId))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::UserId);
         return d->metaData.userId();
@@ -1069,7 +1069,7 @@ uint QFileInfo::groupId() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return 0;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::GroupId))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::GroupId);
         return d->metaData.groupId();
@@ -1095,7 +1095,7 @@ bool QFileInfo::permission(QFile::Permissions permissions) const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return false;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         // the QFileSystemMetaData::MetaDataFlag and QFile::Permissions overlap, so just static cast.
         QFileSystemMetaData::MetaDataFlag permissionFlags = static_cast<QFileSystemMetaData::MetaDataFlag>((int)permissions);
         if (!d->cache_enabled || !d->metaData.hasFlags(permissionFlags))
@@ -1114,7 +1114,7 @@ QFile::Permissions QFileInfo::permissions() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return 0;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::Permissions))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::Permissions);
         return d->metaData.permissions();
@@ -1134,7 +1134,7 @@ qint64 QFileInfo::size() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return 0;
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::SizeAttribute))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::SizeAttribute);
         return d->metaData.size();
@@ -1164,7 +1164,7 @@ QDateTime QFileInfo::created() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return QDateTime();
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::CreationTime))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::CreationTime);
         return d->metaData.creationTime();
@@ -1182,7 +1182,7 @@ QDateTime QFileInfo::lastModified() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return QDateTime();
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ModificationTime))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::ModificationTime);
         return d->metaData.modificationTime();
@@ -1203,7 +1203,7 @@ QDateTime QFileInfo::lastRead() const
     Q_D(const QFileInfo);
     if (d->isDefaultConstructed)
         return QDateTime();
-    if (d->fileEngine == 0) {
+    if (!d->fileEngine) {
         if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::AccessTime))
             QFileSystemEngine::fillMetaData(d->fileEntry, d->metaData, QFileSystemMetaData::AccessTime);
         return d->metaData.accessTime();
index 1cd077d..d0c5fba 100644 (file)
@@ -59,8 +59,8 @@ class Q_CORE_EXPORT QFileSystemWatcher : public QObject
     Q_DECLARE_PRIVATE(QFileSystemWatcher)
 
 public:
-    QFileSystemWatcher(QObject *parent = 0);
-    QFileSystemWatcher(const QStringList &paths, QObject *parent = 0);
+    QFileSystemWatcher(QObject *parent = Q_NULLPTR);
+    QFileSystemWatcher(const QStringList &paths, QObject *parent = Q_NULLPTR);
     ~QFileSystemWatcher();
 
     void addPath(const QString &file);
index e6d05dd..102816a 100644 (file)
@@ -148,7 +148,7 @@ protected:
 #ifdef QT_NO_QOBJECT
     QIODevice(QIODevicePrivate &dd);
 #else
-    QIODevice(QIODevicePrivate &dd, QObject *parent = 0);
+    QIODevice(QIODevicePrivate &dd, QObject *parent = Q_NULLPTR);
 #endif
     virtual qint64 readData(char *data, qint64 maxlen) = 0;
     virtual qint64 readLineData(char *data, qint64 maxlen);
index 36b66a2..ec99461 100644 (file)
@@ -122,7 +122,7 @@ public:
         CrashExit
     };
 
-    explicit QProcess(QObject *parent = 0);
+    explicit QProcess(QObject *parent = Q_NULLPTR);
     virtual ~QProcess();
 
     void start(const QString &program, const QStringList &arguments, OpenMode mode = ReadWrite);
index d7f9b08..b17d405 100644 (file)
@@ -113,13 +113,13 @@ public:
 
 #ifndef QT_NO_QOBJECT
     explicit QSettings(const QString &organization,
-                       const QString &application = QString(), QObject *parent = 0);
+                       const QString &application = QString(), QObject *parent = Q_NULLPTR);
     QSettings(Scope scope, const QString &organization,
-              const QString &application = QString(), QObject *parent = 0);
+              const QString &application = QString(), QObject *parent = Q_NULLPTR);
     QSettings(Format format, Scope scope, const QString &organization,
-             const QString &application = QString(), QObject *parent = 0);
-    QSettings(const QString &fileName, Format format, QObject *parent = 0);
-    explicit QSettings(QObject *parent = 0);
+             const QString &application = QString(), QObject *parent = Q_NULLPTR);
+    QSettings(const QString &fileName, Format format, QObject *parent = Q_NULLPTR);
+    explicit QSettings(QObject *parent = Q_NULLPTR);
 #else
     explicit QSettings(const QString &organization,
                        const QString &application = QString());
index 565b28e..7394d61 100644 (file)
@@ -488,9 +488,9 @@ void QTextStreamPrivate::reset()
     realNumberNotation = QTextStream::SmartNotation;
     numberFlags = 0;
 
-    device = 0;
+    device = Q_NULLPTR;
     deleteDevice = false;
-    string = 0;
+    string = Q_NULLPTR;
     stringOffset = 0;
     stringOpenMode = QIODevice::NotOpen;
 
@@ -503,7 +503,7 @@ void QTextStreamPrivate::reset()
     resetCodecConverterStateHelper(&readConverterState);
     resetCodecConverterStateHelper(&writeConverterState);
     delete readConverterSavedState;
-    readConverterSavedState = 0;
+    readConverterSavedState = Q_NULLPTR;
     writeConverterState.flags |= QTextCodec::IgnoreHeader;
     autoDetectUnicode = true;
 #endif
index 10f6b78..9b11643 100644 (file)
@@ -60,7 +60,7 @@ class Q_CORE_EXPORT QAbstractEventDispatcher : public QObject
 public:
     typedef QPair<int, int> TimerInfo;
 
-    explicit QAbstractEventDispatcher(QObject *parent = 0);
+    explicit QAbstractEventDispatcher(QObject *parent = Q_NULLPTR);
     ~QAbstractEventDispatcher();
 
     static QAbstractEventDispatcher *instance(QThread *thread = 0);
index 743cb15..19ede50 100644 (file)
@@ -455,7 +455,7 @@ QDebug operator<<(QDebug dbg, const QPersistentModelIndex &idx)
 class QEmptyItemModel : public QAbstractItemModel
 {
 public:
-    explicit QEmptyItemModel(QObject *parent = 0) : QAbstractItemModel(parent) {}
+    explicit QEmptyItemModel(QObject *parent = Q_NULLPTR) : QAbstractItemModel(parent) {}
     QModelIndex index(int, int, const QModelIndex &) const { return QModelIndex(); }
     QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
     int rowCount(const QModelIndex &) const { return 0; }
index c57bae4..7853208 100644 (file)
@@ -161,7 +161,7 @@ class Q_CORE_EXPORT QAbstractItemModel : public QObject
     friend class QIdentityProxyModel;
 public:
 
-    explicit QAbstractItemModel(QObject *parent = 0);
+    explicit QAbstractItemModel(QObject *parent = Q_NULLPTR);
     virtual ~QAbstractItemModel();
 
     bool hasIndex(int row, int column, const QModelIndex &parent = QModelIndex()) const;
@@ -261,7 +261,7 @@ public Q_SLOTS:
     virtual void revert();
 
 protected:
-    QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent = 0);
+    QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent = Q_NULLPTR);
 
     inline QModelIndex createIndex(int row, int column, void *data = 0) const;
     inline QModelIndex createIndex(int row, int column, int id) const;
@@ -329,7 +329,7 @@ class Q_CORE_EXPORT QAbstractTableModel : public QAbstractItemModel
     Q_OBJECT
 
 public:
-    explicit QAbstractTableModel(QObject *parent = 0);
+    explicit QAbstractTableModel(QObject *parent = Q_NULLPTR);
     ~QAbstractTableModel();
 
     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
@@ -349,7 +349,7 @@ class Q_CORE_EXPORT QAbstractListModel : public QAbstractItemModel
     Q_OBJECT
 
 public:
-    explicit QAbstractListModel(QObject *parent = 0);
+    explicit QAbstractListModel(QObject *parent = Q_NULLPTR);
     ~QAbstractListModel();
 
     QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
index 73a582e..3eee4f6 100644 (file)
@@ -68,8 +68,8 @@ class Q_CORE_EXPORT QEventDispatcherGlib : public QAbstractEventDispatcher
     Q_DECLARE_PRIVATE(QEventDispatcherGlib)
 
 public:
-    explicit QEventDispatcherGlib(QObject *parent = 0);
-    explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = 0);
+    explicit QEventDispatcherGlib(QObject *parent = Q_NULLPTR);
+    explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = Q_NULLPTR);
     ~QEventDispatcherGlib();
 
     bool processEvents(QEventLoop::ProcessEventsFlags flags);
index 643c7a1..bf0cf32 100644 (file)
@@ -139,7 +139,7 @@ class Q_CORE_EXPORT QEventDispatcherUNIX : public QAbstractEventDispatcher
     Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
 
 public:
-    explicit QEventDispatcherUNIX(QObject *parent = 0);
+    explicit QEventDispatcherUNIX(QObject *parent = Q_NULLPTR);
     ~QEventDispatcherUNIX();
 
     bool processEvents(QEventLoop::ProcessEventsFlags flags);
@@ -158,7 +158,7 @@ public:
     void flush();
 
 protected:
-    QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = 0);
+    QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = Q_NULLPTR);
 
     void setSocketNotifierPending(QSocketNotifier *notifier);
 
index 597b9c7..565402f 100644 (file)
@@ -57,7 +57,7 @@ class Q_CORE_EXPORT QEventLoop : public QObject
     Q_DECLARE_PRIVATE(QEventLoop)
 
 public:
-    explicit QEventLoop(QObject *parent = 0);
+    explicit QEventLoop(QObject *parent = Q_NULLPTR);
     ~QEventLoop();
 
     enum ProcessEventsFlag {
index 4a59707..b031341 100644 (file)
@@ -233,7 +233,7 @@ protected:
     virtual void connectNotify(const char *signal);
     virtual void disconnectNotify(const char *signal);
 
-    QObject(QObjectPrivate &dd, QObject *parent = 0);
+    QObject(QObjectPrivate &dd, QObject *parent = Q_NULLPTR);
 
     QObjectData* d_ptr;
 
index a46dce3..44f65be 100644 (file)
@@ -235,7 +235,7 @@ class QMetaClassInfo;
 class Q_CORE_EXPORT QGenericArgument
 {
 public:
-    inline QGenericArgument(const char *aName = 0, const void *aData = 0)
+    inline QGenericArgument(const char *aName = Q_NULLPTR, const void *aData = Q_NULLPTR)
         : _data(aData), _name(aName) {}
     inline void *data() const { return const_cast<void *>(_data); }
     inline const char *name() const { return _name; }
@@ -248,7 +248,7 @@ private:
 class Q_CORE_EXPORT QGenericReturnArgument: public QGenericArgument
 {
 public:
-    inline QGenericReturnArgument(const char *aName = 0, void *aData = 0)
+    inline QGenericReturnArgument(const char *aName = Q_NULLPTR, void *aData = Q_NULLPTR)
         : QGenericArgument(aName, aData)
         {}
 };
@@ -329,7 +329,7 @@ struct Q_CORE_EXPORT QMetaObject
     // internal index-based connect
     static bool connect(const QObject *sender, int signal_index,
                         const QObject *receiver, int method_index,
-                        int type = 0, int *types = 0);
+                        int type = 0, int *types = Q_NULLPTR);
     // internal index-based disconnect
     static bool disconnect(const QObject *sender, int signal_index,
                            const QObject *receiver, int method_index);
@@ -345,7 +345,7 @@ struct Q_CORE_EXPORT QMetaObject
     static bool invokeMethod(QObject *obj, const char *member,
                              Qt::ConnectionType,
                              QGenericReturnArgument ret,
-                             QGenericArgument val0 = QGenericArgument(0),
+                             QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
                              QGenericArgument val1 = QGenericArgument(),
                              QGenericArgument val2 = QGenericArgument(),
                              QGenericArgument val3 = QGenericArgument(),
@@ -358,7 +358,7 @@ struct Q_CORE_EXPORT QMetaObject
 
     static inline bool invokeMethod(QObject *obj, const char *member,
                              QGenericReturnArgument ret,
-                             QGenericArgument val0 = QGenericArgument(0),
+                             QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
                              QGenericArgument val1 = QGenericArgument(),
                              QGenericArgument val2 = QGenericArgument(),
                              QGenericArgument val3 = QGenericArgument(),
@@ -375,7 +375,7 @@ struct Q_CORE_EXPORT QMetaObject
 
     static inline bool invokeMethod(QObject *obj, const char *member,
                              Qt::ConnectionType type,
-                             QGenericArgument val0 = QGenericArgument(0),
+                             QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
                              QGenericArgument val1 = QGenericArgument(),
                              QGenericArgument val2 = QGenericArgument(),
                              QGenericArgument val3 = QGenericArgument(),
@@ -391,7 +391,7 @@ struct Q_CORE_EXPORT QMetaObject
     }
 
     static inline bool invokeMethod(QObject *obj, const char *member,
-                             QGenericArgument val0 = QGenericArgument(0),
+                             QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
                              QGenericArgument val1 = QGenericArgument(),
                              QGenericArgument val2 = QGenericArgument(),
                              QGenericArgument val3 = QGenericArgument(),
@@ -406,7 +406,7 @@ struct Q_CORE_EXPORT QMetaObject
                 val1, val2, val3, val4, val5, val6, val7, val8, val9);
     }
 
-    QObject *newInstance(QGenericArgument val0 = QGenericArgument(0),
+    QObject *newInstance(QGenericArgument val0 = QGenericArgument(Q_NULLPTR),
                          QGenericArgument val1 = QGenericArgument(),
                          QGenericArgument val2 = QGenericArgument(),
                          QGenericArgument val3 = QGenericArgument(),
index 80af441..f9869cd 100644 (file)
@@ -78,8 +78,8 @@ public:
         UnknownError
     };
 
-    QSharedMemory(QObject *parent = 0);
-    QSharedMemory(const QString &key, QObject *parent = 0);
+    QSharedMemory(QObject *parent = Q_NULLPTR);
+    QSharedMemory(const QString &key, QObject *parent = Q_NULLPTR);
     ~QSharedMemory();
 
     void setKey(const QString &key);
index 77322d4..c3a9076 100644 (file)
@@ -57,7 +57,7 @@ class Q_CORE_EXPORT QSignalMapper : public QObject
     Q_OBJECT
     Q_DECLARE_PRIVATE(QSignalMapper)
 public:
-    explicit QSignalMapper(QObject *parent = 0);
+    explicit QSignalMapper(QObject *parent = Q_NULLPTR);
     ~QSignalMapper();
 
     void setMapping(QObject *sender, int id);
index 5117f37..9bcae1b 100644 (file)
@@ -57,7 +57,7 @@ class Q_CORE_EXPORT QSocketNotifier : public QObject
 public:
     enum Type { Read, Write, Exception };
 
-    QSocketNotifier(int socket, Type, QObject *parent = 0);
+    QSocketNotifier(int socket, Type, QObject *parent = Q_NULLPTR);
     ~QSocketNotifier();
 
     inline int socket() const { return sockfd; }
index 74c46c7..c331731 100644 (file)
@@ -58,7 +58,7 @@ class Q_CORE_EXPORT QTimer : public QObject
     Q_PROPERTY(int interval READ interval WRITE setInterval)
     Q_PROPERTY(bool active READ isActive)
 public:
-    explicit QTimer(QObject *parent = 0);
+    explicit QTimer(QObject *parent = Q_NULLPTR);
     ~QTimer();
 
     inline bool isActive() const { return id >= 0; }
index bebe474..2b93cce 100644 (file)
@@ -58,7 +58,7 @@ class Q_CORE_EXPORT QTranslator : public QObject
 {
     Q_OBJECT
 public:
-    explicit QTranslator(QObject *parent = 0);
+    explicit QTranslator(QObject *parent = Q_NULLPTR);
     ~QTranslator();
 
     QString translate(const char *context, const char *sourceText,
index 78cf259..0278359 100644 (file)
@@ -236,14 +236,14 @@ class Q_CORE_EXPORT QVariant
     void detach();
     inline bool isDetached() const;
 
-    int toInt(bool *ok = 0) const;
-    uint toUInt(bool *ok = 0) const;
-    qlonglong toLongLong(bool *ok = 0) const;
-    qulonglong toULongLong(bool *ok = 0) const;
+    int toInt(bool *ok = Q_NULLPTR) const;
+    uint toUInt(bool *ok = Q_NULLPTR) const;
+    qlonglong toLongLong(bool *ok = Q_NULLPTR) const;
+    qulonglong toULongLong(bool *ok = Q_NULLPTR) const;
     bool toBool() const;
-    double toDouble(bool *ok = 0) const;
-    float toFloat(bool *ok = 0) const;
-    qreal toReal(bool *ok = 0) const;
+    double toDouble(bool *ok = Q_NULLPTR) const;
+    float toFloat(bool *ok = Q_NULLPTR) const;
+    qreal toReal(bool *ok = Q_NULLPTR) const;
     QByteArray toByteArray() const;
     QBitArray toBitArray() const;
     QString toString() const;
@@ -487,7 +487,7 @@ inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2)
 #ifndef QT_MOC
 template<typename T> inline T qvariant_cast(const QVariant &v)
 {
-    const int vid = qMetaTypeId<T>(static_cast<T *>(0));
+    const int vid = qMetaTypeId<T>(static_cast<T *>(Q_NULLPTR));
     if (vid == v.userType())
         return *reinterpret_cast<const T *>(v.constData());
     if (vid < int(QMetaType::User)) {
index 93d15bf..6197388 100644 (file)
@@ -67,10 +67,10 @@ public:
     };
     Q_DECLARE_FLAGS(LoadHints, LoadHint)
 
-    explicit QLibrary(QObject *parent = 0);
-    explicit QLibrary(const QString& fileName, QObject *parent = 0);
-    explicit QLibrary(const QString& fileName, int verNum, QObject *parent = 0);
-    explicit QLibrary(const QString& fileName, const QString &version, QObject *parent = 0);
+    explicit QLibrary(QObject *parent = Q_NULLPTR);
+    explicit QLibrary(const QString& fileName, QObject *parent = Q_NULLPTR);
+    explicit QLibrary(const QString& fileName, int verNum, QObject *parent = Q_NULLPTR);
+    explicit QLibrary(const QString& fileName, const QString &version, QObject *parent = Q_NULLPTR);
     ~QLibrary();
 
     void *resolve(const char *symbol);
index ad38027..8a07b2b 100644 (file)
@@ -59,8 +59,8 @@ class Q_CORE_EXPORT QPluginLoader : public QObject
     Q_PROPERTY(QString fileName READ fileName WRITE setFileName)
     Q_PROPERTY(QLibrary::LoadHints loadHints READ loadHints WRITE setLoadHints)
 public:
-    explicit QPluginLoader(QObject *parent = 0);
-    explicit QPluginLoader(const QString &fileName, QObject *parent = 0);
+    explicit QPluginLoader(QObject *parent = Q_NULLPTR);
+    explicit QPluginLoader(const QString &fileName, QObject *parent = Q_NULLPTR);
     ~QPluginLoader();
 
     QObject *instance();
index 59a0fdd..9c86d3c 100644 (file)
@@ -62,7 +62,7 @@ public:
     static int idealThreadCount();
     static void yieldCurrentThread();
 
-    explicit QThread(QObject *parent = 0);
+    explicit QThread(QObject *parent = Q_NULLPTR);
     ~QThread();
 
     enum Priority {
@@ -115,7 +115,7 @@ protected:
     static void setTerminationEnabled(bool enabled = true);
 
 protected:
-    QThread(QThreadPrivate &dd, QObject *parent = 0);
+    QThread(QThreadPrivate &dd, QObject *parent = Q_NULLPTR);
 
 private:
     Q_OBJECT
@@ -135,10 +135,10 @@ public:
         { return Qt::HANDLE(currentThread()); }
 
 protected:
-    QThread(QThreadPrivate &dd, QObject *parent = 0);
+    QThread(QThreadPrivate &dd, QObject *parent = Q_NULLPTR);
 
 private:
-    explicit QThread(QObject *parent = 0);
+    explicit QThread(QObject *parent = Q_NULLPTR);
     static QThread *instance;
 
     friend class QCoreApplication;
index 61425a0..de1ee15 100644 (file)
@@ -253,16 +253,16 @@ public:
     inline QT_ASCII_CAST_WARN bool operator>=(const QString &s2) const;
 #endif
 
-    short toShort(bool *ok = 0, int base = 10) const;
-    ushort toUShort(bool *ok = 0, int base = 10) const;
-    int toInt(bool *ok = 0, int base = 10) const;
-    uint toUInt(bool *ok = 0, int base = 10) const;
-    long toLong(bool *ok = 0, int base = 10) const;
-    ulong toULong(bool *ok = 0, int base = 10) const;
-    qlonglong toLongLong(bool *ok = 0, int base = 10) const;
-    qulonglong toULongLong(bool *ok = 0, int base = 10) const;
-    float toFloat(bool *ok = 0) const;
-    double toDouble(bool *ok = 0) const;
+    short toShort(bool *ok = Q_NULLPTR, int base = 10) const;
+    ushort toUShort(bool *ok = Q_NULLPTR, int base = 10) const;
+    int toInt(bool *ok = Q_NULLPTR, int base = 10) const;
+    uint toUInt(bool *ok = Q_NULLPTR, int base = 10) const;
+    long toLong(bool *ok = Q_NULLPTR, int base = 10) const;
+    ulong toULong(bool *ok = Q_NULLPTR, int base = 10) const;
+    qlonglong toLongLong(bool *ok = Q_NULLPTR, int base = 10) const;
+    qulonglong toULongLong(bool *ok = Q_NULLPTR, int base = 10) const;
+    float toFloat(bool *ok = Q_NULLPTR) const;
+    double toDouble(bool *ok = Q_NULLPTR) const;
     QByteArray toBase64() const;
     QByteArray toHex() const;
     QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(),
index 5527ef5..ee48801 100644 (file)
@@ -1028,7 +1028,7 @@ short QLocale::toShort(const QString &s, bool *ok, int base) const
 {
     qlonglong i = toLongLong(s, ok, base);
     if (i < SHRT_MIN || i > SHRT_MAX) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -1056,7 +1056,7 @@ ushort QLocale::toUShort(const QString &s, bool *ok, int base) const
 {
     qulonglong i = toULongLong(s, ok, base);
     if (i > USHRT_MAX) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -1084,7 +1084,7 @@ int QLocale::toInt(const QString &s, bool *ok, int base) const
 {
     qlonglong i = toLongLong(s, ok, base);
     if (i < INT_MIN || i > INT_MAX) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -1112,7 +1112,7 @@ uint QLocale::toUInt(const QString &s, bool *ok, int base) const
 {
     qulonglong i = toULongLong(s, ok, base);
     if (i > UINT_MAX) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -1196,11 +1196,11 @@ float QLocale::toFloat(const QString &s, bool *ok) const
     bool myOk;
     double d = toDouble(s, &myOk);
     if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0.0;
     }
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     return float(d);
 }
@@ -2906,7 +2906,7 @@ double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
     CharBuff buff;
     if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
                          group_sep_mode, &buff)) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0.0;
     }
@@ -2919,7 +2919,7 @@ qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
     CharBuff buff;
     if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
                          group_sep_mode, &buff)) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -2933,7 +2933,7 @@ qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base,
     CharBuff buff;
     if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
                          group_sep_mode, &buff)) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
@@ -2944,13 +2944,13 @@ qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base,
 
 double QLocalePrivate::bytearrayToDouble(const char *num, bool *ok, bool *overflow)
 {
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     if (overflow != 0)
         *overflow = false;
 
     if (*num == '\0') {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0.0;
     }
@@ -2971,7 +2971,7 @@ double QLocalePrivate::bytearrayToDouble(const char *num, bool *ok, bool *overfl
     if (!_ok) {
         // the only way strtod can fail with *endptr != '\0' on a non-empty
         // input string is overflow
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (overflow != 0)
             *overflow = *endptr != '\0';
@@ -2980,14 +2980,14 @@ double QLocalePrivate::bytearrayToDouble(const char *num, bool *ok, bool *overfl
 
     if (*endptr != '\0') {
         // we stopped at a non-digit character after converting some digits
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (overflow != 0)
             *overflow = false;
         return 0.0;
     }
 
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     if (overflow != 0)
         *overflow = false;
@@ -3000,7 +3000,7 @@ qlonglong QLocalePrivate::bytearrayToLongLong(const char *num, int base, bool *o
     const char *endptr;
 
     if (*num == '\0') {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (overflow != 0)
             *overflow = false;
@@ -3010,7 +3010,7 @@ qlonglong QLocalePrivate::bytearrayToLongLong(const char *num, int base, bool *o
     qlonglong l = qstrtoll(num, &endptr, base, &_ok);
 
     if (!_ok) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (overflow != 0) {
             // the only way qstrtoll can fail with *endptr != '\0' on a non-empty
@@ -3022,14 +3022,14 @@ qlonglong QLocalePrivate::bytearrayToLongLong(const char *num, int base, bool *o
 
     if (*endptr != '\0') {
         // we stopped at a non-digit character after converting some digits
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (overflow != 0)
             *overflow = false;
         return 0;
     }
 
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     if (overflow != 0)
         *overflow = false;
@@ -3043,12 +3043,12 @@ qulonglong QLocalePrivate::bytearrayToUnsLongLong(const char *num, int base, boo
     qulonglong l = qstrtoull(num, &endptr, base, &_ok);
 
     if (!_ok || *endptr != '\0') {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0;
     }
 
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     return l;
 }
index 97a76fd..1458686 100644 (file)
@@ -683,14 +683,14 @@ public:
     QString nativeLanguageName() const;
     QString nativeCountryName() const;
 
-    short toShort(const QString &s, bool *ok = 0, int base = 0) const;
-    ushort toUShort(const QString &s, bool *ok = 0, int base = 0) const;
-    int toInt(const QString &s, bool *ok = 0, int base = 0) const;
-    uint toUInt(const QString &s, bool *ok = 0, int base = 0) const;
-    qlonglong toLongLong(const QString &s, bool *ok = 0, int base = 0) const;
-    qlonglong toULongLong(const QString &s, bool *ok = 0, int base = 0) const;
-    float toFloat(const QString &s, bool *ok = 0) const;
-    double toDouble(const QString &s, bool *ok = 0) const;
+    short toShort(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    ushort toUShort(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    int toInt(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    uint toUInt(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    qlonglong toLongLong(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    qlonglong toULongLong(const QString &s, bool *ok = Q_NULLPTR, int base = 0) const;
+    float toFloat(const QString &s, bool *ok = Q_NULLPTR) const;
+    double toDouble(const QString &s, bool *ok = Q_NULLPTR) const;
 
     QString toString(qlonglong i) const;
     QString toString(qulonglong i) const;
index 9859871..b87bc03 100644 (file)
@@ -304,7 +304,7 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
     qulonglong qbase, cutoff;
     int any, cutlim;
 
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
 
     /*
@@ -315,7 +315,7 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
         c = *s++;
     } while (isspace(c));
     if (c == '-') {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         if (endptr != 0)
             *endptr = s - 1;
@@ -355,11 +355,11 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
         }
     }
     if (any == 0) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
     } else if (any < 0) {
         acc = ULLONG_MAX;
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
     }
     if (endptr != 0)
@@ -454,7 +454,7 @@ qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
     }
     if (any < 0) {
         acc = neg ? LLONG_MIN : LLONG_MAX;
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
     } else if (neg) {
         acc = (~acc) + 1;
@@ -462,7 +462,7 @@ qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
     if (endptr != 0)
         *endptr = (any >= 0 ? s - 1 : nptr);
 
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = any > 0;
 
     return acc;
@@ -1573,7 +1573,7 @@ double qstrtod(const char *s00, const char **se, bool *ok)
       #else
       const char decimal_point = '.';
       #endif */
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
 
     const char decimal_point = '.';
@@ -1767,7 +1767,7 @@ double qstrtod(const char *s00, const char **se, bool *ok)
             if (e1 > DBL_MAX_10_EXP) {
             ovfl:
                 //                                errno = ERANGE;
-                if (ok != 0)
+                if (ok != Q_NULLPTR)
                     *ok = false;
 #ifdef __STDC__
                 rv = HUGE_VAL;
@@ -1830,7 +1830,7 @@ double qstrtod(const char *s00, const char **se, bool *ok)
                         undfl:
                             rv = 0.;
                             //                                        errno = ERANGE;
-                            if (ok != 0)
+                            if (ok != Q_NULLPTR)
                                 *ok = false;
                             if (bd0)
                                 goto retfree;
index a323e33..f4f22fd 100644 (file)
@@ -97,7 +97,7 @@ public:
     {
         T *oldD = this->d;
         Cleanup::cleanup(oldD);
-        this->d = 0;
+        this->d = Q_NULLPTR;
     }
 
     inline T &operator*() const
index 5a7e052..f999e1b 100644 (file)
@@ -308,7 +308,7 @@ namespace QtSharedPointer {
             if (ptr)
                 d = new Data;
             else
-                d = 0;
+                d = Q_NULLPTR;
             internalFinishConstruction(ptr);
 #endif
         }
@@ -319,7 +319,7 @@ namespace QtSharedPointer {
             if (ptr)
                 d = ExternalRefCountWithCustomDeleter<T, Deleter>::create(ptr, deleter);
             else
-                d = 0;
+                d = Q_NULLPTR;
             internalFinishConstruction(ptr);
         }
 
@@ -457,7 +457,7 @@ public:
 
     template <class X>
     inline QSharedPointer(const QWeakPointer<X> &other) : BaseClass(Qt::Uninitialized)
-    { this->d = 0; *this = other; }
+    { this->d = Q_NULLPTR; *this = other; }
 
     template <class X>
     inline QSharedPointer<T> &operator=(const QWeakPointer<X> &other)
index 8ba4100..9fbbb63 100644 (file)
@@ -5231,7 +5231,7 @@ qint64 QString::toLongLong(bool *ok, int base) const
     QLocale def_locale;
     qint64 result = def_locale.d()->stringToLongLong(*this, base, &my_ok, QLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = true;
         return result;
     }
@@ -5272,7 +5272,7 @@ quint64 QString::toULongLong(bool *ok, int base) const
     QLocale def_locale;
     quint64 result = def_locale.d()->stringToUnsLongLong(*this, base, &my_ok, QLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = true;
         return result;
     }
@@ -5508,7 +5508,7 @@ double QString::toDouble(bool *ok) const
     QLocale def_locale;
     double result = def_locale.d()->stringToDouble(*this, &my_ok, QLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = true;
         return result;
     }
@@ -5537,11 +5537,11 @@ float QString::toFloat(bool *ok) const
     bool myOk;
     double d = toDouble(&myOk);
     if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
-        if (ok != 0)
+        if (ok != Q_NULLPTR)
             *ok = false;
         return 0.0;
     }
-    if (ok != 0)
+    if (ok != Q_NULLPTR)
         *ok = true;
     return (float) d;
 }
index 250f20a..014973f 100644 (file)
@@ -355,16 +355,16 @@ public:
     int localeAwareCompare(const QStringRef &s) const;
     static int localeAwareCompare(const QString& s1, const QStringRef& s2);
 
-    short  toShort(bool *ok=0, int base=10) const;
-    ushort toUShort(bool *ok=0, int base=10) const;
-    int toInt(bool *ok=0, int base=10) const;
-    uint toUInt(bool *ok=0, int base=10) const;
-    long toLong(bool *ok=0, int base=10) const;
-    ulong toULong(bool *ok=0, int base=10) const;
-    qlonglong toLongLong(bool *ok=0, int base=10) const;
-    qulonglong toULongLong(bool *ok=0, int base=10) const;
-    float toFloat(bool *ok=0) const;
-    double toDouble(bool *ok=0) const;
+    short  toShort(bool *ok=Q_NULLPTR, int base=10) const;
+    ushort toUShort(bool *ok=Q_NULLPTR, int base=10) const;
+    int toInt(bool *ok=Q_NULLPTR, int base=10) const;
+    uint toUInt(bool *ok=Q_NULLPTR, int base=10) const;
+    long toLong(bool *ok=Q_NULLPTR, int base=10) const;
+    ulong toULong(bool *ok=Q_NULLPTR, int base=10) const;
+    qlonglong toLongLong(bool *ok=Q_NULLPTR, int base=10) const;
+    qulonglong toULongLong(bool *ok=Q_NULLPTR, int base=10) const;
+    float toFloat(bool *ok=Q_NULLPTR) const;
+    double toDouble(bool *ok=Q_NULLPTR) const;
 
     QString &setNum(short, int base=10);
     QString &setNum(ushort, int base=10);
@@ -935,7 +935,7 @@ class Q_CORE_EXPORT QStringRef {
     int m_position;
     int m_size;
 public:
-    inline QStringRef():m_string(0), m_position(0), m_size(0){}
+    inline QStringRef():m_string(Q_NULLPTR), m_position(0), m_size(0){}
     inline QStringRef(const QString *string, int position, int size);
     inline QStringRef(const QString *string);
     inline QStringRef(const QStringRef &other)
@@ -998,10 +998,10 @@ public:
     QByteArray toLocal8Bit() const Q_REQUIRED_RESULT;
     QVector<uint> toUcs4() const Q_REQUIRED_RESULT;
 
-    inline void clear() { m_string = 0; m_position = m_size = 0; }
+    inline void clear() { m_string = Q_NULLPTR; m_position = m_size = 0; }
     QString toString() const;
     inline bool isEmpty() const { return m_size == 0; }
-    inline bool isNull() const { return m_string == 0 || m_string->isNull(); }
+    inline bool isNull() const { return m_string == Q_NULLPTR || m_string->isNull(); }
 
     QStringRef appendTo(QString *string) const;
 
index 57839b9..54557d8 100644 (file)
@@ -80,7 +80,7 @@ public:
         CosineCurve
     };
 
-    explicit QTimeLine(int duration = 1000, QObject *parent = 0);
+    explicit QTimeLine(int duration = 1000, QObject *parent = Q_NULLPTR);
     virtual ~QTimeLine();
 
     State state() const;
index 1da2e70..4e64ebf 100644 (file)
@@ -371,7 +371,7 @@ void Generator::generateCode()
 // Generate smart cast function
 //
     fprintf(out, "\nvoid *%s::qt_metacast(const char *_clname)\n{\n", cdef->qualified.constData());
-    fprintf(out, "    if (!_clname) return 0;\n");
+    fprintf(out, "    if (!_clname) return Q_NULLPTR;\n");
     fprintf(out, "    if (!strcmp(_clname, qt_meta_stringdata_%s))\n"
                   "        return static_cast<void*>(const_cast< %s*>(this));\n",
             qualifiedClassNameIdentifier.constData(), cdef->classname.constData());
index 4bc68d6..f6e8c02 100644 (file)
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
 Symbol::LexemStore Symbol::lexemStore;
 #endif
 
-static const char *error_msg = 0;
+static const char *error_msg = Q_NULLPTR;
 
 void Parser::error(int rollback) {
     index -= rollback;
index 568be5a..1af7130 100644 (file)
@@ -72,9 +72,9 @@ public:
     inline const Symbol &symbol() { return symbols.at(index-1);}
 
     void error(int rollback);
-    void error(const char *msg = 0);
-    void warning(const char * = 0);
-    void note(const char * = 0);
+    void error(const char *msg = Q_NULLPTR);
+    void warning(const char * = Q_NULLPTR);
+    void note(const char * = Q_NULLPTR);
 
 };