Merge "Merge remote-tracking branch 'origin/wip/qt6' into dev"
This commit is contained in:
commit
c65c87cf96
|
@ -4,4 +4,4 @@ CONFIG += warning_clean
|
|||
DEFINES += QT_NO_LINKED_LIST
|
||||
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
|
||||
|
||||
MODULE_VERSION = 5.15.0
|
||||
MODULE_VERSION = 6.0.0
|
||||
|
|
|
@ -60,8 +60,7 @@ public:
|
|||
qmlRegisterType<QQuickFolderListModel,1>(uri,2,1,"FolderListModel");
|
||||
qmlRegisterType<QQuickFolderListModel,2>(uri,2,2,"FolderListModel");
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
|
||||
// revision in Qt 5.11: added status property
|
||||
qmlRegisterType<QQuickFolderListModel,11>(uri, 2, 11, "FolderListModel");
|
||||
|
|
|
@ -67,8 +67,7 @@ public:
|
|||
QStringLiteral("Do not create objects of type Layout"));
|
||||
qmlRegisterRevision<QQuickGridLayoutBase, 1>(uri, 1, 1);
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 1, 15);
|
||||
}
|
||||
};
|
||||
//![class decl]
|
||||
|
|
|
@ -825,8 +825,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.LocalStorage"));
|
||||
qmlRegisterSingletonType<QQuickLocalStorage>(uri, 2, 0, "LocalStorage", module_api_factory);
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -77,8 +77,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQml.Models"));
|
||||
QQmlModelsModule::defineModule();
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
//![class decl]
|
||||
|
|
|
@ -56,8 +56,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Particles"));
|
||||
QQuickParticlesModule::defineModule();
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
//![class decl]
|
||||
|
|
|
@ -42,10 +42,6 @@
|
|||
#include <QtQml/private/qqmlcomponentattached_p.h>
|
||||
#include <QtQml/private/qqmlbind_p.h>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtQmlModels/private/qqmlmodelsmodule_p.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
|
@ -76,12 +72,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQml"));
|
||||
QQmlEnginePrivate::defineModule();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QQmlModelsModule::registerQmlTypes();
|
||||
#endif
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQml minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
//![class decl]
|
||||
|
|
|
@ -2,3 +2,6 @@ module QtQml
|
|||
plugin qmlplugin
|
||||
classname QtQmlPlugin
|
||||
typeinfo plugins.qmltypes
|
||||
import QtQml.Models
|
||||
import QtQml.WorkerScript
|
||||
designersupported
|
||||
|
|
|
@ -38,14 +38,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include <QtQml/qqmlextensionplugin.h>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtQml/private/qqmlengine_p.h>
|
||||
#include <QtQmlModels/private/qqmlmodelsmodule_p.h>
|
||||
#if QT_CONFIG(qml_worker_script)
|
||||
#include <QtQmlWorkerScript/private/qqmlworkerscriptmodule_p.h>
|
||||
#endif
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtQml/QQmlEngine>
|
||||
|
||||
#include <private/qtquick2_p.h>
|
||||
|
||||
|
@ -63,17 +56,9 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick"));
|
||||
Q_UNUSED(uri);
|
||||
moduleDefined = true;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QQmlEnginePrivate::registerQuickTypes();
|
||||
QQmlModelsModule::registerQuickTypes();
|
||||
#if QT_CONFIG(qml_worker_script)
|
||||
QQmlWorkerScriptModule::registerQuickTypes();
|
||||
#endif
|
||||
#endif
|
||||
QQmlQtQuick2Module::defineModule();
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule("QtQuick", 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule("QtQuick", 2, 15);
|
||||
}
|
||||
|
||||
~QtQuick2Plugin() override
|
||||
|
|
|
@ -3,3 +3,4 @@ plugin qtquick2plugin
|
|||
classname QtQuick2Plugin
|
||||
typeinfo plugins.qmltypes
|
||||
designersupported
|
||||
import QtQml
|
||||
|
|
|
@ -64,8 +64,7 @@ public:
|
|||
qmlRegisterType<QQuickShapeRadialGradient>(uri, 1, 0, "RadialGradient");
|
||||
qmlRegisterType<QQuickShapeConicalGradient>(uri, 1, 0, "ConicalGradient");
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions
|
||||
qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 1, 15);
|
||||
|
||||
// revision in Qt 5.11: added containsMode property
|
||||
qmlRegisterType<QQuickShape, 11>(uri, 1, 11, "Shape");
|
||||
|
|
|
@ -69,8 +69,7 @@ public:
|
|||
qmlRegisterType<TimeoutTransition>(uri, 1, 0, "TimeoutTransition");
|
||||
qmlProtectModule(uri, 1);
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 1, 15);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -152,8 +152,7 @@ public:
|
|||
qmlRegisterType<QuickTestUtil>(uri,1,0,"TestUtil");
|
||||
qmlRegisterAnonymousType<QQuickTouchEventSequence>(uri, 1);
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 1, 15);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -59,8 +59,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.wavefrontmesh"));
|
||||
qmlRegisterType<QWavefrontMesh>(uri, 1, 0, "WavefrontMesh");
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.12 onward
|
||||
qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 1, 15);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -71,8 +71,7 @@ public:
|
|||
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Window"));
|
||||
QQuickWindowModule::defineModule();
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
//![class decl]
|
||||
|
|
|
@ -71,8 +71,7 @@ public:
|
|||
|
||||
QQmlWorkerScriptModule::defineModule();
|
||||
|
||||
// Auto-increment the import to stay in sync with ALL future QtQuick minor versions from 5.11 onward
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
module QtQml.WorkerScript
|
||||
plugin workerscriptplugin
|
||||
classname QtQmlWorkerScriptPlugin
|
||||
designersupported
|
||||
|
|
|
@ -641,7 +641,7 @@ void QAbstractAnimationJob::removeAnimationChangeListener(QAnimationJobChangeLis
|
|||
|
||||
void QAbstractAnimationJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "AbstractAnimationJob(" << hex << (const void *) this << dec << ") state:"
|
||||
d << "AbstractAnimationJob(" << Qt::hex << (const void *) this << Qt::dec << ") state:"
|
||||
<< m_state << "duration:" << duration();
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void QContinuingAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimat
|
|||
|
||||
void QContinuingAnimationGroupJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "ContinuingAnimationGroupJob(" << hex << (const void *) this << dec << ")";
|
||||
d << "ContinuingAnimationGroupJob(" << Qt::hex << (const void *) this << Qt::dec << ")";
|
||||
|
||||
debugChildren(d);
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ void QParallelAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimatio
|
|||
|
||||
void QParallelAnimationGroupJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "ParallelAnimationGroupJob(" << hex << (const void *) this << dec << ")";
|
||||
d << "ParallelAnimationGroupJob(" << Qt::hex << (const void *) this << Qt::dec << ")";
|
||||
|
||||
debugChildren(d);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ void QPauseAnimationJob::updateCurrentTime(int)
|
|||
|
||||
void QPauseAnimationJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "PauseAnimationJob(" << hex << (const void *) this << dec << ")" << "duration:" << m_duration;
|
||||
d << "PauseAnimationJob(" << Qt::hex << (const void *) this << Qt::dec << ")" << "duration:" << m_duration;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -426,7 +426,7 @@ void QSequentialAnimationGroupJob::animationRemoved(QAbstractAnimationJob *anim,
|
|||
|
||||
void QSequentialAnimationGroupJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "SequentialAnimationGroupJob(" << hex << (const void *) this << dec << ")" << "currentAnimation:" << (void *)m_currentAnimation;
|
||||
d << "SequentialAnimationGroupJob(" << Qt::hex << (const void *) this << Qt::dec << ")" << "currentAnimation:" << (void *)m_currentAnimation;
|
||||
|
||||
debugChildren(d);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ static QString toString(QV4::ReturnedValue v)
|
|||
static void dumpConstantTable(const StaticValue *constants, uint count)
|
||||
{
|
||||
QDebug d = qDebug();
|
||||
d.nospace() << right;
|
||||
d.nospace() << Qt::right;
|
||||
for (uint i = 0; i < count; ++i) {
|
||||
d << qSetFieldWidth(8) << i << qSetFieldWidth(0) << ": "
|
||||
<< toString(constants[i].asReturnedValue()).toUtf8().constData() << "\n";
|
||||
|
|
|
@ -223,7 +223,8 @@ Chunk *MemorySegment::allocate(size_t size)
|
|||
pageReservation.commit(candidate, size);
|
||||
for (uint i = 0; i < requiredChunks; ++i)
|
||||
setBit(candidate - base + i);
|
||||
DEBUG << "allocated chunk " << candidate << hex << size;
|
||||
DEBUG << "allocated chunk " << candidate << Qt::hex << size;
|
||||
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
|
@ -1024,7 +1025,7 @@ static size_t dumpBins(BlockAllocator *b, const char *title)
|
|||
SDUMP() << " large slot map";
|
||||
HeapItem *h = b->freeBins[BlockAllocator::NumBins - 1];
|
||||
while (h) {
|
||||
SDUMP() << " " << hex << (quintptr(h)/32) << h->freeData.availableSlots;
|
||||
SDUMP() << " " << Qt::hex << (quintptr(h)/32) << h->freeData.availableSlots;
|
||||
h = h->freeData.next;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,30 +224,6 @@ void QQmlEnginePrivate::defineModule()
|
|||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
void QQmlEnginePrivate::registerQuickTypes()
|
||||
{
|
||||
// Don't add anything here. These are only for backwards compatibility.
|
||||
|
||||
const char uri[] = "QtQuick";
|
||||
|
||||
qmlRegisterType<QQmlComponent>(uri, 2, 0, "Component");
|
||||
qmlRegisterType<QObject>(uri, 2, 0, "QtObject");
|
||||
qmlRegisterType<QQmlBind>(uri, 2, 0, "Binding");
|
||||
qmlRegisterType<QQmlBind, 8>(uri, 2, 8, "Binding");
|
||||
qmlRegisterCustomType<QQmlConnections>(uri, 2, 0, "Connections", new QQmlConnectionsParser);
|
||||
qmlRegisterCustomType<QQmlConnections, 3>(uri, 2, 7, "Connections", new QQmlConnectionsParser);
|
||||
#if QT_CONFIG(qml_animation)
|
||||
qmlRegisterType<QQmlTimer>(uri, 2, 0,"Timer");
|
||||
#endif
|
||||
qmlRegisterType<QQmlLoggingCategory>(uri, 2, 8, "LoggingCategory");
|
||||
qmlRegisterType<QQmlLoggingCategory, 12>(uri, 2, 12, "LoggingCategory");
|
||||
#if QT_CONFIG(qml_locale)
|
||||
qmlRegisterUncreatableType<QQmlLocale>(uri, 2, 0, "Locale", QQmlEngine::tr("Locale cannot be instantiated. Use Qt.locale()"));
|
||||
#endif
|
||||
}
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
bool QQmlEnginePrivate::designerMode()
|
||||
{
|
||||
return s_designerMode;
|
||||
|
|
|
@ -252,9 +252,6 @@ public:
|
|||
static QList<QQmlError> qmlErrorFromDiagnostics(const QString &fileName, const QList<QQmlJS::DiagnosticMessage> &diagnosticMessages);
|
||||
|
||||
static void defineModule();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
static void registerQuickTypes();
|
||||
#endif
|
||||
|
||||
static bool designerMode();
|
||||
static void activateDesignerMode();
|
||||
|
|
|
@ -62,28 +62,10 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
void QQmlModelsModule::registerQmlTypes()
|
||||
void QQmlModelsModule::defineModule()
|
||||
{
|
||||
// Don't add anything here. These are only for backwards compatibility.
|
||||
#if QT_CONFIG(qml_object_model)
|
||||
qmlRegisterType<QQmlInstantiator>("QtQml", 2, 1, "Instantiator"); // Only available in >= 2.1
|
||||
qmlRegisterAnonymousType<QQmlInstanceModel>("QtQml", 2);
|
||||
#endif
|
||||
}
|
||||
const char uri[] = "QtQml.Models";
|
||||
|
||||
void QQmlModelsModule::registerQuickTypes()
|
||||
{
|
||||
// Don't add anything here. These are only for backwards compatibility.
|
||||
|
||||
const char uri[] = "QtQuick";
|
||||
|
||||
#if QT_CONFIG(qml_object_model)
|
||||
qmlRegisterType<QQmlInstantiator>(uri, 2, 1, "Instantiator");
|
||||
qmlRegisterAnonymousType<QQmlInstanceModel>(uri, 2);
|
||||
qmlRegisterType<QQmlObjectModel>(uri, 2, 0, "VisualItemModel");
|
||||
#endif
|
||||
#if QT_CONFIG(qml_list_model)
|
||||
qmlRegisterType<QQmlListElement>(uri, 2, 0, "ListElement");
|
||||
qmlRegisterCustomType<QQmlListModel>(uri, 2, 0, "ListModel", new QQmlListModelParser);
|
||||
|
@ -91,29 +73,14 @@ void QQmlModelsModule::registerQuickTypes()
|
|||
#if QT_CONFIG(qml_delegate_model)
|
||||
qmlRegisterType<QQmlDelegateModel>(uri, 2, 0, "VisualDataModel");
|
||||
qmlRegisterType<QQmlDelegateModelGroup>(uri, 2, 0, "VisualDataGroup");
|
||||
qmlRegisterType<QQuickPackage>(uri, 2, 0, "Package");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
void QQmlModelsModule::defineModule()
|
||||
{
|
||||
const char uri[] = "QtQml.Models";
|
||||
|
||||
#if QT_CONFIG(qml_list_model)
|
||||
qmlRegisterType<QQmlListElement>(uri, 2, 1, "ListElement");
|
||||
qmlRegisterCustomType<QQmlListModel>(uri, 2, 1, "ListModel", new QQmlListModelParser);
|
||||
#endif
|
||||
#if QT_CONFIG(qml_delegate_model)
|
||||
qmlRegisterType<QQmlDelegateModel>(uri, 2, 1, "DelegateModel");
|
||||
qmlRegisterType<QQmlDelegateModelGroup>(uri, 2, 1, "DelegateModelGroup");
|
||||
qmlRegisterType<QQuickPackage>(uri, 2, 14, "Package");
|
||||
qmlRegisterType<QQuickPackage>(uri, 2, 0, "Package");
|
||||
#endif
|
||||
#if QT_CONFIG(qml_object_model)
|
||||
qmlRegisterType<QQmlObjectModel>(uri, 2, 1, "ObjectModel");
|
||||
qmlRegisterType<QQmlObjectModel,3>(uri, 2, 3, "ObjectModel");
|
||||
qmlRegisterType<QQmlInstantiator>(uri, 2, 14, "Instantiator");
|
||||
qmlRegisterType<QQmlInstantiator>(uri, 2, 1, "Instantiator");
|
||||
qmlRegisterAnonymousType<QQmlInstanceModel>(uri, 2);
|
||||
#endif
|
||||
#if QT_CONFIG(itemmodel)
|
||||
|
|
|
@ -58,11 +58,6 @@ QT_BEGIN_NAMESPACE
|
|||
class Q_QMLMODELS_PRIVATE_EXPORT QQmlModelsModule
|
||||
{
|
||||
public:
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
static void registerQmlTypes();
|
||||
static void registerQuickTypes();
|
||||
#endif
|
||||
|
||||
static void defineModule();
|
||||
static void defineLabsModule();
|
||||
};
|
||||
|
|
|
@ -42,17 +42,6 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
void QQmlWorkerScriptModule::registerQuickTypes()
|
||||
{
|
||||
// Don't add anything here. These are only for backwards compatibility.
|
||||
const char uri[] = "QtQuick";
|
||||
qmlRegisterType<QQuickWorkerScript>(uri, 2, 0, "WorkerScript");
|
||||
}
|
||||
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
|
||||
void QQmlWorkerScriptModule::defineModule()
|
||||
{
|
||||
const char uri[] = "QtQml.WorkerScript";
|
||||
|
|
|
@ -58,9 +58,6 @@ QT_BEGIN_NAMESPACE
|
|||
class Q_QMLWORKERSCRIPT_PRIVATE_EXPORT QQmlWorkerScriptModule
|
||||
{
|
||||
public:
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
static void registerQuickTypes();
|
||||
#endif
|
||||
static void defineModule();
|
||||
};
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event)
|
|||
{
|
||||
if (Q_UNLIKELY(lcPinchHandler().isDebugEnabled())) {
|
||||
for (const QQuickHandlerPoint &p : currentPoints())
|
||||
qCDebug(lcPinchHandler) << hex << p.id() << p.sceneGrabPosition() << "->" << p.scenePosition();
|
||||
qCDebug(lcPinchHandler) << Qt::hex << p.id() << p.sceneGrabPosition() << "->" << p.scenePosition();
|
||||
}
|
||||
QQuickMultiPointHandler::handlePointerEventImpl(event);
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ bool QQuickPointerHandler::approveGrabTransition(QQuickEventPoint *point, QObjec
|
|||
allowed = true;
|
||||
}
|
||||
}
|
||||
qCDebug(lcPointerHandlerGrab) << "point" << hex << point->pointId() << "permission" <<
|
||||
qCDebug(lcPointerHandlerGrab) << "point" << Qt::hex << point->pointId() << "permission" <<
|
||||
QMetaEnum::fromType<GrabPermissions>().valueToKeys(grabPermissions()) <<
|
||||
':' << this << (allowed ? "approved to" : "denied to") << proposedGrabber;
|
||||
return allowed;
|
||||
|
@ -473,7 +473,7 @@ bool QQuickPointerHandler::wantsPointerEvent(QQuickPointerEvent *event)
|
|||
bool QQuickPointerHandler::wantsEventPoint(QQuickEventPoint *point)
|
||||
{
|
||||
bool ret = point->exclusiveGrabber() == this || point->passiveGrabbers().contains(this) || parentContains(point);
|
||||
qCDebug(lcPointerHandlerDispatch) << hex << point->pointId() << "@" << point->scenePosition()
|
||||
qCDebug(lcPointerHandlerDispatch) << Qt::hex << point->pointId() << "@" << point->scenePosition()
|
||||
<< metaObject()->className() << objectName() << ret;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ bool QQuickSinglePointHandler::wantsPointerEvent(QQuickPointerEvent *event)
|
|||
}
|
||||
}
|
||||
if (missing)
|
||||
qCWarning(DBG_TOUCH_TARGET) << this << "pointId" << hex << d->pointInfo.id()
|
||||
qCWarning(DBG_TOUCH_TARGET) << this << "pointId" << Qt::hex << d->pointInfo.id()
|
||||
<< "is missing from current event, but was neither canceled nor released";
|
||||
if (point) {
|
||||
if (candidatePointCount == 1 || (candidatePointCount > 1 && d->ignoreAdditionalPoints)) {
|
||||
|
|
|
@ -851,7 +851,7 @@ void QQuickEventPoint::setGrabberItem(QQuickItem *grabber)
|
|||
if (oldGrabberHandler && !oldGrabberHandler->approveGrabTransition(this, grabber))
|
||||
return;
|
||||
if (Q_UNLIKELY(lcPointerGrab().isDebugEnabled())) {
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this) << "@" << m_scenePos
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << Qt::hex << m_pointId << pointStateString(this) << "@" << m_scenePos
|
||||
<< ": grab" << m_exclusiveGrabber << "->" << grabber;
|
||||
}
|
||||
QQuickItem *oldGrabberItem = grabberItem();
|
||||
|
@ -892,10 +892,10 @@ void QQuickEventPoint::setGrabberPointerHandler(QQuickPointerHandler *grabber, b
|
|||
if (Q_UNLIKELY(lcPointerGrab().isDebugEnabled())) {
|
||||
if (exclusive) {
|
||||
if (m_exclusiveGrabber != grabber)
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << Qt::hex << m_pointId << pointStateString(this)
|
||||
<< ": grab (exclusive)" << m_exclusiveGrabber << "->" << grabber;
|
||||
} else {
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << Qt::hex << m_pointId << pointStateString(this)
|
||||
<< ": grab (passive)" << grabber;
|
||||
}
|
||||
}
|
||||
|
@ -958,7 +958,7 @@ void QQuickEventPoint::cancelExclusiveGrabImpl(QTouchEvent *cancelEvent)
|
|||
if (m_exclusiveGrabber.isNull())
|
||||
return;
|
||||
if (Q_UNLIKELY(lcPointerGrab().isDebugEnabled())) {
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << Qt::hex << m_pointId << pointStateString(this)
|
||||
<< ": grab (exclusive)" << m_exclusiveGrabber << "-> nullptr";
|
||||
}
|
||||
if (auto handler = grabberPointerHandler()) {
|
||||
|
@ -981,7 +981,7 @@ void QQuickEventPoint::cancelPassiveGrab(QQuickPointerHandler *handler)
|
|||
{
|
||||
if (removePassiveGrabber(handler)) {
|
||||
if (Q_UNLIKELY(lcPointerGrab().isDebugEnabled())) {
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
|
||||
qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << Qt::hex << m_pointId << pointStateString(this)
|
||||
<< ": grab (passive)" << handler << "removed";
|
||||
}
|
||||
handler->onGrabChanged(handler, CancelGrabPassive, this);
|
||||
|
@ -1960,7 +1960,7 @@ Q_QUICK_PRIVATE_EXPORT QDebug operator<<(QDebug dbg, const QQuickEventPoint *eve
|
|||
dbg << "QQuickEventPoint(accepted:" << event->isAccepted()
|
||||
<< " state:";
|
||||
QtDebugUtils::formatQEnum(dbg, event->state());
|
||||
dbg << " scenePos:" << event->scenePosition() << " id:" << hex << event->pointId() << dec
|
||||
dbg << " scenePos:" << event->scenePosition() << " id:" << Qt::hex << event->pointId() << Qt::dec
|
||||
<< " timeHeld:" << event->timeHeld() << ')';
|
||||
return dbg;
|
||||
}
|
||||
|
|
|
@ -180,8 +180,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor)
|
|||
QQmlPrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent };
|
||||
QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent);
|
||||
|
||||
// Register the latest version, even if there are no new types or new revisions for existing types yet.
|
||||
qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
|
||||
qmlRegisterModule(uri, 2, 15);
|
||||
|
||||
#if !QT_CONFIG(quick_animatedimage)
|
||||
qmlRegisterTypeNotAvailable(uri,major,minor,"AnimatedImage", QCoreApplication::translate("QQuickAnimatedImage","Qt was built without support for QMovie"));
|
||||
|
|
|
@ -369,10 +369,6 @@ void QQuickPaintedItem::setTextureSize(const QSize &size)
|
|||
emit textureSizeChanged();
|
||||
}
|
||||
|
||||
#if QT_VERSION >= 0x060000
|
||||
#warning "Remove: QQuickPaintedItem::contentsBoundingRect, contentsScale, contentsSize. Also remove them from qsgadaptationlayer_p.h and qsgdefaultpainternode.h/cpp."
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\obsolete
|
||||
|
||||
|
|
|
@ -517,14 +517,14 @@ void QQuickViewPrivate::setRootObject(QObject *obj)
|
|||
sgItem->setParentItem(q->QQuickWindow::contentItem());
|
||||
QQml_setParent_noEvent(sgItem, q->QQuickWindow::contentItem());
|
||||
} else if (qobject_cast<QWindow *>(obj)) {
|
||||
qWarning() << "QQuickView does not support using windows as a root item." << endl
|
||||
<< endl
|
||||
<< "If you wish to create your root window from QML, consider using QQmlApplicationEngine instead." << endl;
|
||||
qWarning() << "QQuickView does not support using windows as a root item." << Qt::endl
|
||||
<< Qt::endl
|
||||
<< "If you wish to create your root window from QML, consider using QQmlApplicationEngine instead." << Qt::endl;
|
||||
} else {
|
||||
qWarning() << "QQuickView only supports loading of root objects that derive from QQuickItem." << endl
|
||||
<< endl
|
||||
<< "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << endl
|
||||
<< "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << endl;
|
||||
qWarning() << "QQuickView only supports loading of root objects that derive from QQuickItem." << Qt::endl
|
||||
<< Qt::endl
|
||||
<< "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << Qt::endl
|
||||
<< "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << Qt::endl;
|
||||
delete obj;
|
||||
root = nullptr;
|
||||
}
|
||||
|
|
|
@ -760,7 +760,7 @@ bool QQuickWindowPrivate::deliverTouchAsMouse(QQuickItem *item, QQuickPointerEve
|
|||
if (!item->contains(pos))
|
||||
break;
|
||||
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << hex << p.id() << "->" << item;
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << Qt::hex << p.id() << "->" << item;
|
||||
QScopedPointer<QMouseEvent> mousePress(touchToMouseEvent(QEvent::MouseButtonPress, p, event.data(), item, false));
|
||||
|
||||
// Send a single press and see if that's accepted
|
||||
|
@ -802,7 +802,7 @@ bool QQuickWindowPrivate::deliverTouchAsMouse(QQuickItem *item, QQuickPointerEve
|
|||
QCoreApplication::sendEvent(item, me.data());
|
||||
event->setAccepted(me->isAccepted());
|
||||
if (me->isAccepted()) {
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << hex << p.id() << "->" << mouseGrabberItem;
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << Qt::hex << p.id() << "->" << mouseGrabberItem;
|
||||
}
|
||||
return event->isAccepted();
|
||||
} else {
|
||||
|
@ -2533,7 +2533,7 @@ void QQuickWindowPrivate::deliverTouchEvent(QQuickPointerTouchEvent *event)
|
|||
QQuickEventPoint *point = event->point(i);
|
||||
if (point->state() == QQuickEventPoint::Released) {
|
||||
int id = point->pointId();
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP" << hex << id << "released";
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP" << Qt::hex << id << "released";
|
||||
point->setGrabberItem(nullptr);
|
||||
if (id == touchMouseId)
|
||||
cancelTouchMouseSynthesis();
|
||||
|
@ -2630,7 +2630,7 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent *event,
|
|||
if (point->grabberPointerHandler())
|
||||
cancelTouchMouseSynthesis();
|
||||
} else {
|
||||
qCWarning(DBG_TOUCH_TARGET) << "during delivery of touch press, synth-mouse ID" << hex << touchMouseId << "is missing from" << event;
|
||||
qCWarning(DBG_TOUCH_TARGET) << "during delivery of touch press, synth-mouse ID" << Qt::hex << touchMouseId << "is missing from" << event;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < pointCount; ++i) {
|
||||
|
@ -2772,7 +2772,7 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo
|
|||
if (point.state() == Qt::TouchPointPressed) {
|
||||
if (auto *tp = ptEvent->pointById(point.id())) {
|
||||
if (tp->exclusiveGrabber() == item) {
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP" << hex << point.id() << "disassociated";
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP" << Qt::hex << point.id() << "disassociated";
|
||||
tp->setGrabberItem(nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -3051,7 +3051,7 @@ bool QQuickWindowPrivate::sendFilteredPointerEventImpl(QQuickPointerEvent *event
|
|||
qCDebug(DBG_TOUCH) << "touch event intercepted as synth mouse event by childMouseEventFilter of " << filteringParent;
|
||||
skipDelivery.append(filteringParent);
|
||||
if (t != QEvent::MouseButtonRelease) {
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << hex << tp.id() << "->" << filteringParent;
|
||||
qCDebug(DBG_TOUCH_TARGET) << "TP (mouse)" << Qt::hex << tp.id() << "->" << filteringParent;
|
||||
pointerEventInstance(dev)->pointById(tp.id())->setGrabberItem(filteringParent);
|
||||
touchMouseUnset = false; // We want to leave touchMouseId and touchMouseDevice set
|
||||
if (mouseEvent->isAccepted())
|
||||
|
|
|
@ -448,13 +448,13 @@ void qsg_dumpShadowRoots(Node *n)
|
|||
QByteArray ind(indent, ' ');
|
||||
|
||||
if (n->type() == QSGNode::ClipNodeType || n->isBatchRoot) {
|
||||
qDebug() << ind.constData() << "[X]" << n->sgNode << hex << uint(n->sgNode->flags());
|
||||
qDebug() << ind.constData() << "[X]" << n->sgNode << Qt::hex << uint(n->sgNode->flags());
|
||||
qsg_dumpShadowRoots(n->rootInfo(), indent);
|
||||
} else {
|
||||
QDebug d = qDebug();
|
||||
d << ind.constData() << "[ ]" << n->sgNode << hex << uint(n->sgNode->flags());
|
||||
d << ind.constData() << "[ ]" << n->sgNode << Qt::hex << uint(n->sgNode->flags());
|
||||
if (n->type() == QSGNode::GeometryNodeType)
|
||||
d << "order" << dec << n->element()->order;
|
||||
d << "order" << Qt::dec << n->element()->order;
|
||||
}
|
||||
|
||||
SHADOWNODE_TRAVERSE(n)
|
||||
|
@ -2337,7 +2337,7 @@ void Renderer::uploadBatch(Batch *b)
|
|||
iDump << " -- Index Data, count:" << b->indexCount;
|
||||
for (int i=0; i<b->indexCount; ++i) {
|
||||
if ((i % 24) == 0)
|
||||
iDump << endl << " --- ";
|
||||
iDump << Qt::endl << " --- ";
|
||||
iDump << id[i];
|
||||
}
|
||||
}
|
||||
|
@ -2350,7 +2350,7 @@ void Renderer::uploadBatch(Batch *b)
|
|||
iDump << " -- Index Data, count:" << b->indexCount;
|
||||
for (int i=0; i<b->indexCount; ++i) {
|
||||
if ((i % 24) == 0)
|
||||
iDump << endl << " --- ";
|
||||
iDump << Qt::endl << " --- ";
|
||||
iDump << id[i];
|
||||
}
|
||||
}
|
||||
|
@ -3952,8 +3952,8 @@ void Renderer::setGraphicsPipeline(QRhiCommandBuffer *cb, const Batch *batch, El
|
|||
void Renderer::renderBatches()
|
||||
{
|
||||
if (Q_UNLIKELY(debug_render())) {
|
||||
qDebug().nospace() << "Rendering:" << endl
|
||||
<< " -> Opaque: " << qsg_countNodesInBatches(m_opaqueBatches) << " nodes in " << m_opaqueBatches.size() << " batches..." << endl
|
||||
qDebug().nospace() << "Rendering:" << Qt::endl
|
||||
<< " -> Opaque: " << qsg_countNodesInBatches(m_opaqueBatches) << " nodes in " << m_opaqueBatches.size() << " batches..." << Qt::endl
|
||||
<< " -> Alpha: " << qsg_countNodesInBatches(m_alphaBatches) << " nodes in " << m_alphaBatches.size() << " batches...";
|
||||
}
|
||||
|
||||
|
|
|
@ -1466,7 +1466,7 @@ QDebug operator<<(QDebug d, const QSGGeometryNode *n)
|
|||
d << "Geometry(null)";
|
||||
return d;
|
||||
}
|
||||
d << "GeometryNode(" << hex << (const void *) n << dec;
|
||||
d << "GeometryNode(" << Qt::hex << (const void *) n << Qt::dec;
|
||||
|
||||
const QSGGeometry *g = n->geometry();
|
||||
|
||||
|
@ -1517,7 +1517,7 @@ QDebug operator<<(QDebug d, const QSGClipNode *n)
|
|||
d << "ClipNode(null)";
|
||||
return d;
|
||||
}
|
||||
d << "ClipNode(" << hex << (const void *) n << dec;
|
||||
d << "ClipNode(" << Qt::hex << (const void *) n << Qt::dec;
|
||||
|
||||
if (n->childCount())
|
||||
d << "children=" << n->childCount();
|
||||
|
@ -1540,7 +1540,7 @@ QDebug operator<<(QDebug d, const QSGTransformNode *n)
|
|||
}
|
||||
const QMatrix4x4 m = n->matrix();
|
||||
d << "TransformNode(";
|
||||
d << hex << (const void *) n << dec;
|
||||
d << Qt::hex << (const void *) n << Qt::dec;
|
||||
if (m.isIdentity())
|
||||
d << "identity";
|
||||
else if (m.determinant() == 1 && m(0, 0) == 1 && m(1, 1) == 1 && m(2, 2) == 1)
|
||||
|
@ -1562,7 +1562,7 @@ QDebug operator<<(QDebug d, const QSGOpacityNode *n)
|
|||
return d;
|
||||
}
|
||||
d << "OpacityNode(";
|
||||
d << hex << (const void *) n << dec;
|
||||
d << Qt::hex << (const void *) n << Qt::dec;
|
||||
d << "opacity=" << n->opacity()
|
||||
<< "combined=" << n->combinedOpacity()
|
||||
<< (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
|
||||
|
@ -1581,7 +1581,7 @@ QDebug operator<<(QDebug d, const QSGRootNode *n)
|
|||
return d;
|
||||
}
|
||||
QDebugStateSaver saver(d);
|
||||
d << "RootNode" << hex << (const void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
|
||||
d << "RootNode" << Qt::hex << (const void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
|
||||
#ifdef QSG_RUNTIME_DESCRIPTION
|
||||
d << QSGNodePrivate::description(n);
|
||||
#endif
|
||||
|
@ -1614,8 +1614,8 @@ QDebug operator<<(QDebug d, const QSGNode *n)
|
|||
d << static_cast<const QSGOpacityNode *>(n);
|
||||
break;
|
||||
case QSGNode::RenderNodeType:
|
||||
d << "RenderNode(" << hex << (const void *) n << dec
|
||||
<< "flags=" << (int) n->flags() << dec
|
||||
d << "RenderNode(" << Qt::hex << (const void *) n << Qt::dec
|
||||
<< "flags=" << (int) n->flags() << Qt::dec
|
||||
<< (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
|
||||
#ifdef QSG_RUNTIME_DESCRIPTION
|
||||
d << QSGNodePrivate::description(n);
|
||||
|
@ -1623,8 +1623,8 @@ QDebug operator<<(QDebug d, const QSGNode *n)
|
|||
d << ')';
|
||||
break;
|
||||
default:
|
||||
d << "Node(" << hex << (const void *) n << dec
|
||||
<< "flags=" << (int) n->flags() << dec
|
||||
d << "Node(" << Qt::hex << (const void *) n << Qt::dec
|
||||
<< "flags=" << (int) n->flags() << Qt::dec
|
||||
<< (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
|
||||
#ifdef QSG_RUNTIME_DESCRIPTION
|
||||
d << QSGNodePrivate::description(n);
|
||||
|
|
|
@ -359,7 +359,7 @@ void QSGDefaultRenderContext::compileShader(QSGMaterialShader *shader, QSGMateri
|
|||
p->addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, fragmentCode ? fragmentCode : shader->fragmentShader());
|
||||
p->link();
|
||||
if (!p->isLinked())
|
||||
qWarning() << "shader compilation failed:" << endl << p->log();
|
||||
qWarning() << "shader compilation failed:" << Qt::endl << p->log();
|
||||
} else {
|
||||
shader->compile();
|
||||
}
|
||||
|
|
|
@ -159,9 +159,6 @@ private:
|
|||
QSize m_textureSize;
|
||||
QRect m_dirtyRect;
|
||||
QColor m_fillColor;
|
||||
#if QT_VERSION >= 0x060000
|
||||
#warning "Remove m_contentsScale and assume 1 everywhere"
|
||||
#endif
|
||||
qreal m_contentsScale;
|
||||
|
||||
bool m_dirtyContents : 1;
|
||||
|
|
|
@ -903,7 +903,7 @@ void QActionAnimation::updateState(State newState, State oldState)
|
|||
|
||||
void QActionAnimation::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "ActionAnimation(" << hex << (const void *) this << dec << ")";
|
||||
d << "ActionAnimation(" << Qt::hex << (const void *) this << Qt::dec << ")";
|
||||
|
||||
if (animAction) {
|
||||
int indentLevel = 1;
|
||||
|
@ -1996,7 +1996,7 @@ void QQuickBulkValueAnimator::topLevelAnimationLoopChanged()
|
|||
|
||||
void QQuickBulkValueAnimator::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "BulkValueAnimation(" << hex << (const void *) this << dec << ")" << "duration:" << duration();
|
||||
d << "BulkValueAnimation(" << Qt::hex << (const void *) this << Qt::dec << ")" << "duration:" << duration();
|
||||
|
||||
if (animValue) {
|
||||
int indentLevel = 1;
|
||||
|
|
|
@ -184,7 +184,7 @@ void QQuickAnimatorProxyJob::updateState(QAbstractAnimationJob::State newState,
|
|||
|
||||
void QQuickAnimatorProxyJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "QuickAnimatorProxyJob("<< hex << (const void *) this << dec
|
||||
d << "QuickAnimatorProxyJob("<< Qt::hex << (const void *) this << Qt::dec
|
||||
<< "state:" << state() << "duration:" << duration()
|
||||
<< "proxying: (" << job() << ')';
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ QQuickAnimatorJob::QQuickAnimatorJob()
|
|||
|
||||
void QQuickAnimatorJob::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "QuickAnimatorJob(" << hex << (const void *) this << dec
|
||||
d << "QuickAnimatorJob(" << Qt::hex << (const void *) this << Qt::dec
|
||||
<< ") state:" << state() << "duration:" << duration()
|
||||
<< "target:" << m_target << "value:" << m_value;
|
||||
}
|
||||
|
|
|
@ -92,9 +92,11 @@ private:
|
|||
Q_PRIVATE_SLOT(d_func(), void _q_finished())
|
||||
};
|
||||
|
||||
class QQuickImageProviderOptions;
|
||||
|
||||
class Q_QUICK_EXPORT QQuickImageProvider : public QQmlImageProviderBase
|
||||
{
|
||||
friend class QQuickImageProviderWithOptions; // ### Qt 6 Remove
|
||||
friend class QQuickImageProviderWithOptions;
|
||||
public:
|
||||
QQuickImageProvider(ImageType type, Flags flags = Flags());
|
||||
~QQuickImageProvider() override;
|
||||
|
@ -102,15 +104,9 @@ public:
|
|||
ImageType imageType() const override;
|
||||
Flags flags() const override;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options);
|
||||
virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options);
|
||||
virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options);
|
||||
#else
|
||||
virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize);
|
||||
virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize);
|
||||
virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize);
|
||||
#endif
|
||||
|
||||
private:
|
||||
QQuickImageProviderPrivate *d;
|
||||
|
@ -122,11 +118,7 @@ public:
|
|||
QQuickAsyncImageProvider();
|
||||
~QQuickAsyncImageProvider() override;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) = 0;
|
||||
#else
|
||||
virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) = 0;
|
||||
#endif
|
||||
|
||||
private:
|
||||
QQuickAsyncImageProviderPrivate *d;
|
||||
|
|
|
@ -189,8 +189,8 @@ private:
|
|||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPixmap::Options)
|
||||
|
||||
// This class will disappear with Qt6 and will just be the regular QQuickImageProvider
|
||||
// ### Qt 6: Remove this class and fold it with QQuickImageProvider
|
||||
// ### Qt 6: This should be made public in Qt 6. It's functionality can't be merged into
|
||||
// QQuickImageProvider without breaking source compatibility.
|
||||
class Q_QUICK_PRIVATE_EXPORT QQuickImageProviderWithOptions : public QQuickAsyncImageProvider
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -313,7 +313,7 @@ void QSmoothedAnimation::init()
|
|||
|
||||
void QSmoothedAnimation::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "SmoothedAnimationJob(" << hex << (const void *) this << dec << ")" << "duration:" << userDuration
|
||||
d << "SmoothedAnimationJob(" << Qt::hex << (const void *) this << Qt::dec << ")" << "duration:" << userDuration
|
||||
<< "velocity:" << velocity << "target:" << target.object() << "property:" << target.name()
|
||||
<< "to:" << to << "current velocity:" << trackVelocity;
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ void QSpringAnimation::updateState(QAbstractAnimationJob::State newState, QAbstr
|
|||
|
||||
void QSpringAnimation::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "SpringAnimationJob(" << hex << (const void *) this << dec << ")" << "velocity:" << maxVelocity
|
||||
d << "SpringAnimationJob(" << Qt::hex << (const void *) this << Qt::dec << ")" << "velocity:" << maxVelocity
|
||||
<< "spring:" << spring << "damping:" << damping << "epsilon:" << epsilon << "modulus:" << modulus
|
||||
<< "mass:" << mass << "target:" << target.object() << "property:" << target.name()
|
||||
<< "to:" << to << "current velocity:" << velocity;
|
||||
|
|
|
@ -723,7 +723,7 @@ void QQuickTimeLine::updateCurrentTime(int v)
|
|||
|
||||
void QQuickTimeLine::debugAnimation(QDebug d) const
|
||||
{
|
||||
d << "QuickTimeLine(" << hex << (const void *) this << dec << ")";
|
||||
d << "QuickTimeLine(" << Qt::hex << (const void *) this << Qt::dec << ")";
|
||||
}
|
||||
|
||||
bool operator<(const QPair<int, Update> &lhs,
|
||||
|
|
|
@ -1085,14 +1085,14 @@ void QQuickWidgetPrivate::setRootObject(QObject *obj)
|
|||
root = sgItem;
|
||||
sgItem->setParentItem(offscreenWindow->contentItem());
|
||||
} else if (qobject_cast<QWindow *>(obj)) {
|
||||
qWarning() << "QQuickWidget does not support using windows as a root item." << endl
|
||||
<< endl
|
||||
<< "If you wish to create your root window from QML, consider using QQmlApplicationEngine instead." << endl;
|
||||
qWarning() << "QQuickWidget does not support using windows as a root item." << Qt::endl
|
||||
<< Qt::endl
|
||||
<< "If you wish to create your root window from QML, consider using QQmlApplicationEngine instead." << Qt::endl;
|
||||
} else {
|
||||
qWarning() << "QQuickWidget only supports loading of root objects that derive from QQuickItem." << endl
|
||||
<< endl
|
||||
<< "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << endl
|
||||
<< "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << endl;
|
||||
qWarning() << "QQuickWidget only supports loading of root objects that derive from QQuickItem." << Qt::endl
|
||||
<< Qt::endl
|
||||
<< "Ensure your QML code is written for QtQuick 2, and uses a root that is or" << Qt::endl
|
||||
<< "inherits from QtQuick's Item (not a Timer, QtObject, etc)." << Qt::endl;
|
||||
delete obj;
|
||||
root = nullptr;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import org.qtproject.AutoTestQmlMixedPluginType 1.5
|
||||
import QtQuick 2.0
|
||||
import QtQml 2.0
|
||||
|
||||
Item {
|
||||
property bool test: false
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import org.qtproject.AutoTestQmlMixedPluginType 1.0
|
||||
import QtQuick 2.0
|
||||
import QtQml 2.0
|
||||
|
||||
Item {
|
||||
property bool test: false
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#include <QtCore/qjsondocument.h>
|
||||
#include <QtCore/qjsonarray.h>
|
||||
#include <QDebug>
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QCborMap>
|
||||
#include <QCborValue>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
// For _PC_CASE_SENSITIVE
|
||||
|
@ -131,8 +135,7 @@ QByteArray SecondStaticPlugin::metaData;
|
|||
template <typename PluginType>
|
||||
void registerStaticPlugin(const char *uri)
|
||||
{
|
||||
QStaticPlugin plugin;
|
||||
plugin.instance = []() {
|
||||
auto instanceFunctor = []() {
|
||||
static PluginType plugin;
|
||||
return static_cast<QObject*>(&plugin);
|
||||
};
|
||||
|
@ -143,12 +146,28 @@ void registerStaticPlugin(const char *uri)
|
|||
uris.append(uri);
|
||||
md.insert(QStringLiteral("uri"), uris);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
PluginType::metaData.append(QLatin1String("QTMETADATA !"));
|
||||
PluginType::metaData.append(char(0)); // current version
|
||||
PluginType::metaData.append(char(QT_VERSION_MAJOR));
|
||||
PluginType::metaData.append(char(QT_VERSION_MINOR));
|
||||
PluginType::metaData.append(char(qPluginArchRequirements()));
|
||||
PluginType::metaData.append(QCborValue(QCborMap::fromJsonObject(md)).toCbor());
|
||||
|
||||
auto rawMetaDataFunctor = []() -> QPluginMetaData {
|
||||
return {reinterpret_cast<const uchar *>(PluginType::metaData.constData()), size_t(PluginType::metaData.length())};
|
||||
};
|
||||
QStaticPlugin plugin(instanceFunctor, rawMetaDataFunctor);
|
||||
#else
|
||||
PluginType::metaData.append(QLatin1String("QTMETADATA "));
|
||||
PluginType::metaData.append(QJsonDocument(md).toBinaryData());
|
||||
|
||||
QStaticPlugin plugin;
|
||||
plugin.instance = instanceFunctor;
|
||||
plugin.rawMetaData = []() {
|
||||
return PluginType::metaData.constData();
|
||||
};
|
||||
#endif
|
||||
qRegisterStaticPluginFunction(plugin);
|
||||
};
|
||||
|
||||
|
|
|
@ -4,3 +4,5 @@ qemu
|
|||
osx-10.12
|
||||
[fontSizeMode]
|
||||
opensuse-42.1
|
||||
[contentSize]
|
||||
windows gcc
|
||||
|
|
|
@ -194,7 +194,7 @@ static bool fuzzyCompareColor(QRgb x, QRgb y, QByteArray *errorMessage)
|
|||
enum { fuzz = 4 };
|
||||
if (qAbs(qRed(x) - qRed(y)) >= fuzz || qAbs(qGreen(x) - qGreen(y)) >= fuzz || qAbs(qBlue(x) - qBlue(y)) >= fuzz) {
|
||||
QString s;
|
||||
QDebug(&s).nospace() << hex << "Color mismatch 0x" << x << " 0x" << y << dec << " (fuzz=" << fuzz << ").";
|
||||
QDebug(&s).nospace() << Qt::hex << "Color mismatch 0x" << x << " 0x" << y << Qt::dec << " (fuzz=" << fuzz << ").";
|
||||
*errorMessage = s.toLocal8Bit();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ bool QQuickVisualTestUtil::compareImages(const QImage &ia, const QImage &ib, QSt
|
|||
|| qAbs(qRed(a) - qRed(b)) > tolerance
|
||||
|| qAbs(qRed(a) - qRed(b)) > tolerance) {
|
||||
QDebug(errorMessage) << "Mismatch at:" << x << y << ':'
|
||||
<< hex << showbase << a << b;
|
||||
<< Qt::hex << Qt::showbase << a << b;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ static bool saveUnitAsCpp(const QString &inputFileName, const QString &outputFil
|
|||
{
|
||||
QTextStream stream(&hexifiedData);
|
||||
const uchar *end = begin + size;
|
||||
stream << hex;
|
||||
stream << Qt::hex;
|
||||
int col = 0;
|
||||
for (const uchar *data = begin; data < end; ++data, ++col) {
|
||||
if (data > begin)
|
||||
|
|
|
@ -195,7 +195,7 @@ void QmlPreviewApplication::processFinished()
|
|||
void QmlPreviewApplication::logError(const QString &error)
|
||||
{
|
||||
QTextStream err(stderr);
|
||||
err << "Error: " << error << endl;
|
||||
err << "Error: " << error << Qt::endl;
|
||||
}
|
||||
|
||||
void QmlPreviewApplication::logStatus(const QString &status)
|
||||
|
@ -203,7 +203,7 @@ void QmlPreviewApplication::logStatus(const QString &status)
|
|||
if (!m_verbose)
|
||||
return;
|
||||
QTextStream err(stderr);
|
||||
err << status << endl;
|
||||
err << status << Qt::endl;
|
||||
}
|
||||
|
||||
void QmlPreviewApplication::serveRequest(const QString &path)
|
||||
|
|
Loading…
Reference in New Issue