Another round of 0->nullptr cleanup
Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
4ed483b0e2
commit
5747f31392
@ -161,7 +161,7 @@ bool ThreadEngineBarrier::releaseUnlessLast()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ThreadEngineBase::ThreadEngineBase(QThreadPool *pool)
|
ThreadEngineBase::ThreadEngineBase(QThreadPool *pool)
|
||||||
: futureInterface(0), threadPool(pool)
|
: futureInterface(nullptr), threadPool(pool)
|
||||||
{
|
{
|
||||||
setAutoDelete(false);
|
setAutoDelete(false);
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ void ThreadEngineBase::waitForResume()
|
|||||||
bool ThreadEngineBase::isProgressReportingEnabled()
|
bool ThreadEngineBase::isProgressReportingEnabled()
|
||||||
{
|
{
|
||||||
// If we don't have a QFuture, there is no-one to report the progress to.
|
// If we don't have a QFuture, there is no-one to report the progress to.
|
||||||
return (futureInterface != 0);
|
return (futureInterface != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadEngineBase::setProgressValue(int progress)
|
void ThreadEngineBase::setProgressValue(int progress)
|
||||||
@ -278,7 +278,7 @@ void ThreadEngineBase::startThreads()
|
|||||||
|
|
||||||
void ThreadEngineBase::threadExit()
|
void ThreadEngineBase::threadExit()
|
||||||
{
|
{
|
||||||
const bool asynchronous = futureInterface != 0;
|
const bool asynchronous = (futureInterface != nullptr);
|
||||||
const int lastThread = (barrier.release() == 0);
|
const int lastThread = (barrier.release() == 0);
|
||||||
|
|
||||||
if (lastThread && asynchronous)
|
if (lastThread && asynchronous)
|
||||||
|
@ -235,7 +235,7 @@ QUnifiedTimer *QUnifiedTimer::instance(bool create)
|
|||||||
inst = new QUnifiedTimer;
|
inst = new QUnifiedTimer;
|
||||||
unifiedTimer()->setLocalData(inst);
|
unifiedTimer()->setLocalData(inst);
|
||||||
} else {
|
} else {
|
||||||
inst = unifiedTimer() ? unifiedTimer()->localData() : 0;
|
inst = unifiedTimer() ? unifiedTimer()->localData() : nullptr;
|
||||||
}
|
}
|
||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
@ -565,7 +565,7 @@ QAnimationTimer *QAnimationTimer::instance(bool create)
|
|||||||
inst = new QAnimationTimer;
|
inst = new QAnimationTimer;
|
||||||
animationTimer()->setLocalData(inst);
|
animationTimer()->setLocalData(inst);
|
||||||
} else {
|
} else {
|
||||||
inst = animationTimer() ? animationTimer()->localData() : 0;
|
inst = animationTimer() ? animationTimer()->localData() : nullptr;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(create);
|
Q_UNUSED(create);
|
||||||
|
@ -271,7 +271,7 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
|
|||||||
QPropertyAnimationPair key(d->targetValue, d->propertyName);
|
QPropertyAnimationPair key(d->targetValue, d->propertyName);
|
||||||
if (newState == Running) {
|
if (newState == Running) {
|
||||||
d->updateMetaProperty();
|
d->updateMetaProperty();
|
||||||
animToStop = hash.value(key, 0);
|
animToStop = hash.value(key, nullptr);
|
||||||
hash.insert(key, this);
|
hash.insert(key, this);
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
// update the default start value
|
// update the default start value
|
||||||
|
@ -429,7 +429,7 @@ void QAbstractEventDispatcher::installNativeEventFilter(QAbstractNativeEventFilt
|
|||||||
Q_D(QAbstractEventDispatcher);
|
Q_D(QAbstractEventDispatcher);
|
||||||
|
|
||||||
// clean up unused items in the list
|
// clean up unused items in the list
|
||||||
d->eventFilters.removeAll(0);
|
d->eventFilters.removeAll(nullptr);
|
||||||
d->eventFilters.removeAll(filterObj);
|
d->eventFilters.removeAll(filterObj);
|
||||||
d->eventFilters.prepend(filterObj);
|
d->eventFilters.prepend(filterObj);
|
||||||
}
|
}
|
||||||
@ -452,7 +452,7 @@ void QAbstractEventDispatcher::removeNativeEventFilter(QAbstractNativeEventFilte
|
|||||||
Q_D(QAbstractEventDispatcher);
|
Q_D(QAbstractEventDispatcher);
|
||||||
for (int i = 0; i < d->eventFilters.count(); ++i) {
|
for (int i = 0; i < d->eventFilters.count(); ++i) {
|
||||||
if (d->eventFilters.at(i) == filter) {
|
if (d->eventFilters.at(i) == filter) {
|
||||||
d->eventFilters[i] = 0;
|
d->eventFilters[i] = nullptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1669,7 +1669,7 @@ static const QMetaObject *resolveClassName
|
|||||||
if (name == QByteArray("QObject"))
|
if (name == QByteArray("QObject"))
|
||||||
return &QObject::staticMetaObject;
|
return &QObject::staticMetaObject;
|
||||||
else
|
else
|
||||||
return references.value(name, 0);
|
return references.value(name, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -2035,7 +2035,7 @@ void QObjectPrivate::deleteChildren()
|
|||||||
// delete siblings
|
// delete siblings
|
||||||
for (int i = 0; i < children.count(); ++i) {
|
for (int i = 0; i < children.count(); ++i) {
|
||||||
currentChildBeingDeleted = children.at(i);
|
currentChildBeingDeleted = children.at(i);
|
||||||
children[i] = 0;
|
children[i] = nullptr;
|
||||||
delete currentChildBeingDeleted;
|
delete currentChildBeingDeleted;
|
||||||
}
|
}
|
||||||
children.clear();
|
children.clear();
|
||||||
@ -2076,7 +2076,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
|
|||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
// we're probably recursing into setParent() from a ChildRemoved event, don't do anything
|
// we're probably recursing into setParent() from a ChildRemoved event, don't do anything
|
||||||
} else if (parentD->isDeletingChildren) {
|
} else if (parentD->isDeletingChildren) {
|
||||||
parentD->children[index] = 0;
|
parentD->children[index] = nullptr;
|
||||||
} else {
|
} else {
|
||||||
parentD->children.removeAt(index);
|
parentD->children.removeAt(index);
|
||||||
if (sendChildEvents && parentD->receiveChildEvents) {
|
if (sendChildEvents && parentD->receiveChildEvents) {
|
||||||
|
@ -419,7 +419,7 @@ inline void QLibraryStore::cleanup()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
delete lib;
|
delete lib;
|
||||||
it.value() = 0;
|
it.value() = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1323,8 +1323,8 @@ typedef int (*th_brk_def) (const unsigned char*, int*, size_t);
|
|||||||
typedef size_t (*th_next_cell_def) (const unsigned char *, size_t, struct thcell_t *, int);
|
typedef size_t (*th_next_cell_def) (const unsigned char *, size_t, struct thcell_t *, int);
|
||||||
|
|
||||||
/* libthai related function handles */
|
/* libthai related function handles */
|
||||||
static th_brk_def th_brk = 0;
|
static th_brk_def th_brk = nullptr;
|
||||||
static th_next_cell_def th_next_cell = 0;
|
static th_next_cell_def th_next_cell = nullptr;
|
||||||
|
|
||||||
static int init_libthai() {
|
static int init_libthai() {
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
@ -1363,7 +1363,7 @@ static void thaiAssignAttributes(const ushort *string, uint len, QCharAttributes
|
|||||||
{
|
{
|
||||||
char s[128];
|
char s[128];
|
||||||
char *cstr = s;
|
char *cstr = s;
|
||||||
int *break_positions = 0;
|
int *break_positions = nullptr;
|
||||||
int brp[128];
|
int brp[128];
|
||||||
int brp_size = 0;
|
int brp_size = 0;
|
||||||
uint numbreaks, i, j, cell_length;
|
uint numbreaks, i, j, cell_length;
|
||||||
|
@ -92,7 +92,7 @@ QThreadStorageData::QThreadStorageData(void (*func)(void *))
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (id = 0; id < destr->count(); id++) {
|
for (id = 0; id < destr->count(); id++) {
|
||||||
if (destr->at(id) == 0)
|
if (destr->at(id) == nullptr)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (id == destr->count()) {
|
if (id == destr->count()) {
|
||||||
@ -108,7 +108,7 @@ QThreadStorageData::~QThreadStorageData()
|
|||||||
DEBUG_MSG("QThreadStorageData: Released id %d", id);
|
DEBUG_MSG("QThreadStorageData: Released id %d", id);
|
||||||
QMutexLocker locker(&destructorsMutex);
|
QMutexLocker locker(&destructorsMutex);
|
||||||
if (destructors())
|
if (destructors())
|
||||||
(*destructors())[id] = 0;
|
(*destructors())[id] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void **QThreadStorageData::get() const
|
void **QThreadStorageData::get() const
|
||||||
@ -152,7 +152,7 @@ void **QThreadStorageData::set(void *p)
|
|||||||
|
|
||||||
QMutexLocker locker(&destructorsMutex);
|
QMutexLocker locker(&destructorsMutex);
|
||||||
DestructorMap *destr = destructors();
|
DestructorMap *destr = destructors();
|
||||||
void (*destructor)(void *) = destr ? destr->value(id) : 0;
|
void (*destructor)(void *) = destr ? destr->value(id) : nullptr;
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
void *q = value;
|
void *q = value;
|
||||||
@ -201,7 +201,7 @@ void QThreadStorageData::finish(void **p)
|
|||||||
|
|
||||||
if (tls->size() > i) {
|
if (tls->size() > i) {
|
||||||
//re reset the tls in case it has been recreated by its own destructor.
|
//re reset the tls in case it has been recreated by its own destructor.
|
||||||
(*tls)[i] = 0;
|
(*tls)[i] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tls->clear();
|
tls->clear();
|
||||||
|
@ -1567,7 +1567,7 @@ void QtSharedPointer::internalSafetyCheckAdd(const void *d_ptr, const volatile v
|
|||||||
|
|
||||||
//qDebug("Adding d=%p value=%p", d_ptr, ptr);
|
//qDebug("Adding d=%p value=%p", d_ptr, ptr);
|
||||||
|
|
||||||
const void *other_d_ptr = kp->dataPointers.value(ptr, 0);
|
const void *other_d_ptr = kp->dataPointers.value(ptr, nullptr);
|
||||||
if (Q_UNLIKELY(other_d_ptr)) {
|
if (Q_UNLIKELY(other_d_ptr)) {
|
||||||
# ifdef BACKTRACE_SUPPORTED
|
# ifdef BACKTRACE_SUPPORTED
|
||||||
printBacktrace(knownPointers()->dPointers.value(other_d_ptr).backtrace);
|
printBacktrace(knownPointers()->dPointers.value(other_d_ptr).backtrace);
|
||||||
|
@ -133,7 +133,7 @@ void (*qdbus_resolve_conditionally(const char *name))()
|
|||||||
#else
|
#else
|
||||||
Q_UNUSED(name);
|
Q_UNUSED(name);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*qdbus_resolve_me(const char *name))()
|
void (*qdbus_resolve_me(const char *name))()
|
||||||
@ -149,7 +149,7 @@ void (*qdbus_resolve_me(const char *name))()
|
|||||||
return ptr;
|
return ptr;
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(name);
|
Q_UNUSED(name);
|
||||||
return 0;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ QDBusConnectionPrivate *QDBusConnectionManager::busConnection(QDBusConnection::B
|
|||||||
|
|
||||||
QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name) const
|
QDBusConnectionPrivate *QDBusConnectionManager::connection(const QString &name) const
|
||||||
{
|
{
|
||||||
return connectionHash.value(name, 0);
|
return connectionHash.value(name, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDBusConnectionManager::removeConnection(const QString &name)
|
void QDBusConnectionManager::removeConnection(const QString &name)
|
||||||
|
@ -930,7 +930,7 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
|
|||||||
// let's create the parameter list
|
// let's create the parameter list
|
||||||
|
|
||||||
// first one is the return type -- add it below
|
// first one is the return type -- add it below
|
||||||
params.append(0);
|
params.append(nullptr);
|
||||||
|
|
||||||
// add the input parameters
|
// add the input parameters
|
||||||
int i;
|
int i;
|
||||||
@ -1186,7 +1186,7 @@ bool QDBusConnectionPrivate::handleError(const QDBusErrorInternal &error)
|
|||||||
void QDBusConnectionPrivate::timerEvent(QTimerEvent *e)
|
void QDBusConnectionPrivate::timerEvent(QTimerEvent *e)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
DBusTimeout *timeout = timeouts.value(e->timerId(), 0);
|
DBusTimeout *timeout = timeouts.value(e->timerId(), nullptr);
|
||||||
if (timeout)
|
if (timeout)
|
||||||
q_dbus_timeout_handle(timeout);
|
q_dbus_timeout_handle(timeout);
|
||||||
}
|
}
|
||||||
@ -2582,7 +2582,7 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa
|
|||||||
// service must be a unique connection name
|
// service must be a unique connection name
|
||||||
if (!interface.isEmpty()) {
|
if (!interface.isEmpty()) {
|
||||||
QDBusReadLocker locker(FindMetaObject1Action, this);
|
QDBusReadLocker locker(FindMetaObject1Action, this);
|
||||||
QDBusMetaObject *mo = cachedMetaObjects.value(interface, 0);
|
QDBusMetaObject *mo = cachedMetaObjects.value(interface, nullptr);
|
||||||
if (mo)
|
if (mo)
|
||||||
return mo;
|
return mo;
|
||||||
}
|
}
|
||||||
@ -2599,7 +2599,7 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa
|
|||||||
QDBusWriteLocker locker(FindMetaObject2Action, this);
|
QDBusWriteLocker locker(FindMetaObject2Action, this);
|
||||||
QDBusMetaObject *mo = nullptr;
|
QDBusMetaObject *mo = nullptr;
|
||||||
if (!interface.isEmpty())
|
if (!interface.isEmpty())
|
||||||
mo = cachedMetaObjects.value(interface, 0);
|
mo = cachedMetaObjects.value(interface, nullptr);
|
||||||
if (mo)
|
if (mo)
|
||||||
// maybe it got created when we switched from read to write lock
|
// maybe it got created when we switched from read to write lock
|
||||||
return mo;
|
return mo;
|
||||||
|
@ -858,7 +858,7 @@ QAccessibleInterface *AtSpiAdaptor::interfaceFromPath(const QString& dbusPath) c
|
|||||||
QStringList parts = dbusPath.split(QLatin1Char('/'));
|
QStringList parts = dbusPath.split(QLatin1Char('/'));
|
||||||
if (parts.size() != 6) {
|
if (parts.size() != 6) {
|
||||||
qCDebug(lcAccessibilityAtspi) << "invalid path: " << dbusPath;
|
qCDebug(lcAccessibilityAtspi) << "invalid path: " << dbusPath;
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString objectString = parts.at(5);
|
QString objectString = parts.at(5);
|
||||||
@ -1613,7 +1613,7 @@ bool AtSpiAdaptor::componentInterface(QAccessibleInterface *interface, const QSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
QAccessibleInterface * childInterface(interface->childAt(x, y));
|
QAccessibleInterface * childInterface(interface->childAt(x, y));
|
||||||
QAccessibleInterface * iface = 0;
|
QAccessibleInterface * iface = nullptr;
|
||||||
while (childInterface) {
|
while (childInterface) {
|
||||||
iface = childInterface;
|
iface = childInterface;
|
||||||
childInterface = iface->childAt(x, y);
|
childInterface = iface->childAt(x, y);
|
||||||
@ -2301,7 +2301,7 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
|
|||||||
connection.send(message.createReply(QVariant::fromValue(QDBusVariant(
|
connection.send(message.createReply(QVariant::fromValue(QDBusVariant(
|
||||||
QVariant::fromValue(interface->tableInterface()->selectedRowCount())))));
|
QVariant::fromValue(interface->tableInterface()->selectedRowCount())))));
|
||||||
} else if (function == QLatin1String("GetSummary")) {
|
} else if (function == QLatin1String("GetSummary")) {
|
||||||
QAccessibleInterface * summary = interface->tableInterface() ? interface->tableInterface()->summary() : 0;
|
QAccessibleInterface *summary = interface->tableInterface() ? interface->tableInterface()->summary() : nullptr;
|
||||||
QSpiObjectReference ref(connection, QDBusObjectPath(pathForInterface(summary)));
|
QSpiObjectReference ref(connection, QDBusObjectPath(pathForInterface(summary)));
|
||||||
connection.send(message.createReply(QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref)))));
|
connection.send(message.createReply(QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref)))));
|
||||||
} else if (function == QLatin1String("GetAccessibleAt")) {
|
} else if (function == QLatin1String("GetAccessibleAt")) {
|
||||||
|
@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
QSpiAccessibleBridge::QSpiAccessibleBridge()
|
QSpiAccessibleBridge::QSpiAccessibleBridge()
|
||||||
: cache(0), dec(0), dbusAdaptor(0)
|
: cache(nullptr), dec(nullptr), dbusAdaptor(nullptr)
|
||||||
{
|
{
|
||||||
dbusConnection = new DBusConnection();
|
dbusConnection = new DBusConnection();
|
||||||
connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool)));
|
connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool)));
|
||||||
|
@ -224,8 +224,8 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
|
|||||||
buffer = reinterpret_cast<uint *>(destData) + x;
|
buffer = reinterpret_cast<uint *>(destData) + x;
|
||||||
else
|
else
|
||||||
l = qMin(l, BufferSize);
|
l = qMin(l, BufferSize);
|
||||||
const uint *ptr = fetch(buffer, srcData, x, l, 0, ditherPtr);
|
const uint *ptr = fetch(buffer, srcData, x, l, nullptr, ditherPtr);
|
||||||
store(destData, ptr, x, l, 0, ditherPtr);
|
store(destData, ptr, x, l, nullptr, ditherPtr);
|
||||||
x += l;
|
x += l;
|
||||||
}
|
}
|
||||||
srcData += src->bytes_per_line;
|
srcData += src->bytes_per_line;
|
||||||
|
@ -538,7 +538,7 @@ bool QImageReaderPrivate::initHandler()
|
|||||||
|
|
||||||
// probe the file extension
|
// probe the file extension
|
||||||
if (deleteDevice && !device->isOpen() && !device->open(QIODevice::ReadOnly) && autoDetectImageFormat) {
|
if (deleteDevice && !device->isOpen() && !device->open(QIODevice::ReadOnly) && autoDetectImageFormat) {
|
||||||
Q_ASSERT(qobject_cast<QFile*>(device) != 0); // future-proofing; for now this should always be the case, so...
|
Q_ASSERT(qobject_cast<QFile*>(device) != nullptr); // future-proofing; for now this should always be the case, so...
|
||||||
QFile *file = static_cast<QFile *>(device);
|
QFile *file = static_cast<QFile *>(device);
|
||||||
|
|
||||||
if (file->error() == QFileDevice::ResourceError) {
|
if (file->error() == QFileDevice::ResourceError) {
|
||||||
|
@ -189,7 +189,7 @@ void QStandardItemPrivate::childDeleted(QStandardItem *child)
|
|||||||
int index = childIndex(child);
|
int index = childIndex(child);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
const auto modelIndex = child->index();
|
const auto modelIndex = child->index();
|
||||||
children.replace(index, 0);
|
children.replace(index, nullptr);
|
||||||
emit model->dataChanged(modelIndex, modelIndex);
|
emit model->dataChanged(modelIndex, modelIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,7 +481,7 @@ bool QStandardItemPrivate::insertRows(int row, const QList<QStandardItem*> &item
|
|||||||
rows += count;
|
rows += count;
|
||||||
int index = childIndex(row, 0);
|
int index = childIndex(row, 0);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
children.insert(index, columnCount() * count, 0);
|
children.insert(index, columnCount() * count, nullptr);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < items.count(); ++i) {
|
for (int i = 0; i < items.count(); ++i) {
|
||||||
QStandardItem *item = items.at(i);
|
QStandardItem *item = items.at(i);
|
||||||
@ -511,7 +511,7 @@ bool QStandardItemPrivate::insertRows(int row, int count, const QList<QStandardI
|
|||||||
rows += count;
|
rows += count;
|
||||||
int index = childIndex(row, 0);
|
int index = childIndex(row, 0);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
children.insert(index, columnCount() * count, 0);
|
children.insert(index, columnCount() * count, nullptr);
|
||||||
}
|
}
|
||||||
if (!items.isEmpty()) {
|
if (!items.isEmpty()) {
|
||||||
int index = childIndex(row, 0);
|
int index = childIndex(row, 0);
|
||||||
@ -555,7 +555,7 @@ bool QStandardItemPrivate::insertColumns(int column, int count, const QList<QSta
|
|||||||
columns += count;
|
columns += count;
|
||||||
int index = childIndex(0, column);
|
int index = childIndex(0, column);
|
||||||
for (int row = 0; row < rowCount(); ++row) {
|
for (int row = 0; row < rowCount(); ++row) {
|
||||||
children.insert(index, count, 0);
|
children.insert(index, count, nullptr);
|
||||||
index += columnCount();
|
index += columnCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -661,7 +661,7 @@ void QStandardItemModelPrivate::rowsInserted(QStandardItem *parent,
|
|||||||
{
|
{
|
||||||
Q_Q(QStandardItemModel);
|
Q_Q(QStandardItemModel);
|
||||||
if (parent == root.data())
|
if (parent == root.data())
|
||||||
rowHeaderItems.insert(row, count, 0);
|
rowHeaderItems.insert(row, count, nullptr);
|
||||||
q->endInsertRows();
|
q->endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,7 +673,7 @@ void QStandardItemModelPrivate::columnsInserted(QStandardItem *parent,
|
|||||||
{
|
{
|
||||||
Q_Q(QStandardItemModel);
|
Q_Q(QStandardItemModel);
|
||||||
if (parent == root.data())
|
if (parent == root.data())
|
||||||
columnHeaderItems.insert(column, count, 0);
|
columnHeaderItems.insert(column, count, nullptr);
|
||||||
q->endInsertColumns();
|
q->endInsertColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1881,7 +1881,7 @@ QStandardItem *QStandardItem::takeChild(int row, int column)
|
|||||||
item = d->children.at(index);
|
item = d->children.at(index);
|
||||||
if (item)
|
if (item)
|
||||||
item->d_func()->setParentAndModel(nullptr, nullptr);
|
item->d_func()->setParentAndModel(nullptr, nullptr);
|
||||||
d->children.replace(index, 0);
|
d->children.replace(index, nullptr);
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
@ -2195,9 +2195,9 @@ QStandardItemModel::QStandardItemModel(int rows, int columns, QObject *parent)
|
|||||||
Q_D(QStandardItemModel);
|
Q_D(QStandardItemModel);
|
||||||
d->init();
|
d->init();
|
||||||
d->root->insertColumns(0, columns);
|
d->root->insertColumns(0, columns);
|
||||||
d->columnHeaderItems.insert(0, columns, 0);
|
d->columnHeaderItems.insert(0, columns, nullptr);
|
||||||
d->root->insertRows(0, rows);
|
d->root->insertRows(0, rows);
|
||||||
d->rowHeaderItems.insert(0, rows, 0);
|
d->rowHeaderItems.insert(0, rows, nullptr);
|
||||||
d->root->d_func()->setModel(this);
|
d->root->d_func()->setModel(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2754,7 +2754,7 @@ QStandardItem *QStandardItemModel::takeHorizontalHeaderItem(int column)
|
|||||||
QStandardItem *headerItem = d->columnHeaderItems.at(column);
|
QStandardItem *headerItem = d->columnHeaderItems.at(column);
|
||||||
if (headerItem) {
|
if (headerItem) {
|
||||||
headerItem->d_func()->setParentAndModel(nullptr, nullptr);
|
headerItem->d_func()->setParentAndModel(nullptr, nullptr);
|
||||||
d->columnHeaderItems.replace(column, 0);
|
d->columnHeaderItems.replace(column, nullptr);
|
||||||
}
|
}
|
||||||
return headerItem;
|
return headerItem;
|
||||||
}
|
}
|
||||||
@ -2776,7 +2776,7 @@ QStandardItem *QStandardItemModel::takeVerticalHeaderItem(int row)
|
|||||||
QStandardItem *headerItem = d->rowHeaderItems.at(row);
|
QStandardItem *headerItem = d->rowHeaderItems.at(row);
|
||||||
if (headerItem) {
|
if (headerItem) {
|
||||||
headerItem->d_func()->setParentAndModel(nullptr, nullptr);
|
headerItem->d_func()->setParentAndModel(nullptr, nullptr);
|
||||||
d->rowHeaderItems.replace(row, 0);
|
d->rowHeaderItems.replace(row, nullptr);
|
||||||
}
|
}
|
||||||
return headerItem;
|
return headerItem;
|
||||||
}
|
}
|
||||||
|
@ -1247,14 +1247,14 @@ void QOpenGLMultiGroupSharedResource::insert(QOpenGLContext *context, QOpenGLSha
|
|||||||
QOpenGLSharedResource *QOpenGLMultiGroupSharedResource::value(QOpenGLContext *context)
|
QOpenGLSharedResource *QOpenGLMultiGroupSharedResource::value(QOpenGLContext *context)
|
||||||
{
|
{
|
||||||
QOpenGLContextGroup *group = context->shareGroup();
|
QOpenGLContextGroup *group = context->shareGroup();
|
||||||
return group->d_func()->m_resources.value(this, 0);
|
return group->d_func()->m_resources.value(this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QOpenGLSharedResource *> QOpenGLMultiGroupSharedResource::resources() const
|
QList<QOpenGLSharedResource *> QOpenGLMultiGroupSharedResource::resources() const
|
||||||
{
|
{
|
||||||
QList<QOpenGLSharedResource *> result;
|
QList<QOpenGLSharedResource *> result;
|
||||||
for (QList<QOpenGLContextGroup *>::const_iterator it = m_groups.constBegin(); it != m_groups.constEnd(); ++it) {
|
for (QList<QOpenGLContextGroup *>::const_iterator it = m_groups.constBegin(); it != m_groups.constEnd(); ++it) {
|
||||||
QOpenGLSharedResource *resource = (*it)->d_func()->m_resources.value(const_cast<QOpenGLMultiGroupSharedResource *>(this), 0);
|
QOpenGLSharedResource *resource = (*it)->d_func()->m_resources.value(const_cast<QOpenGLMultiGroupSharedResource *>(this), nullptr);
|
||||||
if (resource)
|
if (resource)
|
||||||
result << resource;
|
result << resource;
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ public:
|
|||||||
// Have to use our own mutex here, not the group's, since
|
// Have to use our own mutex here, not the group's, since
|
||||||
// m_groups has to be protected too against any concurrent access.
|
// m_groups has to be protected too against any concurrent access.
|
||||||
QMutexLocker locker(&m_mutex);
|
QMutexLocker locker(&m_mutex);
|
||||||
T *resource = static_cast<T *>(group->d_func()->m_resources.value(this, 0));
|
T *resource = static_cast<T *>(group->d_func()->m_resources.value(this, nullptr));
|
||||||
if (!resource) {
|
if (!resource) {
|
||||||
resource = new T(context);
|
resource = new T(context);
|
||||||
insert(context, resource);
|
insert(context, resource);
|
||||||
|
@ -471,7 +471,7 @@ public:
|
|||||||
void prepend(WindowSystemEvent *e)
|
void prepend(WindowSystemEvent *e)
|
||||||
{ const QMutexLocker locker(&mutex); impl.prepend(e); }
|
{ const QMutexLocker locker(&mutex); impl.prepend(e); }
|
||||||
WindowSystemEvent *takeFirstOrReturnNull()
|
WindowSystemEvent *takeFirstOrReturnNull()
|
||||||
{ const QMutexLocker locker(&mutex); return impl.empty() ? 0 : impl.takeFirst(); }
|
{ const QMutexLocker locker(&mutex); return impl.empty() ? nullptr : impl.takeFirst(); }
|
||||||
WindowSystemEvent *takeFirstNonUserInputOrReturnNull()
|
WindowSystemEvent *takeFirstNonUserInputOrReturnNull()
|
||||||
{
|
{
|
||||||
const QMutexLocker locker(&mutex);
|
const QMutexLocker locker(&mutex);
|
||||||
|
@ -3089,11 +3089,12 @@ CompositionFunctionSolid64 qt_functionForModeSolid64_C[] = {
|
|||||||
comp_func_solid_Difference_rgb64,
|
comp_func_solid_Difference_rgb64,
|
||||||
comp_func_solid_Exclusion_rgb64,
|
comp_func_solid_Exclusion_rgb64,
|
||||||
#else
|
#else
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
#endif
|
#endif
|
||||||
0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
CompositionFunction qt_functionForMode_C[] = {
|
CompositionFunction qt_functionForMode_C[] = {
|
||||||
@ -3164,11 +3165,12 @@ CompositionFunction64 qt_functionForMode64_C[] = {
|
|||||||
comp_func_Difference_rgb64,
|
comp_func_Difference_rgb64,
|
||||||
comp_func_Exclusion_rgb64,
|
comp_func_Exclusion_rgb64,
|
||||||
#else
|
#else
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
#endif
|
#endif
|
||||||
0, 0, 0, 0, 0, 0,
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -880,9 +880,9 @@ void PathSimplifier::connectElements()
|
|||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
for (int i = 0; i < m_elements.size(); ++i) {
|
for (int i = 0; i < m_elements.size(); ++i) {
|
||||||
const Element *element = m_elements.at(i);
|
const Element *element = m_elements.at(i);
|
||||||
Q_ASSERT(element->next == 0 || element->next->previous == element);
|
Q_ASSERT(element->next == nullptr || element->next->previous == element);
|
||||||
Q_ASSERT(element->previous == 0 || element->previous->next == element);
|
Q_ASSERT(element->previous == nullptr || element->previous->next == element);
|
||||||
Q_ASSERT((element->next == 0) == (element->previous == 0));
|
Q_ASSERT((element->next == nullptr) == (element->previous == nullptr));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1442,7 +1442,7 @@ bool PathSimplifier::elementIsLeftOf(const Element *left, const Element *right)
|
|||||||
QPair<PathSimplifier::RBNode *, PathSimplifier::RBNode *> PathSimplifier::outerBounds(const QPoint &point)
|
QPair<PathSimplifier::RBNode *, PathSimplifier::RBNode *> PathSimplifier::outerBounds(const QPoint &point)
|
||||||
{
|
{
|
||||||
RBNode *current = m_elementList.root;
|
RBNode *current = m_elementList.root;
|
||||||
QPair<RBNode *, RBNode *> result(0, 0);
|
QPair<RBNode *, RBNode *> result(nullptr, nullptr);
|
||||||
|
|
||||||
while (current) {
|
while (current) {
|
||||||
const Element *element = current->data;
|
const Element *element = current->data;
|
||||||
|
@ -3038,7 +3038,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
|
|||||||
noEmbed = true;
|
noEmbed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFontSubset *font = fonts.value(face_id, 0);
|
QFontSubset *font = fonts.value(face_id, nullptr);
|
||||||
if (!font) {
|
if (!font) {
|
||||||
font = new QFontSubset(fe, requestObject());
|
font = new QFontSubset(fe, requestObject());
|
||||||
font->noEmbed = noEmbed;
|
font->noEmbed = noEmbed;
|
||||||
|
@ -1061,7 +1061,7 @@ template <typename T>
|
|||||||
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSimple::bounds(const QPodPoint &point) const
|
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSimple::bounds(const QPodPoint &point) const
|
||||||
{
|
{
|
||||||
QRBTree<int>::Node *current = m_edgeList.root;
|
QRBTree<int>::Node *current = m_edgeList.root;
|
||||||
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(0, 0);
|
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(nullptr, nullptr);
|
||||||
while (current) {
|
while (current) {
|
||||||
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
|
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
|
||||||
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
|
const QPodPoint &v2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
|
||||||
@ -1110,7 +1110,7 @@ template <typename T>
|
|||||||
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSimple::outerBounds(const QPodPoint &point) const
|
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSimple::outerBounds(const QPodPoint &point) const
|
||||||
{
|
{
|
||||||
QRBTree<int>::Node *current = m_edgeList.root;
|
QRBTree<int>::Node *current = m_edgeList.root;
|
||||||
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(0, 0);
|
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> result(nullptr, nullptr);
|
||||||
|
|
||||||
while (current) {
|
while (current) {
|
||||||
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
|
const QPodPoint &v1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
|
||||||
@ -1309,7 +1309,7 @@ void QTriangulator<T>::ComplexToSimple::calculateIntersections()
|
|||||||
int vertex = (event.type == Event::Upper ? m_edges.at(event.edge).upper() : m_edges.at(event.edge).lower());
|
int vertex = (event.type == Event::Upper ? m_edges.at(event.edge).upper() : m_edges.at(event.edge).lower());
|
||||||
QIntersectionPoint eventPoint = QT_PREPEND_NAMESPACE(qIntersectionPoint)(event.point);
|
QIntersectionPoint eventPoint = QT_PREPEND_NAMESPACE(qIntersectionPoint)(event.point);
|
||||||
|
|
||||||
if (range.first != 0) {
|
if (range.first != nullptr) {
|
||||||
splitEdgeListRange(range.first, range.second, vertex, eventPoint);
|
splitEdgeListRange(range.first, range.second, vertex, eventPoint);
|
||||||
reorderEdgeListRange(range.first, range.second);
|
reorderEdgeListRange(range.first, range.second);
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,7 @@ static Q_CONSTEXPR QGradient::QGradientData qt_preset_gradient_data[] = {
|
|||||||
static void *qt_preset_gradient_dummy()
|
static void *qt_preset_gradient_dummy()
|
||||||
{
|
{
|
||||||
union {void *p; uint i;};
|
union {void *p; uint i;};
|
||||||
p = 0;
|
p = nullptr;
|
||||||
i |= uint(QGradient::ObjectMode);
|
i |= uint(QGradient::ObjectMode);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ static gboolean userEventSourcePrepare(GSource *source, gint *timeout)
|
|||||||
|
|
||||||
static gboolean userEventSourceCheck(GSource *source)
|
static gboolean userEventSourceCheck(GSource *source)
|
||||||
{
|
{
|
||||||
return userEventSourcePrepare(source, 0);
|
return userEventSourcePrepare(source, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean userEventSourceDispatch(GSource *source, GSourceFunc, gpointer)
|
static gboolean userEventSourceDispatch(GSource *source, GSourceFunc, gpointer)
|
||||||
@ -111,7 +111,7 @@ QPAEventDispatcherGlib::~QPAEventDispatcherGlib()
|
|||||||
|
|
||||||
g_source_destroy(&d->userEventSource->source);
|
g_source_destroy(&d->userEventSource->source);
|
||||||
g_source_unref(&d->userEventSource->source);
|
g_source_unref(&d->userEventSource->source);
|
||||||
d->userEventSource = 0;
|
d->userEventSource = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
|
bool QPAEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||||
|
@ -80,16 +80,16 @@ Q_DECLARE_LOGGING_CATEGORY(qLcTray)
|
|||||||
|
|
||||||
ResourceHelper::ResourceHelper()
|
ResourceHelper::ResourceHelper()
|
||||||
{
|
{
|
||||||
std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));
|
std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(nullptr));
|
||||||
std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0));
|
std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceHelper::clear()
|
void ResourceHelper::clear()
|
||||||
{
|
{
|
||||||
qDeleteAll(palettes, palettes + QPlatformTheme::NPalettes);
|
qDeleteAll(palettes, palettes + QPlatformTheme::NPalettes);
|
||||||
qDeleteAll(fonts, fonts + QPlatformTheme::NFonts);
|
qDeleteAll(fonts, fonts + QPlatformTheme::NFonts);
|
||||||
std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(0));
|
std::fill(palettes, palettes + QPlatformTheme::NPalettes, static_cast<QPalette *>(nullptr));
|
||||||
std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(0));
|
std::fill(fonts, fonts + QPlatformTheme::NFonts, static_cast<QFont *>(nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *QGenericUnixTheme::name = "generic";
|
const char *QGenericUnixTheme::name = "generic";
|
||||||
@ -162,7 +162,7 @@ const QFont *QGenericUnixTheme::font(Font type) const
|
|||||||
case QPlatformTheme::FixedFont:
|
case QPlatformTheme::FixedFont:
|
||||||
return &d->fixedFont;
|
return &d->fixedFont;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +532,7 @@ QFont *QKdeThemePrivate::kdeFont(const QVariant &fontValue)
|
|||||||
return new QFont(font);
|
return new QFont(font);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme()
|
|||||||
const QByteArray kdeVersionBA = qgetenv("KDE_SESSION_VERSION");
|
const QByteArray kdeVersionBA = qgetenv("KDE_SESSION_VERSION");
|
||||||
const int kdeVersion = kdeVersionBA.toInt();
|
const int kdeVersion = kdeVersionBA.toInt();
|
||||||
if (kdeVersion < 4)
|
if (kdeVersion < 4)
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
if (kdeVersion > 4)
|
if (kdeVersion > 4)
|
||||||
// Plasma 5 follows XDG spec
|
// Plasma 5 follows XDG spec
|
||||||
@ -665,7 +665,7 @@ QPlatformTheme *QKdeTheme::createKdeTheme()
|
|||||||
kdeDirs.removeDuplicates();
|
kdeDirs.removeDuplicates();
|
||||||
if (kdeDirs.isEmpty()) {
|
if (kdeDirs.isEmpty()) {
|
||||||
qWarning("Unable to determine KDE dirs");
|
qWarning("Unable to determine KDE dirs");
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new QKdeTheme(kdeDirs, kdeVersion);
|
return new QKdeTheme(kdeDirs, kdeVersion);
|
||||||
@ -782,7 +782,7 @@ const QFont *QGnomeTheme::font(Font type) const
|
|||||||
case QPlatformTheme::FixedFont:
|
case QPlatformTheme::FixedFont:
|
||||||
return d->fixedFont;
|
return d->fixedFont;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
|
|||||||
|
|
||||||
QtFreetypeData *freetypeData = qt_getFreetypeData();
|
QtFreetypeData *freetypeData = qt_getFreetypeData();
|
||||||
|
|
||||||
QFreetypeFace *freetype = freetypeData->faces.value(face_id, 0);
|
QFreetypeFace *freetype = freetypeData->faces.value(face_id, nullptr);
|
||||||
if (freetype) {
|
if (freetype) {
|
||||||
freetype->ref.ref();
|
freetype->ref.ref();
|
||||||
} else {
|
} else {
|
||||||
@ -1396,7 +1396,7 @@ void QFontEngineFT::TransformedGlyphSets::moveToFront(int i)
|
|||||||
QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
|
QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
|
||||||
{
|
{
|
||||||
if (matrix.type() > QTransform::TxShear || !cacheEnabled)
|
if (matrix.type() > QTransform::TxShear || !cacheEnabled)
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
// FT_Set_Transform only supports scalable fonts
|
// FT_Set_Transform only supports scalable fonts
|
||||||
if (!FT_IS_SCALABLE(freetype->face))
|
if (!FT_IS_SCALABLE(freetype->face))
|
||||||
|
@ -2667,7 +2667,7 @@ void QFontCache::cleanup()
|
|||||||
// no cache - just ignore
|
// no cache - just ignore
|
||||||
}
|
}
|
||||||
if (cache && cache->hasLocalData())
|
if (cache && cache->hasLocalData())
|
||||||
cache->setLocalData(0);
|
cache->setLocalData(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QBasicAtomicInt font_cache_id = Q_BASIC_ATOMIC_INITIALIZER(0);
|
static QBasicAtomicInt font_cache_id = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||||
|
@ -230,7 +230,7 @@ bool QFontEngine::supportsScript(QChar::Script script) const
|
|||||||
if (qt_useHarfbuzzNG()) {
|
if (qt_useHarfbuzzNG()) {
|
||||||
// in AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table
|
// in AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table
|
||||||
uint len;
|
uint len;
|
||||||
if (getSfntTableData(MAKE_TAG('m','o','r','t'), 0, &len) || getSfntTableData(MAKE_TAG('m','o','r','x'), 0, &len))
|
if (getSfntTableData(MAKE_TAG('m','o','r','t'), nullptr, &len) || getSfntTableData(MAKE_TAG('m','o','r','x'), nullptr, &len))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (hb_face_t *face = hb_qt_face_get_for_engine(const_cast<QFontEngine *>(this))) {
|
if (hb_face_t *face = hb_qt_face_get_for_engine(const_cast<QFontEngine *>(this))) {
|
||||||
|
@ -90,7 +90,7 @@ static const QFontEngineQPF2::TagType tagTypes[QFontEngineQPF2::NumTags] = {
|
|||||||
#define READ_VERIFY(type, variable) \
|
#define READ_VERIFY(type, variable) \
|
||||||
if (tagPtr + sizeof(type) > endPtr) { \
|
if (tagPtr + sizeof(type) > endPtr) { \
|
||||||
DEBUG_VERIFY() << "read verify failed in line" << __LINE__; \
|
DEBUG_VERIFY() << "read verify failed in line" << __LINE__; \
|
||||||
return 0; \
|
return nullptr; \
|
||||||
} \
|
} \
|
||||||
variable = qFromBigEndian<type>(tagPtr); \
|
variable = qFromBigEndian<type>(tagPtr); \
|
||||||
DEBUG_VERIFY() << "read value" << variable << "of type " #type; \
|
DEBUG_VERIFY() << "read value" << variable << "of type " #type; \
|
||||||
@ -113,7 +113,7 @@ T readValue(const uchar *&data)
|
|||||||
#define VERIFY_TAG(condition) \
|
#define VERIFY_TAG(condition) \
|
||||||
if (!(condition)) { \
|
if (!(condition)) { \
|
||||||
DEBUG_VERIFY() << "verifying tag condition " #condition " failed in line" << __LINE__ << "with tag" << tag; \
|
DEBUG_VERIFY() << "verifying tag condition " #condition " failed in line" << __LINE__ << "with tag" << tag; \
|
||||||
return 0; \
|
return nullptr; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const uchar *verifyTag(const uchar *tagPtr, const uchar *endPtr)
|
static inline const uchar *verifyTag(const uchar *tagPtr, const uchar *endPtr)
|
||||||
|
@ -1601,7 +1601,7 @@ QTextObject *QTextDocumentPrivate::objectForIndex(int objectIndex) const
|
|||||||
if (objectIndex < 0)
|
if (objectIndex < 0)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
QTextObject *object = objects.value(objectIndex, 0);
|
QTextObject *object = objects.value(objectIndex, nullptr);
|
||||||
if (!object) {
|
if (!object) {
|
||||||
QTextDocumentPrivate *that = const_cast<QTextDocumentPrivate *>(this);
|
QTextDocumentPrivate *that = const_cast<QTextDocumentPrivate *>(this);
|
||||||
QTextFormat fmt = formats.objectFormat(objectIndex);
|
QTextFormat fmt = formats.objectFormat(objectIndex);
|
||||||
|
@ -2909,7 +2909,7 @@ void QTextDocumentLayoutPrivate::positionFloat(QTextFrame *frame, QTextLine *cur
|
|||||||
|
|
||||||
// If the frame is a table, then positioning it will affect the size if it covers more than
|
// If the frame is a table, then positioning it will affect the size if it covers more than
|
||||||
// one page, because of page breaks and repeating the header.
|
// one page, because of page breaks and repeating the header.
|
||||||
if (qobject_cast<QTextTable *>(frame) != 0)
|
if (qobject_cast<QTextTable *>(frame) != nullptr)
|
||||||
fd->sizeDirty = frameSpansIntoNextPage;
|
fd->sizeDirty = frameSpansIntoNextPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
|
|||||||
.arg(block.textList()->formatIndex()));
|
.arg(block.textList()->formatIndex()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_listStack.push(0);
|
m_listStack.push(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1255,7 +1255,7 @@ void QGridLayoutEngine::maybeExpandGrid(int row, int column, Qt::Orientation ori
|
|||||||
|
|
||||||
Q_ASSERT(newIndex > oldIndex);
|
Q_ASSERT(newIndex > oldIndex);
|
||||||
q_grid[newIndex] = q_grid[oldIndex];
|
q_grid[newIndex] = q_grid[oldIndex];
|
||||||
q_grid[oldIndex] = 0;
|
q_grid[oldIndex] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1264,7 +1264,7 @@ void QGridLayoutEngine::maybeExpandGrid(int row, int column, Qt::Orientation ori
|
|||||||
|
|
||||||
void QGridLayoutEngine::regenerateGrid()
|
void QGridLayoutEngine::regenerateGrid()
|
||||||
{
|
{
|
||||||
q_grid.fill(0);
|
q_grid.fill(nullptr);
|
||||||
|
|
||||||
for (int i = q_items.count() - 1; i >= 0; --i) {
|
for (int i = q_items.count() - 1; i >= 0; --i) {
|
||||||
QGridLayoutItem *item = q_items.at(i);
|
QGridLayoutItem *item = q_items.at(i);
|
||||||
|
@ -66,7 +66,7 @@ QBasicPlatformVulkanInstance::QBasicPlatformVulkanInstance()
|
|||||||
m_vkGetInstanceProcAddr(nullptr),
|
m_vkGetInstanceProcAddr(nullptr),
|
||||||
m_ownsVkInst(false),
|
m_ownsVkInst(false),
|
||||||
m_errorCode(VK_SUCCESS),
|
m_errorCode(VK_SUCCESS),
|
||||||
m_debugCallback(0)
|
m_debugCallback(VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,9 +101,9 @@ public:
|
|||||||
|
|
||||||
explicit QHttpNetworkConnection(const QString &hostName, quint16 port = 80, bool encrypt = false,
|
explicit QHttpNetworkConnection(const QString &hostName, quint16 port = 80, bool encrypt = false,
|
||||||
ConnectionType connectionType = ConnectionTypeHTTP,
|
ConnectionType connectionType = ConnectionTypeHTTP,
|
||||||
QObject *parent = 0);
|
QObject *parent = nullptr);
|
||||||
QHttpNetworkConnection(quint16 channelCount, const QString &hostName, quint16 port = 80,
|
QHttpNetworkConnection(quint16 channelCount, const QString &hostName, quint16 port = 80,
|
||||||
bool encrypt = false, QObject *parent = 0,
|
bool encrypt = false, QObject *parent = nullptr,
|
||||||
ConnectionType connectionType = ConnectionTypeHTTP);
|
ConnectionType connectionType = ConnectionTypeHTTP);
|
||||||
~QHttpNetworkConnection();
|
~QHttpNetworkConnection();
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ void QHttpThreadDelegate::startRequestSynchronously()
|
|||||||
synchronousRequestLoop.exec();
|
synchronousRequestLoop.exec();
|
||||||
|
|
||||||
connections.localData()->releaseEntry(cacheKey);
|
connections.localData()->releaseEntry(cacheKey);
|
||||||
connections.setLocalData(0);
|
connections.setLocalData(nullptr);
|
||||||
|
|
||||||
#ifdef QHTTPTHREADDELEGATE_DEBUG
|
#ifdef QHTTPTHREADDELEGATE_DEBUG
|
||||||
qDebug() << "QHttpThreadDelegate::startRequestSynchronously() thread=" << QThread::currentThreadId() << "finished";
|
qDebug() << "QHttpThreadDelegate::startRequestSynchronously() thread=" << QThread::currentThreadId() << "finished";
|
||||||
|
@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
# define DEFINEFUNC(ret, func, arg, a, err, funcret) \
|
# define DEFINEFUNC(ret, func, arg, a, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg); \
|
typedef ret (*_q_PTR_##func)(arg); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg) { \
|
ret q_##func(arg) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -98,7 +98,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2)
|
// ret func(arg1, arg2)
|
||||||
# define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \
|
# define DEFINEFUNC2(ret, func, arg1, a, arg2, b, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2) { \
|
ret q_##func(arg1, arg2) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func);\
|
qsslSocketUnresolvedSymbolWarning(#func);\
|
||||||
@ -110,7 +110,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3)
|
// ret func(arg1, arg2, arg3)
|
||||||
# define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \
|
# define DEFINEFUNC3(ret, func, arg1, a, arg2, b, arg3, c, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3) { \
|
ret q_##func(arg1, arg2, arg3) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -122,7 +122,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3, arg4)
|
// ret func(arg1, arg2, arg3, arg4)
|
||||||
# define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \
|
# define DEFINEFUNC4(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3, arg4) { \
|
ret q_##func(arg1, arg2, arg3, arg4) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -134,7 +134,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3, arg4, arg5)
|
// ret func(arg1, arg2, arg3, arg4, arg5)
|
||||||
# define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \
|
# define DEFINEFUNC5(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3, arg4, arg5) { \
|
ret q_##func(arg1, arg2, arg3, arg4, arg5) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3, arg4, arg6)
|
// ret func(arg1, arg2, arg3, arg4, arg6)
|
||||||
# define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \
|
# define DEFINEFUNC6(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { \
|
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -158,7 +158,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3, arg4, arg6, arg7)
|
// ret func(arg1, arg2, arg3, arg4, arg6, arg7)
|
||||||
# define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \
|
# define DEFINEFUNC7(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { \
|
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
@ -170,7 +170,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
// ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9)
|
// ret func(arg1, arg2, arg3, arg4, arg6, arg7, arg8, arg9)
|
||||||
# define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \
|
# define DEFINEFUNC9(ret, func, arg1, a, arg2, b, arg3, c, arg4, d, arg5, e, arg6, f, arg7, g, arg8, h, arg9, i, err, funcret) \
|
||||||
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \
|
typedef ret (*_q_PTR_##func)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \
|
||||||
static _q_PTR_##func _q_##func = 0; \
|
static _q_PTR_##func _q_##func = nullptr; \
|
||||||
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { \
|
ret q_##func(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { \
|
||||||
if (Q_UNLIKELY(!_q_##func)) { \
|
if (Q_UNLIKELY(!_q_##func)) { \
|
||||||
qsslSocketUnresolvedSymbolWarning(#func); \
|
qsslSocketUnresolvedSymbolWarning(#func); \
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
static QSqlQueryPrivate* shared_null();
|
static QSqlQueryPrivate* shared_null();
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QSqlQueryPrivate, nullQueryPrivate, (0))
|
Q_GLOBAL_STATIC_WITH_ARGS(QSqlQueryPrivate, nullQueryPrivate, (nullptr))
|
||||||
Q_GLOBAL_STATIC(QSqlNullDriver, nullDriver)
|
Q_GLOBAL_STATIC(QSqlNullDriver, nullDriver)
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QSqlNullResult, nullResult, (nullDriver()))
|
Q_GLOBAL_STATIC_WITH_ARGS(QSqlNullResult, nullResult, (nullDriver()))
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ int runMoc(int argc, char **argv)
|
|||||||
QString filename;
|
QString filename;
|
||||||
QString output;
|
QString output;
|
||||||
QFile in;
|
QFile in;
|
||||||
FILE *out = 0;
|
FILE *out = nullptr;
|
||||||
|
|
||||||
// Note that moc isn't translated.
|
// Note that moc isn't translated.
|
||||||
// If you use this code as an example for a translated app, make sure to translate the strings.
|
// If you use this code as an example for a translated app, make sure to translate the strings.
|
||||||
|
@ -196,7 +196,7 @@ static QString generateInterfaceXml(const ClassDef *mo)
|
|||||||
// start with properties:
|
// start with properties:
|
||||||
if (flags & (QDBusConnection::ExportScriptableProperties |
|
if (flags & (QDBusConnection::ExportScriptableProperties |
|
||||||
QDBusConnection::ExportNonScriptableProperties)) {
|
QDBusConnection::ExportNonScriptableProperties)) {
|
||||||
static const char *accessvalues[] = {0, "read", "write", "readwrite"};
|
static const char *accessvalues[] = {nullptr, "read", "write", "readwrite"};
|
||||||
for (const PropertyDef &mp : mo->propertyList) {
|
for (const PropertyDef &mp : mo->propertyList) {
|
||||||
if (!((!mp.scriptable.isEmpty() && (flags & QDBusConnection::ExportScriptableProperties)) ||
|
if (!((!mp.scriptable.isEmpty() && (flags & QDBusConnection::ExportScriptableProperties)) ||
|
||||||
(!mp.scriptable.isEmpty() && (flags & QDBusConnection::ExportNonScriptableProperties))))
|
(!mp.scriptable.isEmpty() && (flags & QDBusConnection::ExportNonScriptableProperties))))
|
||||||
|
@ -74,10 +74,10 @@ public:
|
|||||||
public:
|
public:
|
||||||
inline UncompressedRow ():
|
inline UncompressedRow ():
|
||||||
_M_index (0),
|
_M_index (0),
|
||||||
_M_begin (0),
|
_M_begin (nullptr),
|
||||||
_M_end (0),
|
_M_end (nullptr),
|
||||||
_M_beginNonZeros (0),
|
_M_beginNonZeros (nullptr),
|
||||||
_M_endNonZeros (0) {}
|
_M_endNonZeros (nullptr) {}
|
||||||
|
|
||||||
inline UncompressedRow (int index, const_iterator begin, const_iterator end)
|
inline UncompressedRow (int index, const_iterator begin, const_iterator end)
|
||||||
{ assign (index, begin, end); }
|
{ assign (index, begin, end); }
|
||||||
|
@ -325,10 +325,10 @@ void CppGenerator::operator () ()
|
|||||||
compressed_goto (pgoto, state_count, non_terminal_count);
|
compressed_goto (pgoto, state_count, non_terminal_count);
|
||||||
|
|
||||||
delete[] table;
|
delete[] table;
|
||||||
table = 0;
|
table = nullptr;
|
||||||
|
|
||||||
delete[] pgoto;
|
delete[] pgoto;
|
||||||
pgoto = 0;
|
pgoto = nullptr;
|
||||||
|
|
||||||
#undef ACTION
|
#undef ACTION
|
||||||
#undef GOTO
|
#undef GOTO
|
||||||
|
@ -33,8 +33,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
const char *const grammar::spell [] = {
|
const char *const grammar::spell [] = {
|
||||||
"end of file", "identifier", "string literal", "%decl", "%expect", "%expect-lr", "%impl", "%left", "%merged_output", "%nonassoc",
|
"end of file", "identifier", "string literal", "%decl", "%expect", "%expect-lr", "%impl", "%left", "%merged_output", "%nonassoc",
|
||||||
"%parser", "%prec", "%right", "%start", "%token", "%token_prefix", ":", "|", ";", 0,
|
"%parser", "%prec", "%right", "%start", "%token", "%token_prefix", ":", "|", ";", nullptr,
|
||||||
0, 0
|
nullptr, nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
const short grammar::lhs [] = {
|
const short grammar::lhs [] = {
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
Recognizer::Recognizer (Grammar *grammar, bool no_lines):
|
Recognizer::Recognizer (Grammar *grammar, bool no_lines):
|
||||||
tos(0),
|
tos(0),
|
||||||
stack_size(0),
|
stack_size(0),
|
||||||
state_stack(0),
|
state_stack(nullptr),
|
||||||
_M_line(1),
|
_M_line(1),
|
||||||
_M_action_line(0),
|
_M_action_line(0),
|
||||||
_M_grammar(grammar),
|
_M_grammar(grammar),
|
||||||
|
@ -150,7 +150,7 @@ RCCFileInfo::RCCFileInfo(const QString &name, const QFileInfo &fileInfo,
|
|||||||
m_language = language;
|
m_language = language;
|
||||||
m_country = country;
|
m_country = country;
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_parent = 0;
|
m_parent = nullptr;
|
||||||
m_nameOffset = 0;
|
m_nameOffset = 0;
|
||||||
m_dataOffset = 0;
|
m_dataOffset = 0;
|
||||||
m_childOffset = 0;
|
m_childOffset = 0;
|
||||||
@ -461,7 +461,7 @@ RCCResourceLibrary::Strings::Strings() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
RCCResourceLibrary::RCCResourceLibrary(quint8 formatVersion)
|
RCCResourceLibrary::RCCResourceLibrary(quint8 formatVersion)
|
||||||
: m_root(0),
|
: m_root(nullptr),
|
||||||
m_format(C_Code),
|
m_format(C_Code),
|
||||||
m_verbose(false),
|
m_verbose(false),
|
||||||
m_compressionAlgo(CONSTANT_COMPRESSALGO_DEFAULT),
|
m_compressionAlgo(CONSTANT_COMPRESSALGO_DEFAULT),
|
||||||
@ -472,8 +472,8 @@ RCCResourceLibrary::RCCResourceLibrary(quint8 formatVersion)
|
|||||||
m_dataOffset(0),
|
m_dataOffset(0),
|
||||||
m_overallFlags(0),
|
m_overallFlags(0),
|
||||||
m_useNameSpace(CONSTANT_USENAMESPACE),
|
m_useNameSpace(CONSTANT_USENAMESPACE),
|
||||||
m_errorDevice(0),
|
m_errorDevice(nullptr),
|
||||||
m_outDevice(0),
|
m_outDevice(nullptr),
|
||||||
m_formatVersion(formatVersion),
|
m_formatVersion(formatVersion),
|
||||||
m_noZstd(false)
|
m_noZstd(false)
|
||||||
{
|
{
|
||||||
@ -707,7 +707,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_root == 0) {
|
if (m_root == nullptr) {
|
||||||
const QString msg = QString::fromLatin1("RCC: Warning: No resources in '%1'.\n").arg(fname);
|
const QString msg = QString::fromLatin1("RCC: Warning: No resources in '%1'.\n").arg(fname);
|
||||||
m_errorDevice->write(msg.toUtf8());
|
m_errorDevice->write(msg.toUtf8());
|
||||||
if (!listMode && m_format == Binary) {
|
if (!listMode && m_format == Binary) {
|
||||||
@ -770,9 +770,9 @@ void RCCResourceLibrary::reset()
|
|||||||
{
|
{
|
||||||
if (m_root) {
|
if (m_root) {
|
||||||
delete m_root;
|
delete m_root;
|
||||||
m_root = 0;
|
m_root = nullptr;
|
||||||
}
|
}
|
||||||
m_errorDevice = 0;
|
m_errorDevice = nullptr;
|
||||||
m_failedResources.clear();
|
m_failedResources.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ void WriteInitialization::acceptWidget(DomWidget *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (node->elementLayout().isEmpty())
|
if (node->elementLayout().isEmpty())
|
||||||
m_layoutChain.push(0);
|
m_layoutChain.push(nullptr);
|
||||||
|
|
||||||
m_layoutWidget = false;
|
m_layoutWidget = false;
|
||||||
if (className == QLatin1String("QWidget") && !node->hasAttributeNative()) {
|
if (className == QLatin1String("QWidget") && !node->hasAttributeNative()) {
|
||||||
@ -662,7 +662,7 @@ void WriteInitialization::acceptWidget(DomWidget *node)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_widgetChain.push(node);
|
m_widgetChain.push(node);
|
||||||
m_layoutChain.push(0);
|
m_layoutChain.push(nullptr);
|
||||||
TreeWalker::acceptWidget(node);
|
TreeWalker::acceptWidget(node);
|
||||||
m_layoutChain.pop();
|
m_layoutChain.pop();
|
||||||
m_widgetChain.pop();
|
m_widgetChain.pop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user