DeleteWhenStopped
};
- QAbstractAnimation(QObject *parent = 0);
+ QAbstractAnimation(QObject *parent = Q_NULLPTR);
virtual ~QAbstractAnimation();
State state() const;
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;
Q_DECLARE_PRIVATE(QAnimationDriver)
public:
- QAnimationDriver(QObject *parent = 0);
+ QAnimationDriver(QObject *parent = Q_NULLPTR);
void advance();
void install();
virtual void started() {};
virtual void stopped() {};
- QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = 0);
+ QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = Q_NULLPTR);
private:
friend class QUnifiedTimer;
Q_OBJECT
public:
- QAnimationGroup(QObject *parent = 0);
+ QAnimationGroup(QObject *parent = Q_NULLPTR);
~QAnimationGroup();
QAbstractAnimation *animationAt(int index) const;
Q_OBJECT
public:
- QParallelAnimationGroup(QObject *parent = 0);
+ QParallelAnimationGroup(QObject *parent = Q_NULLPTR);
~QParallelAnimationGroup();
int duration() const;
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;
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;
Q_PROPERTY(QAbstractAnimation* currentAnimation READ currentAnimation NOTIFY currentAnimationChanged)
public:
- QSequentialAnimationGroup(QObject *parent = 0);
+ QSequentialAnimationGroup(QObject *parent = Q_NULLPTR);
~QSequentialAnimationGroup();
QPauseAnimation *addPause(int msecs);
typedef QPair<qreal, QVariant> KeyValue;
typedef QVector<KeyValue> KeyValues;
- QVariantAnimation(QObject *parent = 0);
+ QVariantAnimation(QObject *parent = Q_NULLPTR);
~QVariantAnimation();
QVariant startValue() const;
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);
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;
Q_DECLARE_PRIVATE(QFutureWatcherBase)
public:
- QFutureWatcherBase(QObject *parent = 0);
+ QFutureWatcherBase(QObject *parent = Q_NULLPTR);
int progressValue() const;
int progressMinimum() const;
friend class QFutureInterfaceBase;
public:
- QThreadPool(QObject *parent = 0);
+ QThreadPool(QObject *parent = Q_NULLPTR);
~QThreadPool();
static QThreadPool *globalInstance();
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() \
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_); \
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);
#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);
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;
Q_D(const QFileInfo);
if (d->isDefaultConstructed)
return true;
- if (d->fileEngine == 0)
+ if (!d->fileEngine)
return d->fileEntry.isRelative();
return d->fileEngine->isRelativePath();
}
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();
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;
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;
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;
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();
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();
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();
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();
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);
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();
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();
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))
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();
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();
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();
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();
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();
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);
#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);
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);
#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());
realNumberNotation = QTextStream::SmartNotation;
numberFlags = 0;
- device = 0;
+ device = Q_NULLPTR;
deleteDevice = false;
- string = 0;
+ string = Q_NULLPTR;
stringOffset = 0;
stringOpenMode = QIODevice::NotOpen;
resetCodecConverterStateHelper(&readConverterState);
resetCodecConverterStateHelper(&writeConverterState);
delete readConverterSavedState;
- readConverterSavedState = 0;
+ readConverterSavedState = Q_NULLPTR;
writeConverterState.flags |= QTextCodec::IgnoreHeader;
autoDetectUnicode = true;
#endif
public:
typedef QPair<int, int> TimerInfo;
- explicit QAbstractEventDispatcher(QObject *parent = 0);
+ explicit QAbstractEventDispatcher(QObject *parent = Q_NULLPTR);
~QAbstractEventDispatcher();
static QAbstractEventDispatcher *instance(QThread *thread = 0);
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; }
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;
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;
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;
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;
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);
Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
public:
- explicit QEventDispatcherUNIX(QObject *parent = 0);
+ explicit QEventDispatcherUNIX(QObject *parent = Q_NULLPTR);
~QEventDispatcherUNIX();
bool processEvents(QEventLoop::ProcessEventsFlags flags);
void flush();
protected:
- QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = 0);
+ QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = Q_NULLPTR);
void setSocketNotifierPending(QSocketNotifier *notifier);
Q_DECLARE_PRIVATE(QEventLoop)
public:
- explicit QEventLoop(QObject *parent = 0);
+ explicit QEventLoop(QObject *parent = Q_NULLPTR);
~QEventLoop();
enum ProcessEventsFlag {
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;
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; }
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)
{}
};
// 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);
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(),
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(),
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(),
}
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(),
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(),
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);
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);
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; }
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; }
{
Q_OBJECT
public:
- explicit QTranslator(QObject *parent = 0);
+ explicit QTranslator(QObject *parent = Q_NULLPTR);
~QTranslator();
QString translate(const char *context, const char *sourceText,
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;
#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)) {
};
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);
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();
static int idealThreadCount();
static void yieldCurrentThread();
- explicit QThread(QObject *parent = 0);
+ explicit QThread(QObject *parent = Q_NULLPTR);
~QThread();
enum Priority {
static void setTerminationEnabled(bool enabled = true);
protected:
- QThread(QThreadPrivate &dd, QObject *parent = 0);
+ QThread(QThreadPrivate &dd, QObject *parent = Q_NULLPTR);
private:
Q_OBJECT
{ 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;
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(),
{
qlonglong i = toLongLong(s, ok, base);
if (i < SHRT_MIN || i > SHRT_MAX) {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
return 0;
}
{
qulonglong i = toULongLong(s, ok, base);
if (i > USHRT_MAX) {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
return 0;
}
{
qlonglong i = toLongLong(s, ok, base);
if (i < INT_MIN || i > INT_MAX) {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
return 0;
}
{
qulonglong i = toULongLong(s, ok, base);
if (i > UINT_MAX) {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
return 0;
}
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);
}
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;
}
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;
}
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;
}
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;
}
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';
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;
const char *endptr;
if (*num == '\0') {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
if (overflow != 0)
*overflow = false;
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
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;
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;
}
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;
qulonglong qbase, cutoff;
int any, cutlim;
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = true;
/*
c = *s++;
} while (isspace(c));
if (c == '-') {
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
if (endptr != 0)
*endptr = s - 1;
}
}
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)
}
if (any < 0) {
acc = neg ? LLONG_MIN : LLONG_MAX;
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
} else if (neg) {
acc = (~acc) + 1;
if (endptr != 0)
*endptr = (any >= 0 ? s - 1 : nptr);
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = any > 0;
return acc;
#else
const char decimal_point = '.';
#endif */
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = true;
const char decimal_point = '.';
if (e1 > DBL_MAX_10_EXP) {
ovfl:
// errno = ERANGE;
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
#ifdef __STDC__
rv = HUGE_VAL;
undfl:
rv = 0.;
// errno = ERANGE;
- if (ok != 0)
+ if (ok != Q_NULLPTR)
*ok = false;
if (bd0)
goto retfree;
{
T *oldD = this->d;
Cleanup::cleanup(oldD);
- this->d = 0;
+ this->d = Q_NULLPTR;
}
inline T &operator*() const
if (ptr)
d = new Data;
else
- d = 0;
+ d = Q_NULLPTR;
internalFinishConstruction(ptr);
#endif
}
if (ptr)
d = ExternalRefCountWithCustomDeleter<T, Deleter>::create(ptr, deleter);
else
- d = 0;
+ d = Q_NULLPTR;
internalFinishConstruction(ptr);
}
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)
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;
}
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;
}
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;
}
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;
}
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);
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)
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;
CosineCurve
};
- explicit QTimeLine(int duration = 1000, QObject *parent = 0);
+ explicit QTimeLine(int duration = 1000, QObject *parent = Q_NULLPTR);
virtual ~QTimeLine();
State state() const;
// 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());
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;
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);
};