Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp Change-Id: I31375151eb239f348bec988d2d0506c2b4d9604c
This commit is contained in:
commit
51763b1b19
|
@ -97,6 +97,7 @@ static QString cacheFilePath(const QUrl &url)
|
|||
CompilationUnit::CompilationUnit()
|
||||
: data(0)
|
||||
, engine(0)
|
||||
, qmlEngine(0)
|
||||
, runtimeLookups(0)
|
||||
, runtimeRegularExpressions(0)
|
||||
, runtimeClasses(0)
|
||||
|
@ -211,8 +212,8 @@ void CompilationUnit::unlink()
|
|||
|
||||
if (isRegisteredWithEngine) {
|
||||
Q_ASSERT(data && quint32(propertyCaches.count()) > data->indexOfRootObject && propertyCaches.at(data->indexOfRootObject));
|
||||
if (engine)
|
||||
QQmlEnginePrivate::get(engine)->unregisterInternalCompositeType(this);
|
||||
if (qmlEngine)
|
||||
qmlEngine->unregisterInternalCompositeType(this);
|
||||
QQmlMetaType::unregisterInternalCompositeType(this);
|
||||
isRegisteredWithEngine = false;
|
||||
}
|
||||
|
@ -229,6 +230,7 @@ void CompilationUnit::unlink()
|
|||
resolvedTypes.clear();
|
||||
|
||||
engine = 0;
|
||||
qmlEngine = 0;
|
||||
free(runtimeStrings);
|
||||
runtimeStrings = 0;
|
||||
delete [] runtimeLookups;
|
||||
|
@ -258,9 +260,6 @@ void CompilationUnit::markObjects(QV4::MarkStack *markStack)
|
|||
|
||||
void CompilationUnit::destroy()
|
||||
{
|
||||
QQmlEngine *qmlEngine = 0;
|
||||
if (engine && engine->v8Engine)
|
||||
qmlEngine = engine->v8Engine->engine();
|
||||
if (qmlEngine)
|
||||
QQmlEnginePrivate::deleteInEngineThread(qmlEngine, this);
|
||||
else
|
||||
|
@ -283,12 +282,14 @@ IdentifierHash<int> CompilationUnit::namedObjectsPerComponent(int componentObjec
|
|||
return *it;
|
||||
}
|
||||
|
||||
void CompilationUnit::finalize(QQmlEnginePrivate *engine)
|
||||
void CompilationUnit::finalizeCompositeType(QQmlEnginePrivate *qmlEngine)
|
||||
{
|
||||
this->qmlEngine = qmlEngine;
|
||||
|
||||
// Add to type registry of composites
|
||||
if (propertyCaches.needsVMEMetaObject(data->indexOfRootObject)) {
|
||||
QQmlMetaType::registerInternalCompositeType(this);
|
||||
engine->registerInternalCompositeType(this);
|
||||
qmlEngine->registerInternalCompositeType(this);
|
||||
} else {
|
||||
const QV4::CompiledData::Object *obj = objectAt(data->indexOfRootObject);
|
||||
auto *typeRef = resolvedTypes.value(obj->inheritedTypeNameIndex);
|
||||
|
|
|
@ -868,6 +868,7 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public CompilationUnitBase, public
|
|||
|
||||
#ifndef V4_BOOTSTRAP
|
||||
ExecutionEngine *engine;
|
||||
QQmlEnginePrivate *qmlEngine; // only used in QML environment for composite types, not in plain QJSEngine case.
|
||||
|
||||
QString fileName() const { return data->stringAt(data->sourceFileIndex); }
|
||||
QUrl url() const { if (m_url.isNull) m_url = QUrl(fileName()); return m_url; }
|
||||
|
@ -897,7 +898,7 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public CompilationUnitBase, public
|
|||
// pointers either to data->constants() or little-endian memory copy.
|
||||
const Value* constants;
|
||||
|
||||
void finalize(QQmlEnginePrivate *engine);
|
||||
void finalizeCompositeType(QQmlEnginePrivate *qmlEngine);
|
||||
|
||||
int totalBindingsCount; // Number of bindings used in this type
|
||||
int totalParserStatusCount; // Number of instantiated types that are QQmlParserStatus subclasses
|
||||
|
|
|
@ -360,6 +360,7 @@ Function::Function(Module *module, Function *outer, const QString &name)
|
|||
, insideWithOrCatch(0)
|
||||
, hasDirectEval(false)
|
||||
, usesArgumentsObject(false)
|
||||
, usesThis(false)
|
||||
, isStrict(false)
|
||||
, isNamedExpression(false)
|
||||
, hasTry(false)
|
||||
|
|
|
@ -523,7 +523,7 @@ QQmlContextData::QQmlContextData()
|
|||
QQmlContextData::QQmlContextData(QQmlContext *ctxt)
|
||||
: parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false),
|
||||
isPragmaLibraryContext(false), unresolvedNames(false), hasEmittedDestruction(false), isRootObjectInCreation(false),
|
||||
publicContext(ctxt), activeVMEData(0), componentObjectIndex(-1),
|
||||
publicContext(ctxt), incubator(0), componentObjectIndex(-1),
|
||||
contextObject(0), childContexts(0), nextChild(0), prevChild(0),
|
||||
expressions(0), contextObjects(0), contextGuards(0), idValues(0), idValueCount(0), linkedContext(0),
|
||||
componentAttached(0)
|
||||
|
|
|
@ -78,6 +78,7 @@ class QQmlExpression;
|
|||
class QQmlExpressionPrivate;
|
||||
class QQmlJavaScriptExpression;
|
||||
class QQmlContextData;
|
||||
class QQmlIncubatorPrivate;
|
||||
|
||||
class QQmlContextPrivate : public QObjectPrivate
|
||||
{
|
||||
|
@ -145,8 +146,8 @@ public:
|
|||
quint32 dummy:25;
|
||||
QQmlContext *publicContext;
|
||||
|
||||
// VME data that is constructing this context if any
|
||||
void *activeVMEData;
|
||||
// The incubator that is constructing this context if any
|
||||
QQmlIncubatorPrivate *incubator;
|
||||
|
||||
// Compilation unit for contexts that belong to a compiled type.
|
||||
QQmlRefPointer<QV4::CompiledData::CompilationUnit> typeCompilationUnit;
|
||||
|
|
|
@ -204,7 +204,7 @@ public:
|
|||
template<typename T>
|
||||
inline void deleteInEngineThread(T *);
|
||||
template<typename T>
|
||||
inline static void deleteInEngineThread(QQmlEngine *, T *);
|
||||
inline static void deleteInEngineThread(QQmlEnginePrivate *, T *);
|
||||
QString offlineStorageDatabaseDirectory() const;
|
||||
|
||||
// These methods may be called from the loader thread
|
||||
|
@ -359,10 +359,10 @@ Delete \a value in the \a engine thread. If the calling thread is the engine
|
|||
thread, \a value will be deleted immediately.
|
||||
*/
|
||||
template<typename T>
|
||||
void QQmlEnginePrivate::deleteInEngineThread(QQmlEngine *engine, T *value)
|
||||
void QQmlEnginePrivate::deleteInEngineThread(QQmlEnginePrivate *engine, T *value)
|
||||
{
|
||||
Q_ASSERT(engine);
|
||||
QQmlEnginePrivate::get(engine)->deleteInEngineThread<T>(value);
|
||||
engine->deleteInEngineThread<T>(value);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
#include "qqmlmemoryprofiler_p.h"
|
||||
#include "qqmlobjectcreator_p.h"
|
||||
|
||||
// XXX TODO
|
||||
// - check that the Component.onCompleted behavior is the same as 4.8 in the synchronous and
|
||||
// async if nested cases
|
||||
void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext)
|
||||
{
|
||||
QExplicitlySharedDataPointer<QQmlIncubatorPrivate> p(i.d);
|
||||
|
@ -64,8 +61,8 @@ void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext)
|
|||
QExplicitlySharedDataPointer<QQmlIncubatorPrivate> parentIncubator;
|
||||
QQmlContextData *cctxt = forContext;
|
||||
while (cctxt) {
|
||||
if (cctxt->activeVMEData) {
|
||||
parentIncubator = (QQmlIncubatorPrivate *)cctxt->activeVMEData;
|
||||
if (cctxt->incubator) {
|
||||
parentIncubator = cctxt->incubator;
|
||||
break;
|
||||
}
|
||||
cctxt = cctxt->parent;
|
||||
|
@ -152,7 +149,7 @@ void QQmlIncubatorPrivate::clear()
|
|||
}
|
||||
enginePriv = 0;
|
||||
if (!rootContext.isNull()) {
|
||||
rootContext->activeVMEData = 0;
|
||||
rootContext->incubator = 0;
|
||||
rootContext = 0;
|
||||
}
|
||||
|
||||
|
@ -388,7 +385,7 @@ void QQmlIncubatorPrivate::cancel(QObject *object, QQmlContext *context)
|
|||
return;
|
||||
|
||||
QQmlContextData *data = QQmlContextData::get(context);
|
||||
QQmlIncubatorPrivate *p = (QQmlIncubatorPrivate *)data->activeVMEData;
|
||||
QQmlIncubatorPrivate *p = data->incubator;
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
|
|
|
@ -70,14 +70,15 @@ struct ActiveOCRestorer
|
|||
};
|
||||
}
|
||||
|
||||
QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::CompiledData::CompilationUnit *compilationUnit, QQmlContextData *creationContext, void *activeVMEDataForRootContext)
|
||||
QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::CompiledData::CompilationUnit *compilationUnit, QQmlContextData *creationContext,
|
||||
QQmlIncubatorPrivate *incubator)
|
||||
: phase(Startup)
|
||||
, compilationUnit(compilationUnit)
|
||||
, resolvedTypes(compilationUnit->resolvedTypes)
|
||||
, propertyCaches(&compilationUnit->propertyCaches)
|
||||
, sharedState(new QQmlObjectCreatorSharedState)
|
||||
, topLevelCreator(true)
|
||||
, activeVMEDataForRootContext(activeVMEDataForRootContext)
|
||||
, incubator(incubator)
|
||||
{
|
||||
init(parentContext);
|
||||
|
||||
|
@ -104,7 +105,7 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::Compil
|
|||
, propertyCaches(&compilationUnit->propertyCaches)
|
||||
, sharedState(inheritedSharedState)
|
||||
, topLevelCreator(false)
|
||||
, activeVMEDataForRootContext(0)
|
||||
, incubator(0)
|
||||
{
|
||||
init(parentContext);
|
||||
}
|
||||
|
@ -176,7 +177,7 @@ QObject *QQmlObjectCreator::create(int subComponentIndex, QObject *parent, QQmlI
|
|||
|
||||
if (!sharedState->rootContext) {
|
||||
sharedState->rootContext = context;
|
||||
sharedState->rootContext->activeVMEData = activeVMEDataForRootContext;
|
||||
sharedState->rootContext->incubator = incubator;
|
||||
sharedState->rootContext->isRootObjectInCreation = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ QT_BEGIN_NAMESPACE
|
|||
class QQmlAbstractBinding;
|
||||
struct QQmlTypeCompiler;
|
||||
class QQmlInstantiationInterrupt;
|
||||
class QQmlIncubatorPrivate;
|
||||
|
||||
struct QQmlObjectCreatorSharedState : public QSharedData
|
||||
{
|
||||
|
@ -84,7 +85,7 @@ class QQmlObjectCreator
|
|||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(QQmlObjectCreator)
|
||||
public:
|
||||
QQmlObjectCreator(QQmlContextData *parentContext, QV4::CompiledData::CompilationUnit *compilationUnit, QQmlContextData *creationContext, void *activeVMEDataForRootContext = 0);
|
||||
QQmlObjectCreator(QQmlContextData *parentContext, QV4::CompiledData::CompilationUnit *compilationUnit, QQmlContextData *creationContext, QQmlIncubatorPrivate *incubator = 0);
|
||||
~QQmlObjectCreator();
|
||||
|
||||
QObject *create(int subComponentIndex = -1, QObject *parent = 0, QQmlInstantiationInterrupt *interrupt = 0);
|
||||
|
@ -143,7 +144,7 @@ private:
|
|||
const QQmlPropertyCacheVector *propertyCaches;
|
||||
QExplicitlySharedDataPointer<QQmlObjectCreatorSharedState> sharedState;
|
||||
bool topLevelCreator;
|
||||
void *activeVMEDataForRootContext;
|
||||
QQmlIncubatorPrivate *incubator;
|
||||
|
||||
QObject *_qobject;
|
||||
QObject *_scopeObject;
|
||||
|
|
|
@ -798,7 +798,7 @@ QQmlPropertyPrivate::binding(QObject *object, QQmlPropertyIndex index)
|
|||
const int coreIndex = index.coreIndex();
|
||||
const int valueTypeIndex = index.valueTypeIndex();
|
||||
|
||||
if (!data->hasBindingBit(coreIndex))
|
||||
if (coreIndex < 0 || !data->hasBindingBit(coreIndex))
|
||||
return 0;
|
||||
|
||||
QQmlAbstractBinding *binding = data->bindings;
|
||||
|
|
|
@ -2295,7 +2295,7 @@ void QQmlTypeData::done()
|
|||
}
|
||||
}
|
||||
|
||||
m_compiledData->finalize(enginePrivate);
|
||||
m_compiledData->finalizeCompositeType(enginePrivate);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -643,8 +643,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void *
|
|||
if (t == QV4::CompiledData::Property::Var) {
|
||||
// the context can be null if accessing var properties from cpp after re-parenting an item.
|
||||
QQmlEnginePrivate *ep = (ctxt == 0 || ctxt->engine == 0) ? 0 : QQmlEnginePrivate::get(ctxt->engine);
|
||||
QV8Engine *v8e = (ep == 0) ? 0 : ep->v8engine();
|
||||
if (v8e) {
|
||||
if (ep) {
|
||||
if (c == QMetaObject::ReadProperty) {
|
||||
*reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id);
|
||||
} else if (c == QMetaObject::WriteProperty) {
|
||||
|
|
|
@ -277,6 +277,11 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
if (testPath.isEmpty())
|
||||
testPath = QLatin1String(":/");
|
||||
#endif
|
||||
|
||||
// Determine where to look for the test data.
|
||||
if (testPath.isEmpty() && sourceDir) {
|
||||
const QString s = QString::fromLocal8Bit(sourceDir);
|
||||
|
|
|
@ -553,6 +553,7 @@ void QSGRenderThread::sync(bool inExpose)
|
|||
if (d->renderer)
|
||||
d->renderer->clearChangedFlag();
|
||||
d->syncSceneGraph();
|
||||
sgrc->endSync();
|
||||
if (!hadRenderer && d->renderer) {
|
||||
qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- renderer was created";
|
||||
syncResultedInChanges = true;
|
||||
|
|
|
@ -116,7 +116,7 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel)
|
|||
Texture *t = 0;
|
||||
if (image.width() < m_atlas_size_limit && image.height() < m_atlas_size_limit) {
|
||||
if (!m_atlas)
|
||||
m_atlas = new Atlas(m_atlas_size, this);
|
||||
m_atlas = new Atlas(m_atlas_size);
|
||||
// t may be null for atlas allocation failure
|
||||
t = m_atlas->create(image);
|
||||
if (t && !hasAlphaChannel && t->hasAlphaChannel())
|
||||
|
@ -125,9 +125,8 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel)
|
|||
return t;
|
||||
}
|
||||
|
||||
Atlas::Atlas(const QSize &size, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_allocator(size)
|
||||
Atlas::Atlas(const QSize &size)
|
||||
: m_allocator(size)
|
||||
, m_texture_id(0)
|
||||
, m_size(size)
|
||||
, m_atlas_transient_image_threshold(0)
|
||||
|
|
|
@ -88,7 +88,7 @@ private:
|
|||
class Atlas : public QObject
|
||||
{
|
||||
public:
|
||||
Atlas(const QSize &size, QObject *parent);
|
||||
Atlas(const QSize &size);
|
||||
~Atlas();
|
||||
|
||||
void invalidate();
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# QTQAINFRA-1334
|
||||
windows gcc
|
|
@ -1,2 +0,0 @@
|
|||
# QTQAINFRA-1334
|
||||
windows gcc
|
|
@ -1,2 +0,0 @@
|
|||
# QTQAINFRA-1334
|
||||
windows gcc
|
|
@ -1,2 +0,0 @@
|
|||
# QTQAINFRA-1334
|
||||
windows gcc
|
|
@ -1,2 +0,0 @@
|
|||
# QTQAINFRA-1334
|
||||
windows gcc
|
|
@ -126,7 +126,7 @@ QQmlDebugProcess::QQmlDebugProcess(const QString &executable, QObject *parent)
|
|||
{
|
||||
m_process.setProcessChannelMode(QProcess::MergedChannels);
|
||||
m_timer.setSingleShot(true);
|
||||
m_timer.setInterval(5000);
|
||||
m_timer.setInterval(15000);
|
||||
connect(&m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(processAppOutput()));
|
||||
connect(&m_process, SIGNAL(errorOccurred(QProcess::ProcessError)),
|
||||
this, SLOT(processError(QProcess::ProcessError)));
|
||||
|
@ -208,7 +208,10 @@ bool QQmlDebugProcess::waitForSessionStart()
|
|||
if (m_process.state() != QProcess::Running) {
|
||||
qWarning() << "Could not start up " << m_executable;
|
||||
return false;
|
||||
} else if (m_started) {
|
||||
return true;
|
||||
}
|
||||
|
||||
m_eventLoop.exec();
|
||||
|
||||
return m_started;
|
||||
|
|
|
@ -999,7 +999,7 @@ int main(int argc, char *argv[])
|
|||
// Check which kind of application should be instantiated.
|
||||
bool useQApplication = false;
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
QString arg = QLatin1String(argv[1]);
|
||||
QString arg = QLatin1String(argv[i]);
|
||||
if (arg == QLatin1String("--qapp") || arg == QLatin1String("-qapp"))
|
||||
useQApplication = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue