More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
b35eec360d
commit
41e7b71c41
@ -52,7 +52,7 @@ template<class T>
|
|||||||
class HasResultType {
|
class HasResultType {
|
||||||
typedef char Yes;
|
typedef char Yes;
|
||||||
typedef void *No;
|
typedef void *No;
|
||||||
template<typename U> static Yes test(int, const typename U::result_type * = 0);
|
template<typename U> static Yes test(int, const typename U::result_type * = nullptr);
|
||||||
template<typename U> static No test(double);
|
template<typename U> static No test(double);
|
||||||
public:
|
public:
|
||||||
enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) };
|
enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) };
|
||||||
|
@ -266,7 +266,7 @@ public:
|
|||||||
if (keep(*it))
|
if (keep(*it))
|
||||||
this->reportResult(&(*it), index);
|
this->reportResult(&(*it), index);
|
||||||
else
|
else
|
||||||
this->reportResult(0, index);
|
this->reportResult(nullptr, index);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
Iterator it = sequenceBeginIterator;
|
Iterator it = sequenceBeginIterator;
|
||||||
std::advance(it, beginIndex);
|
std::advance(it, beginIndex);
|
||||||
for (int i = beginIndex; i < endIndex; ++i) {
|
for (int i = beginIndex; i < endIndex; ++i) {
|
||||||
runIteration(it, i, 0);
|
runIteration(it, i, nullptr);
|
||||||
std::advance(it, 1);
|
std::advance(it, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
hasRegisteredTimer(false),
|
hasRegisteredTimer(false),
|
||||||
isPause(false),
|
isPause(false),
|
||||||
isGroup(false),
|
isGroup(false),
|
||||||
group(0)
|
group(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
|
void disconnectUncontrolledAnimation(QAbstractAnimation *anim)
|
||||||
{
|
{
|
||||||
//0 for the signal here because we might be called from the animation destructor
|
//0 for the signal here because we might be called from the animation destructor
|
||||||
QObject::disconnect(anim, 0, q_func(), SLOT(_q_uncontrolledAnimationFinished()));
|
QObject::disconnect(anim, nullptr, q_func(), SLOT(_q_uncontrolledAnimationFinished()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void connectUncontrolledAnimation(QAbstractAnimation *anim)
|
void connectUncontrolledAnimation(QAbstractAnimation *anim)
|
||||||
|
@ -64,7 +64,7 @@ class QPropertyAnimationPrivate : public QVariantAnimationPrivate
|
|||||||
Q_DECLARE_PUBLIC(QPropertyAnimation)
|
Q_DECLARE_PUBLIC(QPropertyAnimation)
|
||||||
public:
|
public:
|
||||||
QPropertyAnimationPrivate()
|
QPropertyAnimationPrivate()
|
||||||
: targetValue(0), propertyType(0), propertyIndex(-1)
|
: targetValue(nullptr), propertyType(0), propertyIndex(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class QSequentialAnimationGroupPrivate : public QAnimationGroupPrivate
|
|||||||
Q_DECLARE_PUBLIC(QSequentialAnimationGroup)
|
Q_DECLARE_PUBLIC(QSequentialAnimationGroup)
|
||||||
public:
|
public:
|
||||||
QSequentialAnimationGroupPrivate()
|
QSequentialAnimationGroupPrivate()
|
||||||
: currentAnimation(0), currentAnimationIndex(-1), lastLoop(0)
|
: currentAnimation(nullptr), currentAnimationIndex(-1), lastLoop(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
|
|
||||||
struct ConverterState {
|
struct ConverterState {
|
||||||
ConverterState(ConversionFlags f = DefaultConversion)
|
ConverterState(ConversionFlags f = DefaultConversion)
|
||||||
: flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; }
|
: flags(f), remainingChars(0), invalidChars(0), d(nullptr) { state_data[0] = state_data[1] = state_data[2] = 0; }
|
||||||
~ConverterState() { }
|
~ConverterState() { }
|
||||||
ConversionFlags flags;
|
ConversionFlags flags;
|
||||||
int remainingChars;
|
int remainingChars;
|
||||||
|
@ -131,8 +131,8 @@ struct QGlobalStatic
|
|||||||
|
|
||||||
bool isDestroyed() const { return guard.load() <= QtGlobalStatic::Destroyed; }
|
bool isDestroyed() const { return guard.load() <= QtGlobalStatic::Destroyed; }
|
||||||
bool exists() const { return guard.load() == QtGlobalStatic::Initialized; }
|
bool exists() const { return guard.load() == QtGlobalStatic::Initialized; }
|
||||||
operator Type *() { if (isDestroyed()) return 0; return innerFunction(); }
|
operator Type *() { if (isDestroyed()) return nullptr; return innerFunction(); }
|
||||||
Type *operator()() { if (isDestroyed()) return 0; return innerFunction(); }
|
Type *operator()() { if (isDestroyed()) return nullptr; return innerFunction(); }
|
||||||
Type *operator->()
|
Type *operator->()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", "The global static was used after being destroyed");
|
Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", "The global static was used after being destroyed");
|
||||||
|
@ -193,7 +193,7 @@ public:
|
|||||||
uchar *address;
|
uchar *address;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
|
virtual bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr);
|
||||||
virtual bool supportsExtension(Extension extension) const;
|
virtual bool supportsExtension(Extension extension) const;
|
||||||
|
|
||||||
// Factory
|
// Factory
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
inline QFileInfoPrivate()
|
inline QFileInfoPrivate()
|
||||||
: QSharedData(), fileEngine(0),
|
: QSharedData(), fileEngine(nullptr),
|
||||||
cachedFlags(0),
|
cachedFlags(0),
|
||||||
isDefaultConstructed(true),
|
isDefaultConstructed(true),
|
||||||
cache_enabled(true), fileFlags(0), fileSize(0)
|
cache_enabled(true), fileFlags(0), fileSize(0)
|
||||||
|
@ -130,7 +130,7 @@ public:
|
|||||||
static bool removeFile(const QFileSystemEntry &entry, QSystemError &error);
|
static bool removeFile(const QFileSystemEntry &entry, QSystemError &error);
|
||||||
|
|
||||||
static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error,
|
static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions, QSystemError &error,
|
||||||
QFileSystemMetaData *data = 0);
|
QFileSystemMetaData *data = nullptr);
|
||||||
|
|
||||||
// unused, therefore not implemented
|
// unused, therefore not implemented
|
||||||
static bool setFileTime(const QFileSystemEntry &entry, const QDateTime &newDate,
|
static bool setFileTime(const QFileSystemEntry &entry, const QDateTime &newDate,
|
||||||
|
@ -76,7 +76,7 @@ class Q_AUTOTEST_EXPORT QFileSystemMetaData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QFileSystemMetaData()
|
QFileSystemMetaData()
|
||||||
: knownFlagsMask(0),
|
: knownFlagsMask(nullptr),
|
||||||
size_(-1)
|
size_(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ public:
|
|||||||
|
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
knownFlagsMask = 0;
|
knownFlagsMask = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
|
void clearFlags(MetaDataFlags flags = AllMetaDataFlags)
|
||||||
|
@ -115,7 +115,7 @@ public:
|
|||||||
virtual bool isUnnamedFile() const
|
virtual bool isUnnamedFile() const
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) override;
|
bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
|
||||||
bool supportsExtension(Extension extension) const override;
|
bool supportsExtension(Extension extension) const override;
|
||||||
|
|
||||||
//FS only!!
|
//FS only!!
|
||||||
|
@ -247,7 +247,7 @@ public:
|
|||||||
// if you add "= 4" here, increase the number of bits below
|
// if you add "= 4" here, increase the number of bits below
|
||||||
};
|
};
|
||||||
|
|
||||||
Channel() : process(0), notifier(0), type(Normal), closed(false), append(false)
|
Channel() : process(nullptr), notifier(nullptr), type(Normal), closed(false), append(false)
|
||||||
{
|
{
|
||||||
pipe[0] = INVALID_Q_PIPE;
|
pipe[0] = INVALID_Q_PIPE;
|
||||||
pipe[1] = INVALID_Q_PIPE;
|
pipe[1] = INVALID_Q_PIPE;
|
||||||
|
@ -108,7 +108,7 @@ public:
|
|||||||
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
|
Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
|
||||||
Iterator *endEntryList() override;
|
Iterator *endEntryList() override;
|
||||||
|
|
||||||
bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) override;
|
bool extension(Extension extension, const ExtensionOption *option = nullptr, ExtensionReturn *output = nullptr) override;
|
||||||
bool supportsExtension(Extension extension) const override;
|
bool supportsExtension(Extension extension) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
// in qurlrecode.cpp
|
// in qurlrecode.cpp
|
||||||
extern Q_AUTOTEST_EXPORT int qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,
|
extern Q_AUTOTEST_EXPORT int qt_urlRecode(QString &appendTo, const QChar *begin, const QChar *end,
|
||||||
QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications = 0);
|
QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications = nullptr);
|
||||||
|
|
||||||
// in qurlidna.cpp
|
// in qurlidna.cpp
|
||||||
enum AceLeadingDot { AllowLeadingDot, ForbidLeadingDot };
|
enum AceLeadingDot { AllowLeadingDot, ForbidLeadingDot };
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
void itemsMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
||||||
bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
bool allowMove(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation);
|
||||||
|
|
||||||
inline QModelIndex createIndex(int row, int column, void *data = 0) const {
|
inline QModelIndex createIndex(int row, int column, void *data = nullptr) const {
|
||||||
return q_func()->createIndex(row, column, data);
|
return q_func()->createIndex(row, column, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class Q_CORE_EXPORT QAbstractProxyModelPrivate : public QAbstractItemModelPrivat
|
|||||||
{
|
{
|
||||||
Q_DECLARE_PUBLIC(QAbstractProxyModel)
|
Q_DECLARE_PUBLIC(QAbstractProxyModel)
|
||||||
public:
|
public:
|
||||||
QAbstractProxyModelPrivate() : QAbstractItemModelPrivate(), model(0) {}
|
QAbstractProxyModelPrivate() : QAbstractItemModelPrivate(), model(nullptr) {}
|
||||||
QAbstractItemModel *model;
|
QAbstractItemModel *model;
|
||||||
virtual void _q_sourceModelDestroyed();
|
virtual void _q_sourceModelDestroyed();
|
||||||
void mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
|
void mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
|
||||||
|
@ -62,7 +62,7 @@ class QItemSelectionModelPrivate: public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QItemSelectionModel)
|
Q_DECLARE_PUBLIC(QItemSelectionModel)
|
||||||
public:
|
public:
|
||||||
QItemSelectionModelPrivate()
|
QItemSelectionModelPrivate()
|
||||||
: model(0),
|
: model(nullptr),
|
||||||
currentCommand(QItemSelectionModel::NoUpdate),
|
currentCommand(QItemSelectionModel::NoUpdate),
|
||||||
tableSelected(false), tableColCount(0), tableRowCount(0) {}
|
tableSelected(false), tableColCount(0), tableRowCount(0) {}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ inline void qt_ignore_sigpipe()
|
|||||||
struct sigaction noaction;
|
struct sigaction noaction;
|
||||||
memset(&noaction, 0, sizeof(noaction));
|
memset(&noaction, 0, sizeof(noaction));
|
||||||
noaction.sa_handler = SIG_IGN;
|
noaction.sa_handler = SIG_IGN;
|
||||||
::sigaction(SIGPIPE, &noaction, 0);
|
::sigaction(SIGPIPE, &noaction, nullptr);
|
||||||
atom.store(1);
|
atom.store(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ public:
|
|||||||
QString cachedApplicationDirPath;
|
QString cachedApplicationDirPath;
|
||||||
static QString *cachedApplicationFilePath;
|
static QString *cachedApplicationFilePath;
|
||||||
static void setApplicationFilePath(const QString &path);
|
static void setApplicationFilePath(const QString &path);
|
||||||
static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = 0; }
|
static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = nullptr; }
|
||||||
|
|
||||||
#ifndef QT_NO_QOBJECT
|
#ifndef QT_NO_QOBJECT
|
||||||
void execCleanup();
|
void execCleanup();
|
||||||
|
@ -66,8 +66,8 @@ class Q_CORE_EXPORT QEventDispatcherGlib : public QAbstractEventDispatcher
|
|||||||
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
|
Q_DECLARE_PRIVATE(QEventDispatcherGlib)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QEventDispatcherGlib(QObject *parent = 0);
|
explicit QEventDispatcherGlib(QObject *parent = nullptr);
|
||||||
explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = 0);
|
explicit QEventDispatcherGlib(GMainContext *context, QObject *parent = nullptr);
|
||||||
~QEventDispatcherGlib();
|
~QEventDispatcherGlib();
|
||||||
|
|
||||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||||
@ -102,7 +102,7 @@ class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatche
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QEventDispatcherGlibPrivate(GMainContext *context = 0);
|
QEventDispatcherGlibPrivate(GMainContext *context = nullptr);
|
||||||
GMainContext *mainContext;
|
GMainContext *mainContext;
|
||||||
GPostEventSource *postEventSource;
|
GPostEventSource *postEventSource;
|
||||||
GSocketNotifierSource *socketNotifierSource;
|
GSocketNotifierSource *socketNotifierSource;
|
||||||
|
@ -102,7 +102,7 @@ class Q_CORE_EXPORT QEventDispatcherUNIX : public QAbstractEventDispatcher
|
|||||||
Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
|
Q_DECLARE_PRIVATE(QEventDispatcherUNIX)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QEventDispatcherUNIX(QObject *parent = 0);
|
explicit QEventDispatcherUNIX(QObject *parent = nullptr);
|
||||||
~QEventDispatcherUNIX();
|
~QEventDispatcherUNIX();
|
||||||
|
|
||||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
void flush() override;
|
void flush() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = 0);
|
QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObject *parent = nullptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Q_CORE_EXPORT QEventDispatcherUNIXPrivate : public QAbstractEventDispatcherPrivate
|
class Q_CORE_EXPORT QEventDispatcherUNIXPrivate : public QAbstractEventDispatcherPrivate
|
||||||
@ -152,9 +152,9 @@ public:
|
|||||||
|
|
||||||
inline QSocketNotifierSetUNIX::QSocketNotifierSetUNIX() Q_DECL_NOTHROW
|
inline QSocketNotifierSetUNIX::QSocketNotifierSetUNIX() Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
notifiers[0] = 0;
|
notifiers[0] = nullptr;
|
||||||
notifiers[1] = 0;
|
notifiers[1] = nullptr;
|
||||||
notifiers[2] = 0;
|
notifiers[2] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool QSocketNotifierSetUNIX::isEmpty() const Q_DECL_NOTHROW
|
inline bool QSocketNotifierSetUNIX::isEmpty() const Q_DECL_NOTHROW
|
||||||
|
@ -138,7 +138,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
|
|||||||
{ "struct ", 7 },
|
{ "struct ", 7 },
|
||||||
{ "class ", 6 },
|
{ "class ", 6 },
|
||||||
{ "enum ", 5 },
|
{ "enum ", 5 },
|
||||||
{ 0, 0 }
|
{ nullptr, 0 }
|
||||||
};
|
};
|
||||||
int i = 0;
|
int i = 0;
|
||||||
do {
|
do {
|
||||||
@ -146,7 +146,7 @@ static QByteArray normalizeTypeInternal(const char *t, const char *e, bool fixSc
|
|||||||
t += optional[i].len;
|
t += optional[i].len;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (optional[++i].keyword != 0);
|
} while (optional[++i].keyword != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool star = false;
|
bool star = false;
|
||||||
|
@ -226,8 +226,8 @@ struct QMetaObjectPrivate
|
|||||||
static QObjectPrivate::Connection *connect(const QObject *sender, int signal_index,
|
static QObjectPrivate::Connection *connect(const QObject *sender, int signal_index,
|
||||||
const QMetaObject *smeta,
|
const QMetaObject *smeta,
|
||||||
const QObject *receiver, int method_index_relative,
|
const QObject *receiver, int method_index_relative,
|
||||||
const QMetaObject *rmeta = 0,
|
const QMetaObject *rmeta = nullptr,
|
||||||
int type = 0, int *types = 0);
|
int type = 0, int *types = nullptr);
|
||||||
static bool disconnect(const QObject *sender, int signal_index,
|
static bool disconnect(const QObject *sender, int signal_index,
|
||||||
const QMetaObject *smeta,
|
const QMetaObject *smeta,
|
||||||
const QObject *receiver, int method_index, void **slot,
|
const QObject *receiver, int method_index, void **slot,
|
||||||
|
@ -173,7 +173,7 @@ public:
|
|||||||
void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value);
|
void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value);
|
||||||
|
|
||||||
QMetaObject *toMetaObject() const;
|
QMetaObject *toMetaObject() const;
|
||||||
QByteArray toRelocatableData(bool * = 0) const;
|
QByteArray toRelocatableData(bool * = nullptr) const;
|
||||||
static void fromRelocatableData(QMetaObject *, const QMetaObject *, const QByteArray &);
|
static void fromRelocatableData(QMetaObject *, const QMetaObject *, const QByteArray &);
|
||||||
|
|
||||||
#ifndef QT_NO_DATASTREAM
|
#ifndef QT_NO_DATASTREAM
|
||||||
@ -196,7 +196,7 @@ private:
|
|||||||
class Q_CORE_EXPORT QMetaMethodBuilder
|
class Q_CORE_EXPORT QMetaMethodBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QMetaMethodBuilder() : _mobj(0), _index(0) {}
|
QMetaMethodBuilder() : _mobj(nullptr), _index(0) {}
|
||||||
|
|
||||||
int index() const;
|
int index() const;
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ private:
|
|||||||
class Q_CORE_EXPORT QMetaPropertyBuilder
|
class Q_CORE_EXPORT QMetaPropertyBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QMetaPropertyBuilder() : _mobj(0), _index(0) {}
|
QMetaPropertyBuilder() : _mobj(nullptr), _index(0) {}
|
||||||
|
|
||||||
int index() const { return _index; }
|
int index() const { return _index; }
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ private:
|
|||||||
class Q_CORE_EXPORT QMetaEnumBuilder
|
class Q_CORE_EXPORT QMetaEnumBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QMetaEnumBuilder() : _mobj(0), _index(0) {}
|
QMetaEnumBuilder() : _mobj(nullptr), _index(0) {}
|
||||||
|
|
||||||
int index() const { return _index; }
|
int index() const { return _index; }
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (q_sm && q_sm->lock())
|
if (q_sm && q_sm->lock())
|
||||||
return true;
|
return true;
|
||||||
q_sm = 0;
|
q_sm = nullptr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ inline T *v_cast(const QVariant::Private *nd, T * = 0)
|
|||||||
#else // every other compiler in this world
|
#else // every other compiler in this world
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline const T *v_cast(const QVariant::Private *d, T * = 0)
|
inline const T *v_cast(const QVariant::Private *d, T * = nullptr)
|
||||||
{
|
{
|
||||||
return !QVariantIntegrator<T>::CanUseInternalSpace
|
return !QVariantIntegrator<T>::CanUseInternalSpace
|
||||||
? static_cast<const T *>(d->data.shared->ptr)
|
? static_cast<const T *>(d->data.shared->ptr)
|
||||||
@ -96,7 +96,7 @@ inline const T *v_cast(const QVariant::Private *d, T * = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T *v_cast(QVariant::Private *d, T * = 0)
|
inline T *v_cast(QVariant::Private *d, T * = nullptr)
|
||||||
{
|
{
|
||||||
return !QVariantIntegrator<T>::CanUseInternalSpace
|
return !QVariantIntegrator<T>::CanUseInternalSpace
|
||||||
? static_cast<T *>(d->data.shared->ptr)
|
? static_cast<T *>(d->data.shared->ptr)
|
||||||
@ -154,7 +154,7 @@ inline void v_construct(QVariant::Private *x, const T &t)
|
|||||||
|
|
||||||
// constructs a new variant if copy is 0, otherwise copy-constructs
|
// constructs a new variant if copy is 0, otherwise copy-constructs
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
|
inline void v_construct(QVariant::Private *x, const void *copy, T * = nullptr)
|
||||||
{
|
{
|
||||||
if (copy)
|
if (copy)
|
||||||
v_construct<T>(x, *static_cast<const T *>(copy));
|
v_construct<T>(x, *static_cast<const T *>(copy));
|
||||||
@ -164,7 +164,7 @@ inline void v_construct(QVariant::Private *x, const void *copy, T * = 0)
|
|||||||
|
|
||||||
// deletes the internal structures
|
// deletes the internal structures
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void v_clear(QVariant::Private *d, T* = 0)
|
inline void v_clear(QVariant::Private *d, T* = nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!QVariantIntegrator<T>::CanUseInternalSpace) {
|
if (!QVariantIntegrator<T>::CanUseInternalSpace) {
|
||||||
@ -264,7 +264,7 @@ class QVariantIsNull
|
|||||||
struct No { char unused[2]; };
|
struct No { char unused[2]; };
|
||||||
Q_STATIC_ASSERT(sizeof(Yes) != sizeof(No));
|
Q_STATIC_ASSERT(sizeof(Yes) != sizeof(No));
|
||||||
|
|
||||||
template<class C> static decltype(static_cast<const C*>(0)->isNull(), Yes()) test(int);
|
template<class C> static decltype(static_cast<const C*>(nullptr)->isNull(), Yes()) test(int);
|
||||||
template<class C> static No test(...);
|
template<class C> static No test(...);
|
||||||
public:
|
public:
|
||||||
static const bool Value = (sizeof(test<T>(0)) == sizeof(Yes));
|
static const bool Value = (sizeof(test<T>(0)) == sizeof(Yes));
|
||||||
|
@ -96,7 +96,7 @@ public:
|
|||||||
void setLoadHints(QLibrary::LoadHints lh);
|
void setLoadHints(QLibrary::LoadHints lh);
|
||||||
|
|
||||||
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
|
static QLibraryPrivate *findOrCreate(const QString &fileName, const QString &version = QString(),
|
||||||
QLibrary::LoadHints loadHints = 0);
|
QLibrary::LoadHints loadHints = nullptr);
|
||||||
static QStringList suffixes_sys(const QString &fullVersion);
|
static QStringList suffixes_sys(const QString &fullVersion);
|
||||||
static QStringList prefixes_sys();
|
static QStringList prefixes_sys();
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
inline Data(int reserved, QJsonValue::Type valueType)
|
inline Data(int reserved, QJsonValue::Type valueType)
|
||||||
: rawData(0), compactionCounter(0), ownsData(true)
|
: rawData(nullptr), compactionCounter(0), ownsData(true)
|
||||||
{
|
{
|
||||||
Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);
|
Q_ASSERT(valueType == QJsonValue::Array || valueType == QJsonValue::Object);
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ public:
|
|||||||
size = qMax(size + reserve, qMin(size *2, (int)Value::MaxSize));
|
size = qMax(size + reserve, qMin(size *2, (int)Value::MaxSize));
|
||||||
if (size > Value::MaxSize) {
|
if (size > Value::MaxSize) {
|
||||||
qWarning("QJson: Document too large to store in data structure");
|
qWarning("QJson: Document too large to store in data structure");
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
char *raw = (char *)malloc(size);
|
char *raw = (char *)malloc(size);
|
||||||
|
@ -162,12 +162,12 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
const char *const QXmlStreamReader_Table::spell [] = {
|
const char *const QXmlStreamReader_Table::spell [] = {
|
||||||
"end of file", 0, " ", "<", ">", "&", "#", "\'", "\"", "[",
|
"end of file", nullptr, " ", "<", ">", "&", "#", "\'", "\"", "[",
|
||||||
"]", "(", ")", "|", "=", "%", "/", ":", ";", ",",
|
"]", "(", ")", "|", "=", "%", "/", ":", ";", ",",
|
||||||
"-", "+", "*", ".", "?", "!", "[a-zA-Z]", "[0-9]", "[CDATA[", "DOCTYPE",
|
"-", "+", "*", ".", "?", "!", "[a-zA-Z]", "[0-9]", "[CDATA[", "DOCTYPE",
|
||||||
"ELEMENT", "ATTLIST", "ENTITY", "NOTATION", "SYSTEM", "PUBLIC", "NDATA", "REQUIRED", "IMPLIED", "FIXED",
|
"ELEMENT", "ATTLIST", "ENTITY", "NOTATION", "SYSTEM", "PUBLIC", "NDATA", "REQUIRED", "IMPLIED", "FIXED",
|
||||||
"EMPTY", "ANY", "PCDATA", 0, 0, 0, 0, "CDATA", "ID", "IDREF",
|
"EMPTY", "ANY", "PCDATA", nullptr, nullptr, nullptr, nullptr, "CDATA", "ID", "IDREF",
|
||||||
"IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", 0};
|
"IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", nullptr};
|
||||||
|
|
||||||
const short QXmlStreamReader_Table::lhs [] = {
|
const short QXmlStreamReader_Table::lhs [] = {
|
||||||
57, 57, 59, 59, 59, 59, 59, 59, 59, 59,
|
57, 57, 59, 59, 59, 59, 59, 59, 59, 59,
|
||||||
@ -645,7 +645,7 @@ template <typename T> class QXmlStreamSimpleStack {
|
|||||||
T *data;
|
T *data;
|
||||||
int tos, cap;
|
int tos, cap;
|
||||||
public:
|
public:
|
||||||
inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){}
|
inline QXmlStreamSimpleStack():data(nullptr), tos(-1), cap(0){}
|
||||||
inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
|
inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
|
||||||
|
|
||||||
inline void reserve(int extraCapacity) {
|
inline void reserve(int extraCapacity) {
|
||||||
@ -995,7 +995,7 @@ public:
|
|||||||
int fastScanLiteralContent();
|
int fastScanLiteralContent();
|
||||||
int fastScanSpace();
|
int fastScanSpace();
|
||||||
int fastScanContentCharList();
|
int fastScanContentCharList();
|
||||||
int fastScanName(int *prefix = 0);
|
int fastScanName(int *prefix = nullptr);
|
||||||
inline int fastScanNMTOKEN();
|
inline int fastScanNMTOKEN();
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE
|
|||||||
struct QPropertyAssignment
|
struct QPropertyAssignment
|
||||||
{
|
{
|
||||||
QPropertyAssignment()
|
QPropertyAssignment()
|
||||||
: object(0), explicitlySet(true) {}
|
: object(nullptr), explicitlySet(true) {}
|
||||||
QPropertyAssignment(QObject *o, const QByteArray &n,
|
QPropertyAssignment(QObject *o, const QByteArray &n,
|
||||||
const QVariant &v, bool es = true)
|
const QVariant &v, bool es = true)
|
||||||
: object(o), propertyName(n), value(v), explicitlySet(es)
|
: object(o), propertyName(n), value(v), explicitlySet(es)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool objectDeleted() const { return !object; }
|
bool objectDeleted() const { return !object; }
|
||||||
void write() const { Q_ASSERT(object != 0); object->setProperty(propertyName, value); }
|
void write() const { Q_ASSERT(object != nullptr); object->setProperty(propertyName, value); }
|
||||||
bool hasTarget(QObject *o, const QByteArray &pn) const
|
bool hasTarget(QObject *o, const QByteArray &pn) const
|
||||||
{ return object == o && propertyName == pn; }
|
{ return object == o && propertyName == pn; }
|
||||||
|
|
||||||
@ -99,8 +99,8 @@ public:
|
|||||||
QStatePrivate();
|
QStatePrivate();
|
||||||
~QStatePrivate();
|
~QStatePrivate();
|
||||||
|
|
||||||
static QStatePrivate *get(QState *q) { return q ? q->d_func() : 0; }
|
static QStatePrivate *get(QState *q) { return q ? q->d_func() : nullptr; }
|
||||||
static const QStatePrivate *get(const QState *q) { return q? q->d_func() : 0; }
|
static const QStatePrivate *get(const QState *q) { return q? q->d_func() : nullptr; }
|
||||||
|
|
||||||
QList<QAbstractState*> childStates() const;
|
QList<QAbstractState*> childStates() const;
|
||||||
QList<QHistoryState*> historyStates() const;
|
QList<QHistoryState*> historyStates() const;
|
||||||
|
@ -108,7 +108,7 @@ public:
|
|||||||
~QStateMachinePrivate();
|
~QStateMachinePrivate();
|
||||||
|
|
||||||
static QStateMachinePrivate *get(QStateMachine *q)
|
static QStateMachinePrivate *get(QStateMachine *q)
|
||||||
{ return q ? q->d_func() : 0; }
|
{ return q ? q->d_func() : nullptr; }
|
||||||
|
|
||||||
QState *findLCA(const QList<QAbstractState*> &states, bool onlyCompound = false) const;
|
QState *findLCA(const QList<QAbstractState*> &states, bool onlyCompound = false) const;
|
||||||
QState *findLCCA(const QList<QAbstractState*> &states) const;
|
QState *findLCCA(const QList<QAbstractState*> &states) const;
|
||||||
@ -313,7 +313,7 @@ public:
|
|||||||
DelayedEvent(QEvent *e, int tid)
|
DelayedEvent(QEvent *e, int tid)
|
||||||
: event(e), timerId(tid) {}
|
: event(e), timerId(tid) {}
|
||||||
DelayedEvent()
|
DelayedEvent()
|
||||||
: event(0), timerId(0) {}
|
: event(nullptr), timerId(0) {}
|
||||||
};
|
};
|
||||||
QHash<int, DelayedEvent> delayedEvents;
|
QHash<int, DelayedEvent> delayedEvents;
|
||||||
QHash<int, int> timerIdToDelayedEventId;
|
QHash<int, int> timerIdToDelayedEventId;
|
||||||
|
@ -65,7 +65,7 @@ template <typename T> struct QAtomicOps: QGenericAtomicOps<QAtomicOps<T> >
|
|||||||
return --_q_value != 0;
|
return --_q_value != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
|
static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue = nullptr) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
if (currentValue)
|
if (currentValue)
|
||||||
*currentValue = _q_value;
|
*currentValue = _q_value;
|
||||||
|
@ -142,7 +142,7 @@ public:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
int addResult(int index, const T *result)
|
int addResult(int index, const T *result)
|
||||||
{
|
{
|
||||||
if (result == 0)
|
if (result == nullptr)
|
||||||
return addResult(index, static_cast<void *>(nullptr));
|
return addResult(index, static_cast<void *>(nullptr));
|
||||||
else
|
else
|
||||||
return addResult(index, static_cast<void *>(new T(*result)));
|
return addResult(index, static_cast<void *>(new T(*result)));
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
int addResults(int index, const QVector<T> *results, int totalCount)
|
int addResults(int index, const QVector<T> *results, int totalCount)
|
||||||
{
|
{
|
||||||
if (m_filterMode == true && results->count() != totalCount && 0 == results->count())
|
if (m_filterMode == true && results->count() != totalCount && 0 == results->count())
|
||||||
return addResults(index, 0, 0, totalCount);
|
return addResults(index, nullptr, 0, totalCount);
|
||||||
else
|
else
|
||||||
return addResults(index, new QVector<T>(*results), results->count(), totalCount);
|
return addResults(index, new QVector<T>(*results), results->count(), totalCount);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
QEvent *event;
|
QEvent *event;
|
||||||
int priority;
|
int priority;
|
||||||
inline QPostEvent()
|
inline QPostEvent()
|
||||||
: receiver(0), event(0), priority(0)
|
: receiver(nullptr), event(nullptr), priority(0)
|
||||||
{ }
|
{ }
|
||||||
inline QPostEvent(QObject *r, QEvent *e, int p)
|
inline QPostEvent(QObject *r, QEvent *e, int p)
|
||||||
: receiver(r), event(e), priority(p)
|
: receiver(r), event(e), priority(p)
|
||||||
@ -148,7 +148,7 @@ private:
|
|||||||
class Q_CORE_EXPORT QDaemonThread : public QThread
|
class Q_CORE_EXPORT QDaemonThread : public QThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QDaemonThread(QObject *parent = 0);
|
QDaemonThread(QObject *parent = nullptr);
|
||||||
~QDaemonThread();
|
~QDaemonThread();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ class QThreadPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QThread)
|
Q_DECLARE_PUBLIC(QThread)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QThreadPrivate(QThreadData *d = 0);
|
QThreadPrivate(QThreadData *d = nullptr);
|
||||||
~QThreadPrivate();
|
~QThreadPrivate();
|
||||||
|
|
||||||
void setPriority(QThread::Priority prio);
|
void setPriority(QThread::Priority prio);
|
||||||
@ -248,7 +248,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
static void clearCurrentThreadData();
|
static void clearCurrentThreadData();
|
||||||
static QThreadData *get2(QThread *thread)
|
static QThreadData *get2(QThread *thread)
|
||||||
{ Q_ASSERT_X(thread != 0, "QThread", "internal error"); return thread->d_func()->data; }
|
{ Q_ASSERT_X(thread != nullptr, "QThread", "internal error"); return thread->d_func()->data; }
|
||||||
|
|
||||||
|
|
||||||
void ref();
|
void ref();
|
||||||
@ -281,7 +281,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
FlaggedDebugSignatures() : idx(0)
|
FlaggedDebugSignatures() : idx(0)
|
||||||
{ std::fill_n(locations, Count, static_cast<char*>(0)); }
|
{ std::fill_n(locations, Count, static_cast<char*>(nullptr)); }
|
||||||
|
|
||||||
void store(const char* method)
|
void store(const char* method)
|
||||||
{ locations[idx++ % Count] = method; }
|
{ locations[idx++ % Count] = method; }
|
||||||
@ -328,7 +328,7 @@ class QAdoptedThread : public QThread
|
|||||||
Q_DECLARE_PRIVATE(QThread)
|
Q_DECLARE_PRIVATE(QThread)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QAdoptedThread(QThreadData *data = 0);
|
QAdoptedThread(QThreadData *data = nullptr);
|
||||||
~QAdoptedThread();
|
~QAdoptedThread();
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ public:
|
|||||||
void tryToStartMoreThreads();
|
void tryToStartMoreThreads();
|
||||||
bool tooManyThreadsActive() const;
|
bool tooManyThreadsActive() const;
|
||||||
|
|
||||||
void startThread(QRunnable *runnable = 0);
|
void startThread(QRunnable *runnable = nullptr);
|
||||||
void reset();
|
void reset();
|
||||||
bool waitForDone(int msecs);
|
bool waitForDone(int msecs);
|
||||||
bool waitForDone(const QDeadlineTimer &timer);
|
bool waitForDone(const QDeadlineTimer &timer);
|
||||||
|
@ -69,7 +69,7 @@ inline
|
|||||||
T *&qThreadStorage_localData(QThreadStorageData &d, T **)
|
T *&qThreadStorage_localData(QThreadStorageData &d, T **)
|
||||||
{
|
{
|
||||||
void **v = d.get();
|
void **v = d.get();
|
||||||
if (!v) v = d.set(0);
|
if (!v) v = d.set(nullptr);
|
||||||
return *(reinterpret_cast<T**>(v));
|
return *(reinterpret_cast<T**>(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ public:
|
|||||||
inline ~QThreadStorage() { }
|
inline ~QThreadStorage() { }
|
||||||
|
|
||||||
inline bool hasLocalData() const
|
inline bool hasLocalData() const
|
||||||
{ return d.get() != 0; }
|
{ return d.get() != nullptr; }
|
||||||
|
|
||||||
inline T& localData()
|
inline T& localData()
|
||||||
{ return qThreadStorage_localData(d, reinterpret_cast<T*>(0)); }
|
{ return qThreadStorage_localData(d, reinterpret_cast<T*>(0)); }
|
||||||
|
@ -51,7 +51,7 @@ class QCache
|
|||||||
struct Node {
|
struct Node {
|
||||||
inline Node() : keyPtr(0) {}
|
inline Node() : keyPtr(0) {}
|
||||||
inline Node(T *data, int cost)
|
inline Node(T *data, int cost)
|
||||||
: keyPtr(0), t(data), c(cost), p(0), n(0) {}
|
: keyPtr(nullptr), t(data), c(cost), p(nullptr), n(nullptr) {}
|
||||||
const Key *keyPtr; T *t; int c; Node *p,*n;
|
const Key *keyPtr; T *t; int c; Node *p,*n;
|
||||||
};
|
};
|
||||||
Node *f, *l;
|
Node *f, *l;
|
||||||
@ -71,14 +71,14 @@ class QCache
|
|||||||
inline T *relink(const Key &key) {
|
inline T *relink(const Key &key) {
|
||||||
typename QHash<Key, Node>::iterator i = hash.find(key);
|
typename QHash<Key, Node>::iterator i = hash.find(key);
|
||||||
if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
|
if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
Node &n = *i;
|
Node &n = *i;
|
||||||
if (f != &n) {
|
if (f != &n) {
|
||||||
if (n.p) n.p->n = n.n;
|
if (n.p) n.p->n = n.n;
|
||||||
if (n.n) n.n->p = n.p;
|
if (n.n) n.n->p = n.p;
|
||||||
if (l == &n) l = n.p;
|
if (l == &n) l = n.p;
|
||||||
n.p = 0;
|
n.p = nullptr;
|
||||||
n.n = f;
|
n.n = f;
|
||||||
f->p = &n;
|
f->p = &n;
|
||||||
f = &n;
|
f = &n;
|
||||||
@ -117,12 +117,12 @@ private:
|
|||||||
|
|
||||||
template <class Key, class T>
|
template <class Key, class T>
|
||||||
inline QCache<Key, T>::QCache(int amaxCost) Q_DECL_NOTHROW
|
inline QCache<Key, T>::QCache(int amaxCost) Q_DECL_NOTHROW
|
||||||
: f(0), l(0), mx(amaxCost), total(0) {}
|
: f(nullptr), l(nullptr), mx(amaxCost), total(0) {}
|
||||||
|
|
||||||
template <class Key, class T>
|
template <class Key, class T>
|
||||||
inline void QCache<Key,T>::clear()
|
inline void QCache<Key,T>::clear()
|
||||||
{ while (f) { delete f->t; f = f->n; }
|
{ while (f) { delete f->t; f = f->n; }
|
||||||
hash.clear(); l = 0; total = 0; }
|
hash.clear(); l = nullptr; total = 0; }
|
||||||
|
|
||||||
template <class Key, class T>
|
template <class Key, class T>
|
||||||
inline void QCache<Key,T>::setMaxCost(int m)
|
inline void QCache<Key,T>::setMaxCost(int m)
|
||||||
@ -153,11 +153,11 @@ inline T *QCache<Key,T>::take(const Key &key)
|
|||||||
{
|
{
|
||||||
typename QHash<Key, Node>::iterator i = hash.find(key);
|
typename QHash<Key, Node>::iterator i = hash.find(key);
|
||||||
if (i == hash.end())
|
if (i == hash.end())
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
Node &n = *i;
|
Node &n = *i;
|
||||||
T *t = n.t;
|
T *t = n.t;
|
||||||
n.t = 0;
|
n.t = nullptr;
|
||||||
unlink(n);
|
unlink(n);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ public:
|
|||||||
#if QT_CONFIG(timezone)
|
#if QT_CONFIG(timezone)
|
||||||
static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone,
|
static qint64 zoneMSecsToEpochMSecs(qint64 msecs, const QTimeZone &zone,
|
||||||
DaylightStatus hint = UnknownDaylightTime,
|
DaylightStatus hint = UnknownDaylightTime,
|
||||||
QDate *localDate = 0, QTime *localTime = 0);
|
QDate *localDate = nullptr, QTime *localTime = nullptr);
|
||||||
|
|
||||||
// Inlined for its one caller in qdatetime.cpp
|
// Inlined for its one caller in qdatetime.cpp
|
||||||
inline void setUtcOffsetByTZ(qint64 atMSecsSinceEpoch);
|
inline void setUtcOffsetByTZ(qint64 atMSecsSinceEpoch);
|
||||||
|
@ -86,7 +86,7 @@ public:
|
|||||||
DateTimeEdit
|
DateTimeEdit
|
||||||
};
|
};
|
||||||
QDateTimeParser(QVariant::Type t, Context ctx)
|
QDateTimeParser(QVariant::Type t, Context ctx)
|
||||||
: currentSectionIndex(-1), display(0), cachedDay(-1), parserType(t),
|
: currentSectionIndex(-1), display(nullptr), cachedDay(-1), parserType(t),
|
||||||
fixday(false), spec(Qt::LocalTime), context(ctx)
|
fixday(false), spec(Qt::LocalTime), context(ctx)
|
||||||
{
|
{
|
||||||
defaultLocale = QLocale::system();
|
defaultLocale = QLocale::system();
|
||||||
@ -218,9 +218,9 @@ private:
|
|||||||
ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex,
|
ParsedSection parseSection(const QDateTime ¤tValue, int sectionIndex,
|
||||||
int offset, QString *text) const;
|
int offset, QString *text) const;
|
||||||
int findMonth(const QString &str1, int monthstart, int sectionIndex,
|
int findMonth(const QString &str1, int monthstart, int sectionIndex,
|
||||||
QString *monthName = 0, int *used = 0) const;
|
QString *monthName = nullptr, int *used = nullptr) const;
|
||||||
int findDay(const QString &str1, int intDaystart, int sectionIndex,
|
int findDay(const QString &str1, int intDaystart, int sectionIndex,
|
||||||
QString *dayName = 0, int *used = 0) const;
|
QString *dayName = nullptr, int *used = nullptr) const;
|
||||||
ParsedSection findTimeZone(QStringRef str, const QDateTime &when,
|
ParsedSection findTimeZone(QStringRef str, const QDateTime &when,
|
||||||
int maxVal, int minVal) const;
|
int maxVal, int minVal) const;
|
||||||
#if QT_CONFIG(timezone)
|
#if QT_CONFIG(timezone)
|
||||||
@ -236,7 +236,7 @@ private:
|
|||||||
PossiblePM = 3,
|
PossiblePM = 3,
|
||||||
PossibleBoth = 4
|
PossibleBoth = 4
|
||||||
};
|
};
|
||||||
AmPmFinder findAmPm(QString &str, int index, int *used = 0) const;
|
AmPmFinder findAmPm(QString &str, int index, int *used = nullptr) const;
|
||||||
#endif // datestring
|
#endif // datestring
|
||||||
|
|
||||||
bool potentialValue(const QStringRef &str, int min, int max, int index,
|
bool potentialValue(const QStringRef &str, int min, int max, int index,
|
||||||
|
@ -249,11 +249,11 @@ inline int QFreeList<T, ConstantsType>::next()
|
|||||||
|
|
||||||
if (!v) {
|
if (!v) {
|
||||||
v = allocate((id & ConstantsType::IndexMask) - at, ConstantsType::Sizes[block]);
|
v = allocate((id & ConstantsType::IndexMask) - at, ConstantsType::Sizes[block]);
|
||||||
if (!_v[block].testAndSetRelease(0, v)) {
|
if (!_v[block].testAndSetRelease(nullptr, v)) {
|
||||||
// race with another thread lost
|
// race with another thread lost
|
||||||
delete [] v;
|
delete [] v;
|
||||||
v = _v[block].loadAcquire();
|
v = _v[block].loadAcquire();
|
||||||
Q_ASSERT(v != 0);
|
Q_ASSERT(v != nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ inline typename QList<T>::iterator QList<T>::insert(iterator before, const T &t)
|
|||||||
Q_ASSERT_X(isValidIterator(before), "QList::insert", "The specified iterator argument 'before' is invalid");
|
Q_ASSERT_X(isValidIterator(before), "QList::insert", "The specified iterator argument 'before' is invalid");
|
||||||
|
|
||||||
int iBefore = int(before.i - reinterpret_cast<Node *>(p.begin()));
|
int iBefore = int(before.i - reinterpret_cast<Node *>(p.begin()));
|
||||||
Node *n = 0;
|
Node *n = nullptr;
|
||||||
if (d->ref.isShared())
|
if (d->ref.isShared())
|
||||||
n = detach_helper_grow(iBefore, 1);
|
n = detach_helper_grow(iBefore, 1);
|
||||||
else
|
else
|
||||||
|
@ -249,7 +249,7 @@ public:
|
|||||||
if (qIsInf(d))
|
if (qIsInf(d))
|
||||||
return float(d);
|
return float(d);
|
||||||
if (std::fabs(d) > std::numeric_limits<float>::max()) {
|
if (std::fabs(d) > std::numeric_limits<float>::max()) {
|
||||||
if (ok != 0)
|
if (ok != nullptr)
|
||||||
*ok = false;
|
*ok = false;
|
||||||
const float huge = std::numeric_limits<float>::infinity();
|
const float huge = std::numeric_limits<float>::infinity();
|
||||||
return d < 0 ? -huge : huge;
|
return d < 0 ? -huge : huge;
|
||||||
|
@ -71,7 +71,7 @@ class QDBusArgumentPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline QDBusArgumentPrivate(int flags = 0)
|
inline QDBusArgumentPrivate(int flags = 0)
|
||||||
: message(0), ref(1), capabilities(flags)
|
: message(nullptr), ref(1), capabilities(flags)
|
||||||
{ }
|
{ }
|
||||||
virtual ~QDBusArgumentPrivate();
|
virtual ~QDBusArgumentPrivate();
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public:
|
|||||||
class QDBusMarshaller: public QDBusArgumentPrivate
|
class QDBusMarshaller: public QDBusArgumentPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0), ba(0), closeCode(0), ok(true), skipSignature(false)
|
QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr), ba(nullptr), closeCode(0), ok(true), skipSignature(false)
|
||||||
{ direction = Marshalling; }
|
{ direction = Marshalling; }
|
||||||
~QDBusMarshaller();
|
~QDBusMarshaller();
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ private:
|
|||||||
class QDBusDemarshaller: public QDBusArgumentPrivate
|
class QDBusDemarshaller: public QDBusArgumentPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0)
|
inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr)
|
||||||
{ direction = Demarshalling; }
|
{ direction = Demarshalling; }
|
||||||
~QDBusDemarshaller();
|
~QDBusDemarshaller();
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ public:
|
|||||||
|
|
||||||
struct Watcher
|
struct Watcher
|
||||||
{
|
{
|
||||||
Watcher(): watch(0), read(0), write(0) {}
|
Watcher(): watch(nullptr), read(nullptr), write(nullptr) {}
|
||||||
DBusWatch *watch;
|
DBusWatch *watch;
|
||||||
QSocketNotifier *read;
|
QSocketNotifier *read;
|
||||||
QSocketNotifier *write;
|
QSocketNotifier *write;
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
|
|
||||||
struct SignalHook
|
struct SignalHook
|
||||||
{
|
{
|
||||||
inline SignalHook() : obj(0), midx(-1) { }
|
inline SignalHook() : obj(nullptr), midx(-1) { }
|
||||||
QString service, path, signature;
|
QString service, path, signature;
|
||||||
QObject* obj;
|
QObject* obj;
|
||||||
int midx;
|
int midx;
|
||||||
@ -150,9 +150,9 @@ public:
|
|||||||
{
|
{
|
||||||
typedef QVector<ObjectTreeNode> DataList;
|
typedef QVector<ObjectTreeNode> DataList;
|
||||||
|
|
||||||
inline ObjectTreeNode() : obj(0), flags(0) { }
|
inline ObjectTreeNode() : obj(nullptr), flags(0) { }
|
||||||
inline ObjectTreeNode(const QString &n) // intentionally implicit
|
inline ObjectTreeNode(const QString &n) // intentionally implicit
|
||||||
: name(n), obj(0), flags(0) { }
|
: name(n), obj(nullptr), flags(0) { }
|
||||||
inline bool operator<(const QString &other) const
|
inline bool operator<(const QString &other) const
|
||||||
{ return name < other; }
|
{ return name < other; }
|
||||||
inline bool operator<(const QStringRef &other) const
|
inline bool operator<(const QStringRef &other) const
|
||||||
@ -194,7 +194,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// public methods are entry points from other objects
|
// public methods are entry points from other objects
|
||||||
explicit QDBusConnectionPrivate(QObject *parent = 0);
|
explicit QDBusConnectionPrivate(QObject *parent = nullptr);
|
||||||
~QDBusConnectionPrivate();
|
~QDBusConnectionPrivate();
|
||||||
|
|
||||||
void createBusService();
|
void createBusService();
|
||||||
|
@ -106,7 +106,7 @@ class QDBusCallDeliveryEvent: public QMetaCallEvent
|
|||||||
public:
|
public:
|
||||||
QDBusCallDeliveryEvent(const QDBusConnection &c, int id, QObject *sender,
|
QDBusCallDeliveryEvent(const QDBusConnection &c, int id, QObject *sender,
|
||||||
const QDBusMessage &msg, const QVector<int> &types, int f = 0)
|
const QDBusMessage &msg, const QVector<int> &types, int f = 0)
|
||||||
: QMetaCallEvent(0, id, 0, sender, -1), connection(c), message(msg), metaTypes(types), flags(f)
|
: QMetaCallEvent(0, id, nullptr, sender, -1), connection(c), message(msg), metaTypes(types), flags(f)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void placeMetaCall(QObject *object) override
|
void placeMetaCall(QObject *object) override
|
||||||
@ -126,8 +126,8 @@ class QDBusActivateObjectEvent: public QMetaCallEvent
|
|||||||
public:
|
public:
|
||||||
QDBusActivateObjectEvent(const QDBusConnection &c, QObject *sender,
|
QDBusActivateObjectEvent(const QDBusConnection &c, QObject *sender,
|
||||||
const QDBusConnectionPrivate::ObjectTreeNode &n,
|
const QDBusConnectionPrivate::ObjectTreeNode &n,
|
||||||
int p, const QDBusMessage &m, QSemaphore *s = 0)
|
int p, const QDBusMessage &m, QSemaphore *s = nullptr)
|
||||||
: QMetaCallEvent(0, ushort(-1), 0, sender, -1, 0, 0, 0, s), connection(c), node(n),
|
: QMetaCallEvent(0, ushort(-1), nullptr, sender, -1, 0, nullptr, nullptr, s), connection(c), node(n),
|
||||||
pathStartPos(p), message(m), handled(false)
|
pathStartPos(p), message(m), handled(false)
|
||||||
{ }
|
{ }
|
||||||
~QDBusActivateObjectEvent();
|
~QDBusActivateObjectEvent();
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
|
QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
|
||||||
: sentMessage(sent), connection(connection), watcherHelper(0), pending(0)
|
: sentMessage(sent), connection(connection), watcherHelper(nullptr), pending(nullptr)
|
||||||
{ }
|
{ }
|
||||||
~QDBusPendingCallPrivate();
|
~QDBusPendingCallPrivate();
|
||||||
bool setReplyCallback(QObject *target, const char *member);
|
bool setReplyCallback(QObject *target, const char *member);
|
||||||
|
@ -156,7 +156,7 @@ public:
|
|||||||
{
|
{
|
||||||
Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds");
|
Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds");
|
||||||
typedef typename Select<Index>::Type ResultType;
|
typedef typename Select<Index>::Type ResultType;
|
||||||
return qdbus_cast<ResultType>(argumentAt(Index), 0);
|
return qdbus_cast<ResultType>(argumentAt(Index), nullptr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = 0)
|
inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = nullptr)
|
||||||
{
|
{
|
||||||
if (!nameType) nameType = "member";
|
if (!nameType) nameType = "member";
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
QAccessibleInterface *interfaceForId(QAccessible::Id id) const;
|
QAccessibleInterface *interfaceForId(QAccessible::Id id) const;
|
||||||
QAccessible::Id idForInterface(QAccessibleInterface *iface) const;
|
QAccessible::Id idForInterface(QAccessibleInterface *iface) const;
|
||||||
QAccessible::Id insert(QObject *object, QAccessibleInterface *iface) const;
|
QAccessible::Id insert(QObject *object, QAccessibleInterface *iface) const;
|
||||||
void deleteInterface(QAccessible::Id id, QObject *obj = 0);
|
void deleteInterface(QAccessible::Id id, QObject *obj = nullptr);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *elementForId(QAccessible::Id axid) const;
|
QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *elementForId(QAccessible::Id axid) const;
|
||||||
|
@ -67,7 +67,7 @@ struct Q_GUI_EXPORT QImageData { // internal image data
|
|||||||
QImageData();
|
QImageData();
|
||||||
~QImageData();
|
~QImageData();
|
||||||
static QImageData *create(const QSize &size, QImage::Format format);
|
static QImageData *create(const QSize &size, QImage::Format format);
|
||||||
static QImageData *create(uchar *data, int w, int h, int bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction = 0, void *cleanupInfo = 0);
|
static QImageData *create(uchar *data, int w, int h, int bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
|
||||||
|
|
||||||
QAtomicInt ref;
|
QAtomicInt ref;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
&& !d->image.d->paintEngine->isActive())
|
&& !d->image.d->paintEngine->isActive())
|
||||||
{
|
{
|
||||||
delete d->image.d->paintEngine;
|
delete d->image.d->paintEngine;
|
||||||
d->image.d->paintEngine = 0;
|
d->image.d->paintEngine = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
QByteArray name() const override;
|
QByteArray name() const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool canRead(QIODevice *device, QByteArray *subType = 0);
|
static bool canRead(QIODevice *device, QByteArray *subType = nullptr);
|
||||||
|
|
||||||
QVariant option(ImageOption option) const override;
|
QVariant option(ImageOption option) const override;
|
||||||
void setOption(ImageOption option, const QVariant &value) override;
|
void setOption(ImageOption option, const QVariant &value) override;
|
||||||
|
@ -109,11 +109,11 @@ class QStandardItemPrivate
|
|||||||
Q_DECLARE_PUBLIC(QStandardItem)
|
Q_DECLARE_PUBLIC(QStandardItem)
|
||||||
public:
|
public:
|
||||||
inline QStandardItemPrivate()
|
inline QStandardItemPrivate()
|
||||||
: model(0),
|
: model(nullptr),
|
||||||
parent(0),
|
parent(nullptr),
|
||||||
rows(0),
|
rows(0),
|
||||||
columns(0),
|
columns(0),
|
||||||
q_ptr(0),
|
q_ptr(nullptr),
|
||||||
lastKnownIndex(-1)
|
lastKnownIndex(-1)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@ -220,10 +220,10 @@ public:
|
|||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return root.data();
|
return root.data();
|
||||||
if (index.model() != q)
|
if (index.model() != q)
|
||||||
return 0;
|
return nullptr;
|
||||||
QStandardItem *parent = static_cast<QStandardItem*>(index.internalPointer());
|
QStandardItem *parent = static_cast<QStandardItem*>(index.internalPointer());
|
||||||
if (parent == 0)
|
if (parent == nullptr)
|
||||||
return 0;
|
return nullptr;
|
||||||
return parent->child(index.row(), index.column());
|
return parent->child(index.row(), index.column());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@ class QDragPrivate : public QObjectPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QDragPrivate()
|
QDragPrivate()
|
||||||
: source(0)
|
: source(nullptr)
|
||||||
, target(0)
|
, target(nullptr)
|
||||||
, data(0)
|
, data(nullptr)
|
||||||
{ }
|
{ }
|
||||||
QObject *source;
|
QObject *source;
|
||||||
QObject *target;
|
QObject *target;
|
||||||
|
@ -115,7 +115,7 @@ public:
|
|||||||
if (QCoreApplication::instance())
|
if (QCoreApplication::instance())
|
||||||
return QCoreApplication::instance()->d_func()->threadData->eventDispatcher.load();
|
return QCoreApplication::instance()->d_func()->threadData->eventDispatcher.load();
|
||||||
else
|
else
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e);
|
static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e);
|
||||||
@ -205,7 +205,7 @@ public:
|
|||||||
static void showModalWindow(QWindow *window);
|
static void showModalWindow(QWindow *window);
|
||||||
static void hideModalWindow(QWindow *window);
|
static void hideModalWindow(QWindow *window);
|
||||||
static void updateBlockedStatus(QWindow *window);
|
static void updateBlockedStatus(QWindow *window);
|
||||||
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
|
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = nullptr) const;
|
||||||
virtual bool popupActive() { return false; }
|
virtual bool popupActive() { return false; }
|
||||||
|
|
||||||
static ulong mousePressTime;
|
static ulong mousePressTime;
|
||||||
|
@ -67,7 +67,7 @@ class QInputMethodPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QInputMethod)
|
Q_DECLARE_PUBLIC(QInputMethod)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline QInputMethodPrivate() : testContext(0)
|
inline QInputMethodPrivate() : testContext(nullptr)
|
||||||
{}
|
{}
|
||||||
QPlatformInputContext *platformInputContext() const
|
QPlatformInputContext *platformInputContext() const
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ class Q_GUI_EXPORT QOpenGLContextGroupPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QOpenGLContextGroup)
|
Q_DECLARE_PUBLIC(QOpenGLContextGroup)
|
||||||
public:
|
public:
|
||||||
QOpenGLContextGroupPrivate()
|
QOpenGLContextGroupPrivate()
|
||||||
: m_context(0)
|
: m_context(nullptr)
|
||||||
, m_mutex(QMutex::Recursive)
|
, m_mutex(QMutex::Recursive)
|
||||||
, m_refs(0)
|
, m_refs(0)
|
||||||
{
|
{
|
||||||
@ -198,20 +198,20 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QOpenGLContext)
|
Q_DECLARE_PUBLIC(QOpenGLContext)
|
||||||
public:
|
public:
|
||||||
QOpenGLContextPrivate()
|
QOpenGLContextPrivate()
|
||||||
: qGLContextHandle(0)
|
: qGLContextHandle(nullptr)
|
||||||
, qGLContextDeleteFunction(0)
|
, qGLContextDeleteFunction(nullptr)
|
||||||
, platformGLContext(0)
|
, platformGLContext(nullptr)
|
||||||
, shareContext(0)
|
, shareContext(nullptr)
|
||||||
, shareGroup(0)
|
, shareGroup(nullptr)
|
||||||
, screen(0)
|
, screen(nullptr)
|
||||||
, surface(0)
|
, surface(nullptr)
|
||||||
, functions(0)
|
, functions(nullptr)
|
||||||
, textureFunctions(0)
|
, textureFunctions(nullptr)
|
||||||
, max_texture_size(-1)
|
, max_texture_size(-1)
|
||||||
, workaround_brokenFBOReadBack(false)
|
, workaround_brokenFBOReadBack(false)
|
||||||
, workaround_brokenTexSubImage(false)
|
, workaround_brokenTexSubImage(false)
|
||||||
, workaround_missingPrecisionQualifiers(false)
|
, workaround_missingPrecisionQualifiers(false)
|
||||||
, active_engine(0)
|
, active_engine(nullptr)
|
||||||
, qgl_current_fbo_invalid(false)
|
, qgl_current_fbo_invalid(false)
|
||||||
, qgl_current_fbo(nullptr)
|
, qgl_current_fbo(nullptr)
|
||||||
, defaultFboRedirect(0)
|
, defaultFboRedirect(0)
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
|
|
||||||
virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
|
virtual QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const;
|
||||||
virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
|
virtual QPlatformWindow *createPlatformWindow(QWindow *window) const = 0;
|
||||||
virtual QPlatformWindow *createForeignWindow(QWindow *, WId) const { return 0; }
|
virtual QPlatformWindow *createForeignWindow(QWindow *, WId) const { return nullptr; }
|
||||||
virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
|
virtual QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const = 0;
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||||
|
@ -309,7 +309,7 @@ public:
|
|||||||
|
|
||||||
virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const;
|
virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const;
|
||||||
virtual QIcon fileIcon(const QFileInfo &fileInfo,
|
virtual QIcon fileIcon(const QFileInfo &fileInfo,
|
||||||
QPlatformTheme::IconOptions iconOptions = 0) const;
|
QPlatformTheme::IconOptions iconOptions = nullptr) const;
|
||||||
virtual QIconEngine *createIconEngine(const QString &iconName) const;
|
virtual QIconEngine *createIconEngine(const QString &iconName) const;
|
||||||
|
|
||||||
#ifndef QT_NO_SHORTCUT
|
#ifndef QT_NO_SHORTCUT
|
||||||
|
@ -65,8 +65,8 @@ class QScreenPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QScreen)
|
Q_DECLARE_PUBLIC(QScreen)
|
||||||
public:
|
public:
|
||||||
QScreenPrivate()
|
QScreenPrivate()
|
||||||
: platformScreen(0)
|
: platformScreen(nullptr)
|
||||||
, orientationUpdateMask(0)
|
, orientationUpdateMask(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class QShapedPixmapWindow : public QRasterWindow
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QShapedPixmapWindow(QScreen *screen = 0);
|
explicit QShapedPixmapWindow(QScreen *screen = nullptr);
|
||||||
~QShapedPixmapWindow();
|
~QShapedPixmapWindow();
|
||||||
|
|
||||||
void setUseCompositing(bool on) { m_useCompositing = on; }
|
void setUseCompositing(bool on) { m_useCompositing = on; }
|
||||||
|
@ -79,8 +79,8 @@ public:
|
|||||||
: QObjectPrivate()
|
: QObjectPrivate()
|
||||||
, surfaceType(QWindow::RasterSurface)
|
, surfaceType(QWindow::RasterSurface)
|
||||||
, windowFlags(Qt::Window)
|
, windowFlags(Qt::Window)
|
||||||
, parentWindow(0)
|
, parentWindow(nullptr)
|
||||||
, platformWindow(0)
|
, platformWindow(nullptr)
|
||||||
, visible(false)
|
, visible(false)
|
||||||
, visibilityOnDestroy(false)
|
, visibilityOnDestroy(false)
|
||||||
, exposed(false)
|
, exposed(false)
|
||||||
@ -97,8 +97,8 @@ public:
|
|||||||
, modality(Qt::NonModal)
|
, modality(Qt::NonModal)
|
||||||
, blockedByModalWindow(false)
|
, blockedByModalWindow(false)
|
||||||
, updateRequestPending(false)
|
, updateRequestPending(false)
|
||||||
, transientParent(0)
|
, transientParent(nullptr)
|
||||||
, topLevelScreen(0)
|
, topLevelScreen(nullptr)
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
, cursor(Qt::ArrowCursor)
|
, cursor(Qt::ArrowCursor)
|
||||||
, hasCursor(false)
|
, hasCursor(false)
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
|
|
||||||
void maybeQuitOnLastWindowClosed();
|
void maybeQuitOnLastWindowClosed();
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
void setCursor(const QCursor *c = 0);
|
void setCursor(const QCursor *c = nullptr);
|
||||||
bool applyCursor();
|
bool applyCursor();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ public:
|
|||||||
|
|
||||||
class CloseEvent : public WindowSystemEvent {
|
class CloseEvent : public WindowSystemEvent {
|
||||||
public:
|
public:
|
||||||
explicit CloseEvent(QWindow *w, bool *a = 0)
|
explicit CloseEvent(QWindow *w, bool *a = nullptr)
|
||||||
: WindowSystemEvent(Close), window(w), accepted(a)
|
: WindowSystemEvent(Close), window(w), accepted(a)
|
||||||
{ }
|
{ }
|
||||||
QPointer<QWindow> window;
|
QPointer<QWindow> window;
|
||||||
@ -398,7 +398,7 @@ public:
|
|||||||
class TabletEnterProximityEvent : public InputEvent {
|
class TabletEnterProximityEvent : public InputEvent {
|
||||||
public:
|
public:
|
||||||
TabletEnterProximityEvent(ulong time, int device, int pointerType, qint64 uid)
|
TabletEnterProximityEvent(ulong time, int device, int pointerType, qint64 uid)
|
||||||
: InputEvent(0, time, TabletEnterProximity, Qt::NoModifier),
|
: InputEvent(nullptr, time, TabletEnterProximity, Qt::NoModifier),
|
||||||
device(device), pointerType(pointerType), uid(uid) { }
|
device(device), pointerType(pointerType), uid(uid) { }
|
||||||
int device;
|
int device;
|
||||||
int pointerType;
|
int pointerType;
|
||||||
@ -408,7 +408,7 @@ public:
|
|||||||
class TabletLeaveProximityEvent : public InputEvent {
|
class TabletLeaveProximityEvent : public InputEvent {
|
||||||
public:
|
public:
|
||||||
TabletLeaveProximityEvent(ulong time, int device, int pointerType, qint64 uid)
|
TabletLeaveProximityEvent(ulong time, int device, int pointerType, qint64 uid)
|
||||||
: InputEvent(0, time, TabletLeaveProximity, Qt::NoModifier),
|
: InputEvent(nullptr, time, TabletLeaveProximity, Qt::NoModifier),
|
||||||
device(device), pointerType(pointerType), uid(uid) { }
|
device(device), pointerType(pointerType), uid(uid) { }
|
||||||
int device;
|
int device;
|
||||||
int pointerType;
|
int pointerType;
|
||||||
@ -474,7 +474,7 @@ public:
|
|||||||
for (int i = 0; i < impl.size(); ++i)
|
for (int i = 0; i < impl.size(); ++i)
|
||||||
if (!(impl.at(i)->type & QWindowSystemInterfacePrivate::UserInputEvent))
|
if (!(impl.at(i)->type & QWindowSystemInterfacePrivate::UserInputEvent))
|
||||||
return impl.takeAt(i);
|
return impl.takeAt(i);
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
bool nonUserInputEventsQueued()
|
bool nonUserInputEventsQueued()
|
||||||
{
|
{
|
||||||
@ -495,7 +495,7 @@ public:
|
|||||||
if (impl.at(i)->type == t)
|
if (impl.at(i)->type == t)
|
||||||
return impl.at(i);
|
return impl.at(i);
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
void remove(const WindowSystemEvent *e)
|
void remove(const WindowSystemEvent *e)
|
||||||
{
|
{
|
||||||
|
@ -370,7 +370,7 @@ private:
|
|||||||
class QOpenGLEngineShaderProg
|
class QOpenGLEngineShaderProg
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QOpenGLEngineShaderProg() : program(0) {}
|
QOpenGLEngineShaderProg() : program(nullptr) {}
|
||||||
|
|
||||||
~QOpenGLEngineShaderProg() {
|
~QOpenGLEngineShaderProg() {
|
||||||
if (program)
|
if (program)
|
||||||
|
@ -107,7 +107,7 @@ public:
|
|||||||
QOpenGLExtensionsPrivate *d() const;
|
QOpenGLExtensionsPrivate *d() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != 0; }
|
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != nullptr; }
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLExtensions::OpenGLExtensions)
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLExtensions::OpenGLExtensions)
|
||||||
|
@ -109,8 +109,8 @@ public:
|
|||||||
class QOpenGLFramebufferObjectPrivate
|
class QOpenGLFramebufferObjectPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QOpenGLFramebufferObjectPrivate() : fbo_guard(0), depth_buffer_guard(0)
|
QOpenGLFramebufferObjectPrivate() : fbo_guard(nullptr), depth_buffer_guard(nullptr)
|
||||||
, stencil_buffer_guard(0)
|
, stencil_buffer_guard(nullptr)
|
||||||
, valid(false) {}
|
, valid(false) {}
|
||||||
~QOpenGLFramebufferObjectPrivate() {}
|
~QOpenGLFramebufferObjectPrivate() {}
|
||||||
|
|
||||||
@ -135,9 +135,9 @@ public:
|
|||||||
QOpenGLExtensions funcs;
|
QOpenGLExtensions funcs;
|
||||||
|
|
||||||
struct ColorAttachment {
|
struct ColorAttachment {
|
||||||
ColorAttachment() : internalFormat(0), guard(0) { }
|
ColorAttachment() : internalFormat(0), guard(nullptr) { }
|
||||||
ColorAttachment(const QSize &size, GLenum internalFormat)
|
ColorAttachment(const QSize &size, GLenum internalFormat)
|
||||||
: size(size), internalFormat(internalFormat), guard(0) { }
|
: size(size), internalFormat(internalFormat), guard(nullptr) { }
|
||||||
QSize size;
|
QSize size;
|
||||||
GLenum internalFormat;
|
GLenum internalFormat;
|
||||||
QOpenGLSharedResourceGuard *guard;
|
QOpenGLSharedResourceGuard *guard;
|
||||||
|
@ -187,9 +187,9 @@ public:
|
|||||||
|
|
||||||
QOpenGL2PaintEngineExPrivate(QOpenGL2PaintEngineEx *q_ptr) :
|
QOpenGL2PaintEngineExPrivate(QOpenGL2PaintEngineEx *q_ptr) :
|
||||||
q(q_ptr),
|
q(q_ptr),
|
||||||
shaderManager(0),
|
shaderManager(nullptr),
|
||||||
width(0), height(0),
|
width(0), height(0),
|
||||||
ctx(0),
|
ctx(nullptr),
|
||||||
useSystemClip(true),
|
useSystemClip(true),
|
||||||
elementIndicesVBOId(0),
|
elementIndicesVBOId(0),
|
||||||
opacityArray(0),
|
opacityArray(0),
|
||||||
@ -361,9 +361,9 @@ void QOpenGL2PaintEngineExPrivate::uploadData(unsigned int arrayIndex, const GLf
|
|||||||
opacityBuffer.allocate(data, count * sizeof(float));
|
opacityBuffer.allocate(data, count * sizeof(float));
|
||||||
}
|
}
|
||||||
if (arrayIndex == QT_OPACITY_ATTR)
|
if (arrayIndex == QT_OPACITY_ATTR)
|
||||||
funcs.glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, 0);
|
funcs.glVertexAttribPointer(arrayIndex, 1, GL_FLOAT, GL_FALSE, 0, nullptr);
|
||||||
else
|
else
|
||||||
funcs.glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, 0);
|
funcs.glVertexAttribPointer(arrayIndex, 2, GL_FLOAT, GL_FALSE, 0, nullptr);
|
||||||
} else {
|
} else {
|
||||||
// If we already uploaded the data we don't have to do it again
|
// If we already uploaded the data we don't have to do it again
|
||||||
if (data == vertexAttribPointers[arrayIndex])
|
if (data == vertexAttribPointers[arrayIndex])
|
||||||
|
@ -65,18 +65,18 @@ class QOpenGLQueryHelper
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QOpenGLQueryHelper(QOpenGLContext *context)
|
QOpenGLQueryHelper(QOpenGLContext *context)
|
||||||
: GetQueryObjectuiv(0),
|
: GetQueryObjectuiv(nullptr),
|
||||||
GetQueryObjectiv(0),
|
GetQueryObjectiv(nullptr),
|
||||||
GetQueryiv(0),
|
GetQueryiv(nullptr),
|
||||||
EndQuery(0),
|
EndQuery(nullptr),
|
||||||
BeginQuery(0),
|
BeginQuery(nullptr),
|
||||||
IsQuery(0),
|
IsQuery(nullptr),
|
||||||
DeleteQueries(0),
|
DeleteQueries(nullptr),
|
||||||
GenQueries(0),
|
GenQueries(nullptr),
|
||||||
GetInteger64v(0),
|
GetInteger64v(nullptr),
|
||||||
GetQueryObjectui64v(0),
|
GetQueryObjectui64v(nullptr),
|
||||||
GetQueryObjecti64v(0),
|
GetQueryObjecti64v(nullptr),
|
||||||
QueryCounter(0)
|
QueryCounter(nullptr)
|
||||||
{
|
{
|
||||||
Q_ASSERT(context);
|
Q_ASSERT(context);
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ public:
|
|||||||
|
|
||||||
inline void setPaintEnginePrivate(QOpenGL2PaintEngineExPrivate *p) { pex = p; }
|
inline void setPaintEnginePrivate(QOpenGL2PaintEngineExPrivate *p) { pex = p; }
|
||||||
|
|
||||||
inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; }
|
inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : nullptr; }
|
||||||
|
|
||||||
inline int serialNumber() const { return m_serialNumber; }
|
inline int serialNumber() const { return m_serialNumber; }
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ public:
|
|||||||
|
|
||||||
inline void glTextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
inline void glTextureSubImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||||
GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
|
GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
|
||||||
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
|
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
|
|
||||||
inline void glTextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset,
|
inline void glTextureSubImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset, GLint yoffset,
|
||||||
GLsizei width, GLsizei height, GLenum format, GLenum type,
|
GLsizei width, GLsizei height, GLenum format, GLenum type,
|
||||||
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
|
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -195,7 +195,7 @@ public:
|
|||||||
|
|
||||||
inline void glTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset,
|
inline void glTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level, GLint xoffset,
|
||||||
GLsizei width, GLenum format, GLenum type,
|
GLsizei width, GLenum format, GLenum type,
|
||||||
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = 0)
|
const GLvoid *pixels, const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -222,7 +222,7 @@ public:
|
|||||||
inline void glCompressedTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
inline void glCompressedTextureSubImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
||||||
GLint xoffset, GLsizei width,
|
GLint xoffset, GLsizei width,
|
||||||
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -238,7 +238,7 @@ public:
|
|||||||
GLint xoffset, GLint yoffset,
|
GLint xoffset, GLint yoffset,
|
||||||
GLsizei width, GLsizei height,
|
GLsizei width, GLsizei height,
|
||||||
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -254,7 +254,7 @@ public:
|
|||||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||||
GLsizei width, GLsizei height, GLsizei depth,
|
GLsizei width, GLsizei height, GLsizei depth,
|
||||||
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
GLenum format, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -269,7 +269,7 @@ public:
|
|||||||
inline void glCompressedTextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
inline void glCompressedTextureImage1D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
||||||
GLenum internalFormat, GLsizei width,
|
GLenum internalFormat, GLsizei width,
|
||||||
GLint border, GLsizei imageSize, const GLvoid *bits,
|
GLint border, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
@ -284,7 +284,7 @@ public:
|
|||||||
inline void glCompressedTextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
inline void glCompressedTextureImage2D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
||||||
GLenum internalFormat, GLsizei width, GLsizei height,
|
GLenum internalFormat, GLsizei width, GLsizei height,
|
||||||
GLint border, GLsizei imageSize, const GLvoid *bits,
|
GLint border, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
@ -300,7 +300,7 @@ public:
|
|||||||
inline void glCompressedTextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
inline void glCompressedTextureImage3D(GLuint texture, GLenum target, GLenum bindingTarget, GLint level,
|
||||||
GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth,
|
GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth,
|
||||||
GLint border, GLsizei imageSize, const GLvoid *bits,
|
GLint border, GLsizei imageSize, const GLvoid *bits,
|
||||||
const QOpenGLPixelTransferOptions * const options = 0)
|
const QOpenGLPixelTransferOptions * const options = nullptr)
|
||||||
{
|
{
|
||||||
if (options) {
|
if (options) {
|
||||||
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
QOpenGLPixelTransferOptions oldOptions = savePixelUploadOptions();
|
||||||
|
@ -98,8 +98,8 @@ public:
|
|||||||
: state(s),
|
: state(s),
|
||||||
deviceRect(dr_unclipped),
|
deviceRect(dr_unclipped),
|
||||||
clip(dr),
|
clip(dr),
|
||||||
pattern(0),
|
pattern(nullptr),
|
||||||
reversePattern(0),
|
reversePattern(nullptr),
|
||||||
patternSize(0),
|
patternSize(0),
|
||||||
patternLength(0),
|
patternLength(0),
|
||||||
patternOffset(0),
|
patternOffset(0),
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
buffer = (Type*) malloc(capacity * sizeof(Type));
|
buffer = (Type*) malloc(capacity * sizeof(Type));
|
||||||
Q_CHECK_PTR(buffer);
|
Q_CHECK_PTR(buffer);
|
||||||
} else {
|
} else {
|
||||||
buffer = 0;
|
buffer = nullptr;
|
||||||
}
|
}
|
||||||
siz = 0;
|
siz = 0;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ public:
|
|||||||
Q_CHECK_PTR(buffer);
|
Q_CHECK_PTR(buffer);
|
||||||
} else {
|
} else {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
buffer = 0;
|
buffer = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ struct QTextureData
|
|||||||
|
|
||||||
struct QSpanData
|
struct QSpanData
|
||||||
{
|
{
|
||||||
QSpanData() : tempImage(0) {}
|
QSpanData() : tempImage(nullptr) {}
|
||||||
~QSpanData() { delete tempImage; }
|
~QSpanData() { delete tempImage; }
|
||||||
|
|
||||||
QRasterBuffer *rasterBuffer;
|
QRasterBuffer *rasterBuffer;
|
||||||
|
@ -180,13 +180,13 @@ public:
|
|||||||
QT_FT_Outline *outline() {
|
QT_FT_Outline *outline() {
|
||||||
if (m_valid)
|
if (m_valid)
|
||||||
return &m_outline;
|
return &m_outline;
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_FT_Outline *convertPath(const QPainterPath &path);
|
QT_FT_Outline *convertPath(const QPainterPath &path);
|
||||||
QT_FT_Outline *convertPath(const QVectorPath &path);
|
QT_FT_Outline *convertPath(const QVectorPath &path);
|
||||||
|
|
||||||
inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? 0 : m_element_types.data(); }
|
inline QPainterPath::ElementType *elementTypes() const { return m_element_types.size() == 0 ? nullptr : m_element_types.data(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QDataBuffer<QPainterPath::ElementType> m_element_types;
|
QDataBuffer<QPainterPath::ElementType> m_element_types;
|
||||||
|
@ -65,7 +65,7 @@ class Q_GUI_EXPORT QPaintEnginePrivate
|
|||||||
{
|
{
|
||||||
Q_DECLARE_PUBLIC(QPaintEngine)
|
Q_DECLARE_PUBLIC(QPaintEngine)
|
||||||
public:
|
public:
|
||||||
QPaintEnginePrivate() : pdev(0), q_ptr(0), currentClipDevice(0), hasSystemTransform(0),
|
QPaintEnginePrivate() : pdev(nullptr), q_ptr(nullptr), currentClipDevice(nullptr), hasSystemTransform(0),
|
||||||
hasSystemViewport(0) {}
|
hasSystemViewport(0) {}
|
||||||
virtual ~QPaintEnginePrivate();
|
virtual ~QPaintEnginePrivate();
|
||||||
|
|
||||||
@ -138,8 +138,8 @@ public:
|
|||||||
|
|
||||||
static QPaintEnginePrivate *get(QPaintEngine *paintEngine) { return paintEngine->d_func(); }
|
static QPaintEnginePrivate *get(QPaintEngine *paintEngine) { return paintEngine->d_func(); }
|
||||||
|
|
||||||
virtual QPaintEngine *aggregateEngine() { return 0; }
|
virtual QPaintEngine *aggregateEngine() { return nullptr; }
|
||||||
virtual Qt::HANDLE nativeHandle() { return 0; }
|
virtual Qt::HANDLE nativeHandle() { return nullptr; }
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -426,7 +426,7 @@ inline void QClipData::appendSpans(const QSpan *s, int num)
|
|||||||
class QRasterBuffer
|
class QRasterBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QRasterBuffer() : m_width(0), m_height(0), m_buffer(0) { init(); }
|
QRasterBuffer() : m_width(0), m_height(0), m_buffer(nullptr) { init(); }
|
||||||
|
|
||||||
~QRasterBuffer();
|
~QRasterBuffer();
|
||||||
|
|
||||||
|
@ -193,9 +193,9 @@ class QPainterPrivate
|
|||||||
Q_DECLARE_PUBLIC(QPainter)
|
Q_DECLARE_PUBLIC(QPainter)
|
||||||
public:
|
public:
|
||||||
QPainterPrivate(QPainter *painter)
|
QPainterPrivate(QPainter *painter)
|
||||||
: q_ptr(painter), d_ptrs(0), state(0), dummyState(0), txinv(0), inDestructor(false), d_ptrs_size(0),
|
: q_ptr(painter), d_ptrs(nullptr), state(nullptr), dummyState(nullptr), txinv(0), inDestructor(false), d_ptrs_size(0),
|
||||||
refcount(1), device(0), original_device(0), helper_device(0), engine(0), emulationEngine(0),
|
refcount(1), device(nullptr), original_device(nullptr), helper_device(nullptr), engine(nullptr), emulationEngine(nullptr),
|
||||||
extended(0)
|
extended(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ public:
|
|||||||
fillRule(Qt::OddEvenFill),
|
fillRule(Qt::OddEvenFill),
|
||||||
dirtyBounds(false),
|
dirtyBounds(false),
|
||||||
dirtyControlBounds(false),
|
dirtyControlBounds(false),
|
||||||
pathConverter(0)
|
pathConverter(nullptr)
|
||||||
{
|
{
|
||||||
require_moveTo = false;
|
require_moveTo = false;
|
||||||
convex = false;
|
convex = false;
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
dirtyBounds(other.dirtyBounds),
|
dirtyBounds(other.dirtyBounds),
|
||||||
dirtyControlBounds(other.dirtyControlBounds),
|
dirtyControlBounds(other.dirtyControlBounds),
|
||||||
convex(other.convex),
|
convex(other.convex),
|
||||||
pathConverter(0)
|
pathConverter(nullptr)
|
||||||
{
|
{
|
||||||
require_moveTo = false;
|
require_moveTo = false;
|
||||||
elements = other.elements;
|
elements = other.elements;
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
bool intersect();
|
bool intersect();
|
||||||
bool contains();
|
bool contains();
|
||||||
|
|
||||||
static bool pathToRect(const QPainterPath &path, QRectF *rect = 0);
|
static bool pathToRect(const QPainterPath &path, QRectF *rect = nullptr);
|
||||||
static QPainterPath intersect(const QPainterPath &path, const QRectF &rect);
|
static QPainterPath intersect(const QPainterPath &path, const QRectF &rect);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -394,7 +394,7 @@ inline const QPathSegments::Intersection *QPathSegments::intersectionAt(int inde
|
|||||||
{
|
{
|
||||||
const int intersection = m_segments.at(index).intersection;
|
const int intersection = m_segments.at(index).intersection;
|
||||||
if (intersection < 0)
|
if (intersection < 0)
|
||||||
return 0;
|
return nullptr;
|
||||||
else
|
else
|
||||||
return &m_intersections.at(intersection);
|
return &m_intersections.at(intersection);
|
||||||
}
|
}
|
||||||
@ -428,12 +428,12 @@ inline int QWingedEdge::edgeCount() const
|
|||||||
|
|
||||||
inline QPathEdge *QWingedEdge::edge(int edge)
|
inline QPathEdge *QWingedEdge::edge(int edge)
|
||||||
{
|
{
|
||||||
return edge < 0 ? 0 : &m_edges.at(edge);
|
return edge < 0 ? nullptr : &m_edges.at(edge);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const QPathEdge *QWingedEdge::edge(int edge) const
|
inline const QPathEdge *QWingedEdge::edge(int edge) const
|
||||||
{
|
{
|
||||||
return edge < 0 ? 0 : &m_edges.at(edge);
|
return edge < 0 ? nullptr : &m_edges.at(edge);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int QWingedEdge::vertexCount() const
|
inline int QWingedEdge::vertexCount() const
|
||||||
@ -449,12 +449,12 @@ inline int QWingedEdge::addVertex(const QPointF &p)
|
|||||||
|
|
||||||
inline QPathVertex *QWingedEdge::vertex(int vertex)
|
inline QPathVertex *QWingedEdge::vertex(int vertex)
|
||||||
{
|
{
|
||||||
return vertex < 0 ? 0 : &m_vertices.at(vertex);
|
return vertex < 0 ? nullptr : &m_vertices.at(vertex);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const QPathVertex *QWingedEdge::vertex(int vertex) const
|
inline const QPathVertex *QWingedEdge::vertex(int vertex) const
|
||||||
{
|
{
|
||||||
return vertex < 0 ? 0 : &m_vertices.at(vertex);
|
return vertex < 0 ? nullptr : &m_vertices.at(vertex);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
|
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(Flags, Flag)
|
Q_DECLARE_FLAGS(Flags, Flag)
|
||||||
|
|
||||||
explicit QPlatformTextureList(QObject *parent = 0);
|
explicit QPlatformTextureList(QObject *parent = nullptr);
|
||||||
~QPlatformTextureList();
|
~QPlatformTextureList();
|
||||||
|
|
||||||
int count() const;
|
int count() const;
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
bool isLocked() const;
|
bool isLocked() const;
|
||||||
|
|
||||||
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
|
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
|
||||||
const QRect &clipRect = QRect(), Flags flags = 0);
|
const QRect &clipRect = QRect(), Flags flags = nullptr);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
@ -60,7 +60,7 @@ struct QRBTree
|
|||||||
{
|
{
|
||||||
struct Node
|
struct Node
|
||||||
{
|
{
|
||||||
inline Node() : parent(0), left(0), right(0), red(true) { }
|
inline Node() : parent(nullptr), left(nullptr), right(nullptr), red(true) { }
|
||||||
inline ~Node() {if (left) delete left; if (right) delete right;}
|
inline ~Node() {if (left) delete left; if (right) delete right;}
|
||||||
T data;
|
T data;
|
||||||
Node *parent;
|
Node *parent;
|
||||||
@ -69,7 +69,7 @@ struct QRBTree
|
|||||||
bool red;
|
bool red;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline QRBTree() : root(0), freeList(0) { }
|
inline QRBTree() : root(nullptr), freeList(nullptr) { }
|
||||||
inline ~QRBTree();
|
inline ~QRBTree();
|
||||||
|
|
||||||
inline void clear();
|
inline void clear();
|
||||||
@ -120,7 +120,7 @@ inline QRBTree<T>::~QRBTree()
|
|||||||
while (freeList) {
|
while (freeList) {
|
||||||
// Avoid recursively calling the destructor, as this list may become large.
|
// Avoid recursively calling the destructor, as this list may become large.
|
||||||
Node *next = freeList->right;
|
Node *next = freeList->right;
|
||||||
freeList->right = 0;
|
freeList->right = nullptr;
|
||||||
delete freeList;
|
delete freeList;
|
||||||
freeList = next;
|
freeList = next;
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ inline void QRBTree<T>::clear()
|
|||||||
{
|
{
|
||||||
if (root)
|
if (root)
|
||||||
delete root;
|
delete root;
|
||||||
root = 0;
|
root = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -359,7 +359,7 @@ void QRBTree<T>::detach(Node *node) // call this before removing a node.
|
|||||||
ref = child;
|
ref = child;
|
||||||
if (child)
|
if (child)
|
||||||
child->parent = node->parent;
|
child->parent = node->parent;
|
||||||
node->left = node->right = node->parent = 0;
|
node->left = node->right = node->parent = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
|
// 'node' must be black. rebalance will reduce the depth of black nodes by one in the sibling tree.
|
||||||
@ -513,7 +513,7 @@ inline void QRBTree<T>::deleteNode(Node *&node)
|
|||||||
detach(node);
|
detach(node);
|
||||||
node->right = freeList;
|
node->right = freeList;
|
||||||
freeList = node;
|
freeList = node;
|
||||||
node = 0;
|
node = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -522,7 +522,7 @@ inline typename QRBTree<T>::Node *QRBTree<T>::newNode()
|
|||||||
if (freeList) {
|
if (freeList) {
|
||||||
Node *node = freeList;
|
Node *node = freeList;
|
||||||
freeList = freeList->right;
|
freeList = freeList->right;
|
||||||
node->parent = node->left = node->right = 0;
|
node->parent = node->left = node->right = nullptr;
|
||||||
node->red = true;
|
node->red = true;
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class Q_GUI_EXPORT QTextureGlyphCache : public QFontEngineGlyphCache
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
|
QTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
|
||||||
: QFontEngineGlyphCache(format, matrix), m_current_fontengine(0),
|
: QFontEngineGlyphCache(format, matrix), m_current_fontengine(nullptr),
|
||||||
m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0)
|
m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public:
|
|||||||
// ### Falcon: introduca a struct XY for points so lars is not so confused...
|
// ### Falcon: introduca a struct XY for points so lars is not so confused...
|
||||||
QVectorPath(const qreal *points,
|
QVectorPath(const qreal *points,
|
||||||
int count,
|
int count,
|
||||||
const QPainterPath::ElementType *elements = 0,
|
const QPainterPath::ElementType *elements = nullptr,
|
||||||
uint hints = ArbitraryShapeHint)
|
uint hints = ArbitraryShapeHint)
|
||||||
: m_elements(elements),
|
: m_elements(elements),
|
||||||
m_points(points),
|
m_points(points),
|
||||||
@ -128,12 +128,12 @@ public:
|
|||||||
inline bool hasExplicitOpen() const { return m_hints & ExplicitOpen; }
|
inline bool hasExplicitOpen() const { return m_hints & ExplicitOpen; }
|
||||||
inline bool hasWindingFill() const { return m_hints & WindingFill; }
|
inline bool hasWindingFill() const { return m_hints & WindingFill; }
|
||||||
|
|
||||||
inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; }
|
inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = nullptr; }
|
||||||
inline uint hints() const { return m_hints; }
|
inline uint hints() const { return m_hints; }
|
||||||
|
|
||||||
inline const QPainterPath::ElementType *elements() const { return m_elements; }
|
inline const QPainterPath::ElementType *elements() const { return m_elements; }
|
||||||
inline const qreal *points() const { return m_points; }
|
inline const qreal *points() const { return m_points; }
|
||||||
inline bool isEmpty() const { return m_points == 0; }
|
inline bool isEmpty() const { return m_points == nullptr; }
|
||||||
|
|
||||||
inline int elementCount() const { return m_count; }
|
inline int elementCount() const { return m_count; }
|
||||||
inline const QPainterPath convertToPainterPath() const;
|
inline const QPainterPath convertToPainterPath() const;
|
||||||
@ -165,7 +165,7 @@ public:
|
|||||||
return e;
|
return e;
|
||||||
e = e->next;
|
e = e->next;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T> static inline bool isRect(const T *pts, int elementCount) {
|
template <typename T> static inline bool isRect(const T *pts, int elementCount) {
|
||||||
|
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
struct QTextObjectHandler
|
struct QTextObjectHandler
|
||||||
{
|
{
|
||||||
QTextObjectHandler() : iface(0) {}
|
QTextObjectHandler() : iface(nullptr) {}
|
||||||
QTextObjectInterface *iface;
|
QTextObjectInterface *iface;
|
||||||
QPointer<QObject> component;
|
QPointer<QObject> component;
|
||||||
};
|
};
|
||||||
@ -71,12 +71,12 @@ public:
|
|||||||
Q_DECLARE_PUBLIC(QAbstractTextDocumentLayout)
|
Q_DECLARE_PUBLIC(QAbstractTextDocumentLayout)
|
||||||
|
|
||||||
inline QAbstractTextDocumentLayoutPrivate()
|
inline QAbstractTextDocumentLayoutPrivate()
|
||||||
: paintDevice(0) {}
|
: paintDevice(nullptr) {}
|
||||||
~QAbstractTextDocumentLayoutPrivate();
|
~QAbstractTextDocumentLayoutPrivate();
|
||||||
|
|
||||||
inline void setDocument(QTextDocument *doc) {
|
inline void setDocument(QTextDocument *doc) {
|
||||||
document = doc;
|
document = doc;
|
||||||
docPrivate = 0;
|
docPrivate = nullptr;
|
||||||
if (doc)
|
if (doc)
|
||||||
docPrivate = doc->docHandle();
|
docPrivate = doc->docHandle();
|
||||||
}
|
}
|
||||||
|
@ -467,8 +467,8 @@ struct Q_GUI_EXPORT Declaration
|
|||||||
Attachment attachmentValue() const;
|
Attachment attachmentValue() const;
|
||||||
int styleFeaturesValue() const;
|
int styleFeaturesValue() const;
|
||||||
|
|
||||||
bool intValue(int *i, const char *unit = 0) const;
|
bool intValue(int *i, const char *unit = nullptr) const;
|
||||||
bool realValue(qreal *r, const char *unit = 0) const;
|
bool realValue(qreal *r, const char *unit = nullptr) const;
|
||||||
|
|
||||||
QSize sizeValue() const;
|
QSize sizeValue() const;
|
||||||
QRect rectValue() const;
|
QRect rectValue() const;
|
||||||
@ -584,7 +584,7 @@ struct Q_GUI_EXPORT Selector
|
|||||||
{
|
{
|
||||||
QVector<BasicSelector> basicSelectors;
|
QVector<BasicSelector> basicSelectors;
|
||||||
int specificity() const;
|
int specificity() const;
|
||||||
quint64 pseudoClass(quint64 *negated = 0) const;
|
quint64 pseudoClass(quint64 *negated = nullptr) const;
|
||||||
QString pseudoElement() const;
|
QString pseudoElement() const;
|
||||||
};
|
};
|
||||||
QT_CSS_DECLARE_TYPEINFO(Selector, Q_MOVABLE_TYPE)
|
QT_CSS_DECLARE_TYPEINFO(Selector, Q_MOVABLE_TYPE)
|
||||||
@ -656,7 +656,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
QVector<StyleRule> styleRulesForNode(NodePtr node);
|
QVector<StyleRule> styleRulesForNode(NodePtr node);
|
||||||
QVector<Declaration> declarationsForNode(NodePtr node, const char *extraPseudo = 0);
|
QVector<Declaration> declarationsForNode(NodePtr node, const char *extraPseudo = nullptr);
|
||||||
|
|
||||||
virtual bool nodeNameEquals(NodePtr node, const QString& nodeName) const;
|
virtual bool nodeNameEquals(NodePtr node, const QString& nodeName) const;
|
||||||
virtual QString attribute(NodePtr node, const QString &name) const = 0;
|
virtual QString attribute(NodePtr node, const QString &name) const = 0;
|
||||||
@ -744,7 +744,7 @@ QT_CSS_DECLARE_TYPEINFO(Symbol, Q_MOVABLE_TYPE)
|
|||||||
class Q_GUI_EXPORT Scanner
|
class Q_GUI_EXPORT Scanner
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static QString preprocess(const QString &input, bool *hasEscapeSequences = 0);
|
static QString preprocess(const QString &input, bool *hasEscapeSequences = nullptr);
|
||||||
static void scan(const QString &preprocessedInput, QVector<Symbol> *symbols);
|
static void scan(const QString &preprocessedInput, QVector<Symbol> *symbols);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -845,7 +845,7 @@ struct Q_GUI_EXPORT ValueExtractor
|
|||||||
bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh);
|
bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh);
|
||||||
bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *,
|
bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *,
|
||||||
QCss::PositionMode *, Qt::Alignment *);
|
QCss::PositionMode *, Qt::Alignment *);
|
||||||
bool extractBox(int *margins, int *paddings, int *spacing = 0);
|
bool extractBox(int *margins, int *paddings, int *spacing = nullptr);
|
||||||
bool extractBorder(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii);
|
bool extractBorder(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii);
|
||||||
bool extractOutline(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets);
|
bool extractOutline(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets);
|
||||||
bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg);
|
bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg);
|
||||||
|
@ -72,7 +72,7 @@ int Q_GUI_EXPORT QT_DISTANCEFIELD_HIGHGLYPHCOUNT();
|
|||||||
class Q_GUI_EXPORT QDistanceFieldData : public QSharedData
|
class Q_GUI_EXPORT QDistanceFieldData : public QSharedData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QDistanceFieldData() : glyph(0), width(0), height(0), nbytes(0), data(0) {}
|
QDistanceFieldData() : glyph(0), width(0), height(0), nbytes(0), data(nullptr) {}
|
||||||
QDistanceFieldData(const QDistanceFieldData &other);
|
QDistanceFieldData(const QDistanceFieldData &other);
|
||||||
~QDistanceFieldData();
|
~QDistanceFieldData();
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ public:
|
|||||||
|
|
||||||
// QFontEngine cache
|
// QFontEngine cache
|
||||||
struct Engine {
|
struct Engine {
|
||||||
Engine() : data(0), timestamp(0), hits(0) { }
|
Engine() : data(nullptr), timestamp(0), hits(0) { }
|
||||||
Engine(QFontEngine *d) : data(d), timestamp(0), hits(0) { }
|
Engine(QFontEngine *d) : data(d), timestamp(0), hits(0) { }
|
||||||
|
|
||||||
QFontEngine *data;
|
QFontEngine *data;
|
||||||
|
@ -194,7 +194,7 @@ public:
|
|||||||
virtual QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition,
|
virtual QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition,
|
||||||
GlyphFormat neededFormat,
|
GlyphFormat neededFormat,
|
||||||
const QTransform &t = QTransform(),
|
const QTransform &t = QTransform(),
|
||||||
QPoint *offset = 0);
|
QPoint *offset = nullptr);
|
||||||
virtual void unlockAlphaMapForGlyph();
|
virtual void unlockAlphaMapForGlyph();
|
||||||
virtual bool hasInternalCaching() const { return false; }
|
virtual bool hasInternalCaching() const { return false; }
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ public:
|
|||||||
virtual qreal minLeftBearing() const;
|
virtual qreal minLeftBearing() const;
|
||||||
virtual qreal minRightBearing() const;
|
virtual qreal minRightBearing() const;
|
||||||
|
|
||||||
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
|
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr);
|
||||||
|
|
||||||
inline bool canRender(uint ucs4) const { return glyphIndex(ucs4) != 0; }
|
inline bool canRender(uint ucs4) const { return glyphIndex(ucs4) != 0; }
|
||||||
virtual bool canRender(const QChar *str, int len) const;
|
virtual bool canRender(const QChar *str, int len) const;
|
||||||
@ -234,7 +234,7 @@ public:
|
|||||||
virtual int glyphCount() const;
|
virtual int glyphCount() const;
|
||||||
virtual int glyphMargin(GlyphFormat format) { return format == Format_A32 ? 2 : 0; }
|
virtual int glyphMargin(GlyphFormat format) { return format == Format_A32 ? 2 : 0; }
|
||||||
|
|
||||||
virtual QFontEngine *cloneWithSize(qreal /*pixelSize*/) const { return 0; }
|
virtual QFontEngine *cloneWithSize(qreal /*pixelSize*/) const { return nullptr; }
|
||||||
|
|
||||||
virtual Qt::HANDLE handle() const;
|
virtual Qt::HANDLE handle() const;
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ public:
|
|||||||
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override;
|
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override;
|
||||||
virtual void doKerning(QGlyphLayout *, ShaperFlags) const override;
|
virtual void doKerning(QGlyphLayout *, ShaperFlags) const override;
|
||||||
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) override;
|
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) override;
|
||||||
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0) override;
|
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr) override;
|
||||||
|
|
||||||
virtual QFixed ascent() const override;
|
virtual QFixed ascent() const override;
|
||||||
virtual QFixed capHeight() const override;
|
virtual QFixed capHeight() const override;
|
||||||
|
@ -216,7 +216,7 @@ private:
|
|||||||
|
|
||||||
template <class Fragment>
|
template <class Fragment>
|
||||||
QFragmentMapData<Fragment>::QFragmentMapData()
|
QFragmentMapData<Fragment>::QFragmentMapData()
|
||||||
: fragments(0)
|
: fragments(nullptr)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ class QGlyphRunPrivate: public QSharedData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QGlyphRunPrivate()
|
QGlyphRunPrivate()
|
||||||
: flags(0)
|
: flags(nullptr)
|
||||||
, glyphIndexData(glyphIndexes.constData())
|
, glyphIndexData(glyphIndexes.constData())
|
||||||
, glyphIndexDataSize(0)
|
, glyphIndexDataSize(0)
|
||||||
, glyphPositionData(glyphPositions.constData())
|
, glyphPositionData(glyphPositions.constData())
|
||||||
|
@ -67,9 +67,9 @@ class Q_GUI_EXPORT QRawFontPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QRawFontPrivate()
|
QRawFontPrivate()
|
||||||
: fontEngine(0)
|
: fontEngine(nullptr)
|
||||||
, hintingPreference(QFont::PreferDefaultHinting)
|
, hintingPreference(QFont::PreferDefaultHinting)
|
||||||
, thread(0)
|
, thread(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
QRawFontPrivate(const QRawFontPrivate &other)
|
QRawFontPrivate(const QRawFontPrivate &other)
|
||||||
@ -78,9 +78,9 @@ public:
|
|||||||
, thread(other.thread)
|
, thread(other.thread)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
|
Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
|
||||||
#endif
|
#endif
|
||||||
if (fontEngine != 0)
|
if (fontEngine != nullptr)
|
||||||
fontEngine->ref.ref();
|
fontEngine->ref.ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,37 +94,37 @@ public:
|
|||||||
|
|
||||||
inline void cleanUp()
|
inline void cleanUp()
|
||||||
{
|
{
|
||||||
setFontEngine(0);
|
setFontEngine(nullptr);
|
||||||
hintingPreference = QFont::PreferDefaultHinting;
|
hintingPreference = QFont::PreferDefaultHinting;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool isValid() const
|
inline bool isValid() const
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
|
Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
|
||||||
#endif
|
#endif
|
||||||
return fontEngine != 0;
|
return fontEngine != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void setFontEngine(QFontEngine *engine)
|
inline void setFontEngine(QFontEngine *engine)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
Q_ASSERT(fontEngine == 0 || thread == QThread::currentThread());
|
Q_ASSERT(fontEngine == nullptr || thread == QThread::currentThread());
|
||||||
#endif
|
#endif
|
||||||
if (fontEngine == engine)
|
if (fontEngine == engine)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fontEngine != 0) {
|
if (fontEngine != nullptr) {
|
||||||
if (!fontEngine->ref.deref())
|
if (!fontEngine->ref.deref())
|
||||||
delete fontEngine;
|
delete fontEngine;
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
thread = 0;
|
thread = nullptr;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
fontEngine = engine;
|
fontEngine = engine;
|
||||||
|
|
||||||
if (fontEngine != 0) {
|
if (fontEngine != nullptr) {
|
||||||
fontEngine->ref.ref();
|
fontEngine->ref.ref();
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
thread = QThread::currentThread();
|
thread = QThread::currentThread();
|
||||||
|
@ -80,7 +80,7 @@ class Q_GUI_EXPORT QStaticTextItem
|
|||||||
public:
|
public:
|
||||||
QStaticTextItem() : useBackendOptimizations(false),
|
QStaticTextItem() : useBackendOptimizations(false),
|
||||||
userDataNeedsUpdate(0), usesRawFont(0),
|
userDataNeedsUpdate(0), usesRawFont(0),
|
||||||
m_fontEngine(0), m_userData(0) {}
|
m_fontEngine(nullptr), m_userData(nullptr) {}
|
||||||
|
|
||||||
void setUserData(QStaticTextUserData *newUserData)
|
void setUserData(QStaticTextUserData *newUserData)
|
||||||
{
|
{
|
||||||
|
@ -101,10 +101,10 @@ class QTextBlockData : public QFragment<3>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline void initialize()
|
inline void initialize()
|
||||||
{ layout = 0; userData = 0; userState = -1; revision = 0; hidden = 0; }
|
{ layout = nullptr; userData = nullptr; userState = -1; revision = 0; hidden = 0; }
|
||||||
void invalidate() const;
|
void invalidate() const;
|
||||||
inline void free()
|
inline void free()
|
||||||
{ delete layout; layout = 0; delete userData; userData = 0; }
|
{ delete layout; layout = nullptr; delete userData; userData = nullptr; }
|
||||||
|
|
||||||
mutable int format;
|
mutable int format;
|
||||||
// ##### probably store a QTextEngine * here!
|
// ##### probably store a QTextEngine * here!
|
||||||
|
@ -125,7 +125,7 @@ public:
|
|||||||
|
|
||||||
QTextHtmlImporter(QTextDocument *_doc, const QString &html,
|
QTextHtmlImporter(QTextDocument *_doc, const QString &html,
|
||||||
ImportMode mode,
|
ImportMode mode,
|
||||||
const QTextDocument *resourceProvider = 0);
|
const QTextDocument *resourceProvider = nullptr);
|
||||||
|
|
||||||
void import();
|
void import();
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
struct TableCellIterator
|
struct TableCellIterator
|
||||||
{
|
{
|
||||||
inline TableCellIterator(QTextTable *t = 0) : table(t), row(0), column(0) {}
|
inline TableCellIterator(QTextTable *t = nullptr) : table(t), row(0), column(0) {}
|
||||||
|
|
||||||
inline TableCellIterator &operator++() {
|
inline TableCellIterator &operator++() {
|
||||||
if (atEnd())
|
if (atEnd())
|
||||||
@ -182,7 +182,7 @@ private:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool atEnd() const { return table == 0 || row >= table->rows(); }
|
inline bool atEnd() const { return table == nullptr || row >= table->rows(); }
|
||||||
|
|
||||||
QTextTableCell cell() const { return table->cellAt(row, column); }
|
QTextTableCell cell() const { return table->cellAt(row, column); }
|
||||||
|
|
||||||
|
@ -304,8 +304,8 @@ class QTextItemInt : public QTextItem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline QTextItemInt()
|
inline QTextItemInt()
|
||||||
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(0),
|
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(nullptr),
|
||||||
logClusters(0), f(0), fontEngine(0)
|
logClusters(nullptr), f(nullptr), fontEngine(nullptr)
|
||||||
{}
|
{}
|
||||||
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
|
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
|
||||||
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe,
|
QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe,
|
||||||
@ -484,7 +484,7 @@ public:
|
|||||||
return end - si->position;
|
return end - si->position;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = 0, QFixed *descent = 0, QFixed *leading = 0) const;
|
QFontEngine *fontEngine(const QScriptItem &si, QFixed *ascent = nullptr, QFixed *descent = nullptr, QFixed *leading = nullptr) const;
|
||||||
QFont font(const QScriptItem &si) const;
|
QFont font(const QScriptItem &si) const;
|
||||||
inline QFont font() const { return fnt; }
|
inline QFont font() const { return fnt; }
|
||||||
|
|
||||||
@ -530,7 +530,7 @@ public:
|
|||||||
inline QTextFormatCollection *formatCollection() const {
|
inline QTextFormatCollection *formatCollection() const {
|
||||||
if (block.docHandle())
|
if (block.docHandle())
|
||||||
return block.docHandle()->formatCollection();
|
return block.docHandle()->formatCollection();
|
||||||
return specialData ? specialData->formatCollection.data() : 0;
|
return specialData ? specialData->formatCollection.data() : nullptr;
|
||||||
}
|
}
|
||||||
QTextCharFormat format(const QScriptItem *si) const;
|
QTextCharFormat format(const QScriptItem *si) const;
|
||||||
inline QAbstractTextDocumentLayout *docLayout() const {
|
inline QAbstractTextDocumentLayout *docLayout() const {
|
||||||
@ -553,8 +553,8 @@ private:
|
|||||||
mutable int prevPosition;
|
mutable int prevPosition;
|
||||||
mutable int prevLength;
|
mutable int prevLength;
|
||||||
inline void reset() {
|
inline void reset() {
|
||||||
prevFontEngine = 0;
|
prevFontEngine = nullptr;
|
||||||
prevScaledFontEngine = 0;
|
prevScaledFontEngine = nullptr;
|
||||||
prevScript = -1;
|
prevScript = -1;
|
||||||
prevPosition = -1;
|
prevPosition = -1;
|
||||||
prevLength = -1;
|
prevLength = -1;
|
||||||
@ -684,7 +684,7 @@ Q_DECLARE_TYPEINFO(QTextEngine::ItemDecoration, Q_MOVABLE_TYPE);
|
|||||||
struct QTextLineItemIterator
|
struct QTextLineItemIterator
|
||||||
{
|
{
|
||||||
QTextLineItemIterator(QTextEngine *eng, int lineNum, const QPointF &pos = QPointF(),
|
QTextLineItemIterator(QTextEngine *eng, int lineNum, const QPointF &pos = QPointF(),
|
||||||
const QTextLayout::FormatRange *_selection = 0);
|
const QTextLayout::FormatRange *_selection = nullptr);
|
||||||
|
|
||||||
inline bool atEnd() const { return logicalItem >= nItems - 1; }
|
inline bool atEnd() const { return logicalItem >= nItems - 1; }
|
||||||
inline bool atBeginning() const { return logicalItem <= 0; }
|
inline bool atBeginning() const { return logicalItem <= 0; }
|
||||||
|
@ -65,7 +65,7 @@ class Q_GUI_EXPORT QTextImageHandler : public QObject,
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QTextObjectInterface)
|
Q_INTERFACES(QTextObjectInterface)
|
||||||
public:
|
public:
|
||||||
explicit QTextImageHandler(QObject *parent = 0);
|
explicit QTextImageHandler(QObject *parent = nullptr);
|
||||||
|
|
||||||
virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
|
virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
|
||||||
virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
|
virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override;
|
||||||
|
@ -93,7 +93,7 @@ class QTextFramePrivate : public QTextObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QTextFrame)
|
Q_DECLARE_PUBLIC(QTextFrame)
|
||||||
public:
|
public:
|
||||||
QTextFramePrivate(QTextDocument *doc)
|
QTextFramePrivate(QTextDocument *doc)
|
||||||
: QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(0), layoutData(0)
|
: QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(nullptr), layoutData(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual void fragmentAdded(QChar type, uint fragment);
|
virtual void fragmentAdded(QChar type, uint fragment);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user