aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/animations/qabstractanimationjob.cpp1
-rw-r--r--src/qml/compiler/compiler.pri3
-rw-r--r--src/qml/compiler/qv4jsir.cpp4
-rw-r--r--src/qml/compiler/qv4jsir_p.h1
-rw-r--r--src/qml/compiler/qv4ssa.cpp336
-rw-r--r--src/qml/debugger/qqmlabstractprofileradapter.cpp2
-rw-r--r--src/qml/debugger/qqmldebugconnector.cpp2
-rw-r--r--src/qml/debugger/qqmldebugservice.cpp1
-rw-r--r--src/qml/debugger/qqmldebugserviceinterfaces.cpp2
-rw-r--r--src/qml/debugger/qqmlprofiler.cpp2
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc65
-rw-r--r--src/qml/jsruntime/qv4global_p.h10
-rw-r--r--src/qml/jsruntime/qv4include.cpp2
-rw-r--r--src/qml/jsruntime/qv4profiling.cpp2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp1
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h2
-rw-r--r--src/qml/memory/qv4mm.cpp34
-rw-r--r--src/qml/qml/qqmlapplicationengine.cpp11
-rw-r--r--src/qml/qml/qqmlcomponent.cpp2
-rw-r--r--src/qml/qml/qqmlcontext.cpp2
-rw-r--r--src/qml/qml/qqmldelayedcallqueue.cpp2
-rw-r--r--src/qml/qml/qqmlengine.cpp4
-rw-r--r--src/qml/qml/qqmlextensionplugin.cpp2
-rw-r--r--src/qml/qml/qqmlfileselector.cpp2
-rw-r--r--src/qml/qml/qqmlglobal.cpp2
-rw-r--r--src/qml/qml/qqmllocale.cpp2
-rw-r--r--src/qml/qml/qqmlloggingcategory.cpp2
-rw-r--r--src/qml/qml/qqmlplatform.cpp2
-rw-r--r--src/qml/qml/qqmltypenotavailable.cpp2
-rw-r--r--src/qml/qml/qqmlvaluetype.cpp2
-rw-r--r--src/qml/qtqmlglobal.h6
-rw-r--r--src/qml/qtqmlglobal_p.h8
-rw-r--r--src/qml/types/qqmlbind.cpp2
-rw-r--r--src/qml/types/qqmlconnections.cpp2
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp2
-rw-r--r--src/qml/types/qqmllistmodel.cpp2
-rw-r--r--src/qml/types/qqmllistmodelworkeragent.cpp1
-rw-r--r--src/qml/types/qqmlmodelindexvaluetype.cpp2
-rw-r--r--src/qml/types/qqmlobjectmodel.cpp2
-rw-r--r--src/qml/types/qqmltimer.cpp2
-rw-r--r--src/qml/types/qquickpackage.cpp2
-rw-r--r--src/qml/types/qquickworkerscript.cpp1
42 files changed, 331 insertions, 208 deletions
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp
index f7f6939e4b..1ac4925ed3 100644
--- a/src/qml/animations/qabstractanimationjob.cpp
+++ b/src/qml/animations/qabstractanimationjob.cpp
@@ -672,3 +672,4 @@ QDebug operator<<(QDebug d, const QAbstractAnimationJob *job)
QT_END_NAMESPACE
//#include "moc_qabstractanimation2_p.cpp"
+#include "moc_qabstractanimationjob_p.cpp"
diff --git a/src/qml/compiler/compiler.pri b/src/qml/compiler/compiler.pri
index 871f28f2d0..31ee917b39 100644
--- a/src/qml/compiler/compiler.pri
+++ b/src/qml/compiler/compiler.pri
@@ -41,7 +41,7 @@ SOURCES += \
unix: SOURCES += $$PWD/qv4compilationunitmapper_unix.cpp
else: SOURCES += $$PWD/qv4compilationunitmapper_win.cpp
-qtConfig(private_tests): LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD
+qtConfig(private_tests):unix: QMAKE_USE_PRIVATE += libdl
}
qmldevtools_build|qtConfig(qml-interpreter) {
@@ -52,4 +52,3 @@ qmldevtools_build|qtConfig(qml-interpreter) {
$$PWD/qv4instr_moth.cpp \
$$PWD/qv4isel_moth.cpp
}
-
diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp
index cc2f9b7cf2..5a58380005 100644
--- a/src/qml/compiler/qv4jsir.cpp
+++ b/src/qml/compiler/qv4jsir.cpp
@@ -444,10 +444,6 @@ void Function::setScheduledBlocks(const QVector<BasicBlock *> &scheduled)
Q_ASSERT(!_allBasicBlocks);
_allBasicBlocks = new QVector<BasicBlock *>(basicBlocks());
_basicBlocks = scheduled;
-}
-
-void Function::renumberBasicBlocks()
-{
for (int i = 0, ei = basicBlockCount(); i != ei; ++i)
basicBlock(i)->changeIndex(i);
}
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 35cf0fc174..b534eaa54f 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -1348,7 +1348,6 @@ struct Function {
{ return hasDirectEval || !nestedFunctions.isEmpty() || module->debugMode; }
void setScheduledBlocks(const QVector<BasicBlock *> &scheduled);
- void renumberBasicBlocks();
int getNewStatementId() { return _statementCount++; }
int statementCount() const { return _statementCount; }
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 62e2833089..731c6ad38f 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -3025,14 +3025,19 @@ void splitCriticalEdges(IR::Function *f, DominatorTree &df, StatementWorklist &w
// add newBB to the correct loop group
if (toBB->isGroupStart()) {
- BasicBlock *container;
- for (container = fromBB->containingGroup(); container; container = container->containingGroup())
- if (container == toBB)
- break;
- if (container == toBB) // if we were already inside the toBB loop
+ if (fromBB == toBB) {
+ // special case: the loop header points back to itself (so it's a small loop).
newBB->setContainingGroup(toBB);
- else
- newBB->setContainingGroup(toBB->containingGroup());
+ } else {
+ BasicBlock *container;
+ for (container = fromBB->containingGroup(); container; container = container->containingGroup())
+ if (container == toBB)
+ break;
+ if (container == toBB) // if we were already inside the toBB loop
+ newBB->setContainingGroup(toBB);
+ else
+ newBB->setContainingGroup(toBB->containingGroup());
+ }
} else {
newBB->setContainingGroup(toBB->containingGroup());
}
@@ -3063,7 +3068,7 @@ void splitCriticalEdges(IR::Function *f, DominatorTree &df, StatementWorklist &w
bool toNeedsNewIdom = true;
for (BasicBlock *bb : toBB->in) {
- if (bb != newBB && !df.dominates(toBB, bb)) {
+ if (bb != newBB && bb != toBB && !df.dominates(toBB, bb)) {
toNeedsNewIdom = false;
break;
}
@@ -3174,7 +3179,7 @@ public:
backedges.clear();
for (BasicBlock *in : bb->in)
- if (dt.dominates(bb, in))
+ if (bb == in || dt.dominates(bb, in))
backedges.push_back(in);
if (!backedges.empty()) {
@@ -3191,6 +3196,7 @@ public:
if (!DebugLoopDetection)
return;
+ qDebug() << "Found" << loopInfos.size() << "loops";
for (const LoopInfo *info : loopInfos) {
qDebug() << "Loop header:" << info->loopHeader->index()
<< "for loop" << quint64(info);
@@ -3224,6 +3230,9 @@ private:
void subLoop(BasicBlock *loopHead, const std::vector<BasicBlock *> &backedges)
{
loopHead->markAsGroupStart();
+ LoopInfo *info = new LoopInfo;
+ info->loopHeader = loopHead;
+ loopInfos.append(info);
std::vector<BasicBlock *> worklist;
worklist.reserve(backedges.size() + 8);
@@ -3293,10 +3302,8 @@ private:
return info;
}
- LoopInfo *info = new LoopInfo;
- info->loopHeader = loopHeader;
- loopInfos.append(info);
- return info;
+ Q_UNREACHABLE();
+ return nullptr;
}
};
@@ -3326,6 +3333,8 @@ private:
// the same reason.
class BlockScheduler
{
+ enum { DebugBlockScheduler = 0 };
+
IR::Function *function;
const DominatorTree &dominatorTree;
@@ -3441,6 +3450,14 @@ class BlockScheduler
Q_UNREACHABLE();
}
+ void dumpLoopStartsEnds() const
+ {
+ qDebug() << "Found" << loopsStartEnd.size() << "loops:";
+ for (auto key : loopsStartEnd.keys())
+ qDebug("Loop starting at L%d ends at L%d.", key->index(),
+ loopsStartEnd.value(key)->index());
+ }
+
public:
BlockScheduler(IR::Function *function, const DominatorTree &dominatorTree)
: function(function)
@@ -3452,11 +3469,15 @@ public:
QHash<BasicBlock *, BasicBlock *> go()
{
showMeTheCode(function, "Before block scheduling");
+ if (DebugBlockScheduler)
+ dominatorTree.dumpImmediateDominators();
+
schedule(function->basicBlock(0));
Q_ASSERT(function->liveBasicBlocksCount() == sequence.size());
function->setScheduledBlocks(sequence);
- function->renumberBasicBlocks();
+ if (DebugBlockScheduler)
+ dumpLoopStartsEnds();
return loopsStartEnd;
}
};
@@ -4592,7 +4613,6 @@ void removeUnreachleBlocks(IR::Function *function)
if (!bb->isRemoved())
newSchedule.append(bb);
function->setScheduledBlocks(newSchedule);
- function->renumberBasicBlocks();
}
class ConvertArgLocals
@@ -4766,6 +4786,137 @@ private:
IR::Stmt *clonedStmt;
};
+static void verifyCFG(IR::Function *function)
+{
+ if (!DoVerification)
+ return;
+
+ for (BasicBlock *bb : function->basicBlocks()) {
+ if (bb->isRemoved()) {
+ Q_ASSERT(bb->in.isEmpty());
+ Q_ASSERT(bb->out.isEmpty());
+ continue;
+ }
+
+ Q_ASSERT(function->basicBlock(bb->index()) == bb);
+
+ // Check the terminators:
+ Stmt *terminator = bb->terminator();
+ if (terminator == nullptr) {
+ Stmt *last = bb->statements().last();
+ Call *call = last->asExp()->expr->asCall();
+ Name *baseName = call->base->asName();
+ Q_ASSERT(baseName->builtin == Name::builtin_rethrow);
+ Q_UNUSED(baseName);
+ } else if (Jump *jump = terminator->asJump()) {
+ Q_UNUSED(jump);
+ Q_ASSERT(jump->target);
+ Q_ASSERT(!jump->target->isRemoved());
+ Q_ASSERT(bb->out.size() == 1);
+ Q_ASSERT(bb->out.first() == jump->target);
+ } else if (CJump *cjump = terminator->asCJump()) {
+ Q_UNUSED(cjump);
+ Q_ASSERT(bb->out.size() == 2);
+ Q_ASSERT(cjump->iftrue);
+ Q_ASSERT(!cjump->iftrue->isRemoved());
+ Q_ASSERT(cjump->iftrue == bb->out[0]);
+ Q_ASSERT(cjump->iffalse);
+ Q_ASSERT(!cjump->iffalse->isRemoved());
+ Q_ASSERT(cjump->iffalse == bb->out[1]);
+ } else if (terminator->asRet()) {
+ Q_ASSERT(bb->out.size() == 0);
+ } else {
+ Q_UNREACHABLE();
+ }
+
+ // Check the outgoing edges:
+ for (BasicBlock *out : bb->out) {
+ Q_UNUSED(out);
+ Q_ASSERT(!out->isRemoved());
+ Q_ASSERT(out->in.contains(bb));
+ }
+
+ // Check the incoming edges:
+ for (BasicBlock *in : bb->in) {
+ Q_UNUSED(in);
+ Q_ASSERT(!in->isRemoved());
+ Q_ASSERT(in->out.contains(bb));
+ }
+ }
+}
+
+static void verifyImmediateDominators(const DominatorTree &dt, IR::Function *function)
+{
+ if (!DoVerification)
+ return;
+
+ cfg2dot(function);
+ dt.dumpImmediateDominators();
+ DominatorTree referenceTree(function);
+
+ for (BasicBlock *bb : function->basicBlocks()) {
+ if (bb->isRemoved())
+ continue;
+
+ BasicBlock *idom = dt.immediateDominator(bb);
+ BasicBlock *referenceIdom = referenceTree.immediateDominator(bb);
+ Q_UNUSED(idom);
+ Q_UNUSED(referenceIdom);
+ Q_ASSERT(idom == referenceIdom);
+ }
+}
+
+static void verifyNoPointerSharing(IR::Function *function)
+{
+ if (!DoVerification)
+ return;
+
+ class {
+ public:
+ void operator()(IR::Function *f)
+ {
+ for (BasicBlock *bb : f->basicBlocks()) {
+ if (bb->isRemoved())
+ continue;
+
+ for (Stmt *s : bb->statements()) {
+ visit(s);
+ }
+ }
+ }
+
+ private:
+ void visit(Stmt *s)
+ {
+ check(s);
+ STMT_VISIT_ALL_KINDS(s);
+ }
+
+ void visit(Expr *e)
+ {
+ check(e);
+ EXPR_VISIT_ALL_KINDS(e);
+ }
+
+ private:
+ void check(Stmt *s)
+ {
+ Q_ASSERT(!stmts.contains(s));
+ stmts.insert(s);
+ }
+
+ void check(Expr *e)
+ {
+ Q_ASSERT(!exprs.contains(e));
+ exprs.insert(e);
+ }
+
+ QSet<Stmt *> stmts;
+ QSet<Expr *> exprs;
+ } V;
+ V(function);
+}
+
// Loop-peeling is done by unfolding the loop once. The "original" loop basic blocks stay where they
// are, and a copy of the loop is placed after it. Special care is taken while copying the loop body:
// by having the copies of the basic-blocks point to the same nodes as the "original" basic blocks,
@@ -4826,12 +4977,14 @@ private:
void peelLoop(LoopDetection::LoopInfo *loop)
{
+ IR::Function *f = loop->loopHeader->function;
CloneBasicBlock clone;
LoopDetection::LoopInfo unpeeled(*loop);
unpeeled.loopHeader = clone(unpeeled.loopHeader);
unpeeled.loopHeader->setContainingGroup(loop->loopHeader->containingGroup());
unpeeled.loopHeader->markAsGroupStart(true);
+ f->addBasicBlock(unpeeled.loopHeader);
for (int i = 0, ei = unpeeled.loopBody.size(); i != ei; ++i) {
BasicBlock *&bodyBlock = unpeeled.loopBody[i];
bodyBlock = clone(bodyBlock);
@@ -4845,8 +4998,8 @@ private:
BasicBlock::IncomingEdges inCopy = loop->loopHeader->in;
for (BasicBlock *in : inCopy) {
- if (unpeeled.loopHeader != in // this can happen for really tight loops (where there are no body blocks). This is a back-edge in that case.
- && !unpeeled.loopBody.contains(in) // if the edge is not coming from within the copied set, leave it alone
+ if (loop->loopHeader != in // this can happen for really tight loops (where there are no body blocks). This is a back-edge in that case.
+ && unpeeled.loopHeader != in && !unpeeled.loopBody.contains(in) // if the edge is not coming from within the copied set, leave it alone
&& !dt.dominates(loop->loopHeader, in)) // an edge coming from within the loop (so a back-edge): this is handled when rewiring all outgoing edges
continue;
@@ -4876,9 +5029,7 @@ private:
loopExits.reserve(8);
loopExits.append(unpeeled.loopHeader);
- IR::Function *f = unpeeled.loopHeader->function;
rewire(unpeeled.loopHeader, loop->loopBody, unpeeled.loopBody, loopExits);
- f->addBasicBlock(unpeeled.loopHeader);
for (int i = 0, ei = unpeeled.loopBody.size(); i != ei; ++i) {
BasicBlock *bodyBlock = unpeeled.loopBody.at(i);
rewire(bodyBlock, loop->loopBody, unpeeled.loopBody, loopExits);
@@ -4891,6 +5042,9 @@ private:
for (BasicBlock *bb : qAsConst(loop->loopBody))
bb->setContainingGroup(loop->loopHeader->containingGroup());
+ // Set the immediate dominator of the new loop header to the old one. The real immediate
+ // dominator will be calculated later.
+ dt.setImmediateDominator(unpeeled.loopHeader, loop->loopHeader);
// calculate the idoms in a separate loop, because addBasicBlock in the previous loop will
// set the block index, which in turn is used by the dominator tree.
for (int i = 0, ei = unpeeled.loopBody.size(); i != ei; ++i) {
@@ -4909,141 +5063,13 @@ private:
for (BasicBlock *bb : qAsConst(loopExits))
dt.collectSiblings(bb, siblings);
+ siblings.insert(unpeeled.loopHeader);
dt.recalculateIDoms(siblings, loop->loopHeader);
+ dt.dumpImmediateDominators();
+ verifyImmediateDominators(dt, f);
}
};
-static void verifyCFG(IR::Function *function)
-{
- if (!DoVerification)
- return;
-
- for (BasicBlock *bb : function->basicBlocks()) {
- if (bb->isRemoved()) {
- Q_ASSERT(bb->in.isEmpty());
- Q_ASSERT(bb->out.isEmpty());
- continue;
- }
-
- Q_ASSERT(function->basicBlock(bb->index()) == bb);
-
- // Check the terminators:
- Stmt *terminator = bb->terminator();
- if (terminator == nullptr) {
- Stmt *last = bb->statements().last();
- Call *call = last->asExp()->expr->asCall();
- Name *baseName = call->base->asName();
- Q_ASSERT(baseName->builtin == Name::builtin_rethrow);
- Q_UNUSED(baseName);
- } else if (Jump *jump = terminator->asJump()) {
- Q_UNUSED(jump);
- Q_ASSERT(jump->target);
- Q_ASSERT(!jump->target->isRemoved());
- Q_ASSERT(bb->out.size() == 1);
- Q_ASSERT(bb->out.first() == jump->target);
- } else if (CJump *cjump = terminator->asCJump()) {
- Q_UNUSED(cjump);
- Q_ASSERT(bb->out.size() == 2);
- Q_ASSERT(cjump->iftrue);
- Q_ASSERT(!cjump->iftrue->isRemoved());
- Q_ASSERT(cjump->iftrue == bb->out[0]);
- Q_ASSERT(cjump->iffalse);
- Q_ASSERT(!cjump->iffalse->isRemoved());
- Q_ASSERT(cjump->iffalse == bb->out[1]);
- } else if (terminator->asRet()) {
- Q_ASSERT(bb->out.size() == 0);
- } else {
- Q_UNREACHABLE();
- }
-
- // Check the outgoing edges:
- for (BasicBlock *out : bb->out) {
- Q_UNUSED(out);
- Q_ASSERT(!out->isRemoved());
- Q_ASSERT(out->in.contains(bb));
- }
-
- // Check the incoming edges:
- for (BasicBlock *in : bb->in) {
- Q_UNUSED(in);
- Q_ASSERT(!in->isRemoved());
- Q_ASSERT(in->out.contains(bb));
- }
- }
-}
-
-static void verifyImmediateDominators(const DominatorTree &dt, IR::Function *function)
-{
- if (!DoVerification)
- return;
-
- cfg2dot(function);
- dt.dumpImmediateDominators();
- DominatorTree referenceTree(function);
-
- for (BasicBlock *bb : function->basicBlocks()) {
- if (bb->isRemoved())
- continue;
-
- BasicBlock *idom = dt.immediateDominator(bb);
- BasicBlock *referenceIdom = referenceTree.immediateDominator(bb);
- Q_UNUSED(idom);
- Q_UNUSED(referenceIdom);
- Q_ASSERT(idom == referenceIdom);
- }
-}
-
-static void verifyNoPointerSharing(IR::Function *function)
-{
- if (!DoVerification)
- return;
-
- class {
- public:
- void operator()(IR::Function *f)
- {
- for (BasicBlock *bb : f->basicBlocks()) {
- if (bb->isRemoved())
- continue;
-
- for (Stmt *s : bb->statements()) {
- visit(s);
- }
- }
- }
-
- private:
- void visit(Stmt *s)
- {
- check(s);
- STMT_VISIT_ALL_KINDS(s);
- }
-
- void visit(Expr *e)
- {
- check(e);
- EXPR_VISIT_ALL_KINDS(e);
- }
-
- private:
- void check(Stmt *s)
- {
- Q_ASSERT(!stmts.contains(s));
- stmts.insert(s);
- }
-
- void check(Expr *e)
- {
- Q_ASSERT(!exprs.contains(e));
- exprs.insert(e);
- }
-
- QSet<Stmt *> stmts;
- QSet<Expr *> exprs;
- } V;
- V(function);
-}
-
class RemoveLineNumbers: private SideEffectsChecker
{
public:
@@ -5452,6 +5478,9 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine, bool doTypeInference, bool pee
verifyNoPointerSharing(function);
mergeBasicBlocks(function, &defUses, &df);
+ verifyImmediateDominators(df, function);
+ verifyCFG(function);
+
// Basic-block cycles that are unreachable (i.e. for loops in a then-part where the
// condition is calculated to be always false) are not yet removed. This will choke the
// block scheduling, so remove those now.
@@ -5459,10 +5488,13 @@ void Optimizer::run(QQmlEnginePrivate *qmlEngine, bool doTypeInference, bool pee
cleanupBasicBlocks(function);
// showMeTheCode(function);
+ verifyImmediateDominators(df, function);
+ verifyCFG(function);
+
// Transform the CFG into edge-split SSA.
-// qout << "Starting edge splitting..." << endl;
+ showMeTheCode(function, "Before edge splitting");
splitCriticalEdges(function, df, worklist, defUses);
-// showMeTheCode(function);
+ showMeTheCode(function, "After edge splitting");
verifyImmediateDominators(df, function);
verifyCFG(function);
diff --git a/src/qml/debugger/qqmlabstractprofileradapter.cpp b/src/qml/debugger/qqmlabstractprofileradapter.cpp
index cfc40e8c2a..68b45ec6bf 100644
--- a/src/qml/debugger/qqmlabstractprofileradapter.cpp
+++ b/src/qml/debugger/qqmlabstractprofileradapter.cpp
@@ -179,3 +179,5 @@ void QQmlAbstractProfilerAdapter::stopProfiling() {
*/
QT_END_NAMESPACE
+
+#include "moc_qqmlabstractprofileradapter_p.cpp"
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp
index 8a16d56c45..01f74f08be 100644
--- a/src/qml/debugger/qqmldebugconnector.cpp
+++ b/src/qml/debugger/qqmldebugconnector.cpp
@@ -174,3 +174,5 @@ QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()
}
QT_END_NAMESPACE
+
+#include "moc_qqmldebugconnector_p.cpp"
diff --git a/src/qml/debugger/qqmldebugservice.cpp b/src/qml/debugger/qqmldebugservice.cpp
index b576c3bb85..4b77bee2c9 100644
--- a/src/qml/debugger/qqmldebugservice.cpp
+++ b/src/qml/debugger/qqmldebugservice.cpp
@@ -178,3 +178,4 @@ const QHash<int, QObject *> &QQmlDebugService::objectsForIds()
QT_END_NAMESPACE
#include "qqmldebugservice.moc"
+#include "moc_qqmldebugservice_p.cpp"
diff --git a/src/qml/debugger/qqmldebugserviceinterfaces.cpp b/src/qml/debugger/qqmldebugserviceinterfaces.cpp
index 48184da4d2..76205c7760 100644
--- a/src/qml/debugger/qqmldebugserviceinterfaces.cpp
+++ b/src/qml/debugger/qqmldebugserviceinterfaces.cpp
@@ -50,3 +50,5 @@ const QString QQmlEngineControlService::s_key = QStringLiteral("EngineControl");
const QString QQmlNativeDebugService::s_key = QStringLiteral("NativeQmlDebugger");
QT_END_NAMESPACE
+
+#include "moc_qqmldebugserviceinterfaces_p.cpp"
diff --git a/src/qml/debugger/qqmlprofiler.cpp b/src/qml/debugger/qqmlprofiler.cpp
index ffba731b13..8c0bd73822 100644
--- a/src/qml/debugger/qqmlprofiler.cpp
+++ b/src/qml/debugger/qqmlprofiler.cpp
@@ -81,3 +81,5 @@ void QQmlProfiler::reportData(bool trackLocations)
}
QT_END_NAMESPACE
+
+#include "moc_qqmlprofiler_p.cpp"
diff --git a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
index 201cee16e6..f4046c91ac 100644
--- a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc
@@ -35,9 +35,9 @@ There are two distinct types of \c qmldir files:
\li QML module definition files
\endlist
-This documentation covers only the second form of \c qmldir file. For more
-information about the first form of \c qmldir file, please see the
-documentation about
+This documentation covers only the second form of \c qmldir file, which
+lists the QML types, JavaScript files, and plugins that are available under a
+module. For more information about the first form of \c qmldir file, see
\l{qtqml-syntax-directoryimports.html#directory-listing-qmldir-files}
{directory listing qmldir files}.
@@ -280,22 +280,33 @@ Each command in a \c qmldir file must be on a separate line.
\section1 Versioning Semantics
-Types which are exported for a particular version are still made available if a
-later version is imported. If a module provides a \c MyButton type in version
-1.0 and a \c MyWindow type in version 1.1, clients which import version 1.1 of
-the module will be able to use the \c MyButton type and the \c MyWindow type.
-However, the reverse is not true: a type exported for a particular version
-cannot be used if an earlier version is imported. If the client had imported
-version 1.0 of the module, they can use the \c MyButton type but \b not the
+All QML types that are exported for a particular major version are available
+with the latest version of the same major version. For example, if a module
+provides a \c MyButton type in version 1.0 and \c MyWindow type in version 1.1,
+clients importing version \c 1.1 of the module get to use the \c MyButton and
+\c MyWindow types. However, the reverse is not true: a type exported for a
+particular minor version cannot be used by importing an older or earlier minor
+version. In the example mentioned earlier, if the client had imported version
+\c 1.0 of the module, they can use the \c MyButton type only but not the
\c MyWindow type.
+A module can offer multiple major versions but the clients have access
+to one major version only at a time. For example, importing
+\c{MyExampleModule 2.0} provides access to that major version only and not
+the previous major version. Although you can organize the artifacts that belong
+to different major versions under a sigle directory and a \c qmldir file, it is
+recommended to use different directories for each major version. If you
+choose to go with the earlier approach (one directory and a \c qmldir file),
+try to use the version suffix for the file names. For example, artifacts
+that belong to \c{MyExampleModule 2.0} can use \c .2 suffix in their file name.
+
A version cannot be imported if no types have been explicitly exported for that
version. If a module provides a \c MyButton type in version 1.0 and a
\c MyWindow type in version 1.1, you cannot import version 1.2 or version 2.0 of
that module.
-A type can be defined by different files in different versions. In this case,
-the most closely matching version will be used when imported by clients.
+A type can be defined by different files in different minor versions. In this case,
+the most closely matching version is used when imported by clients.
For example, if a module had specified the following types via its \c qmldir
file:
@@ -304,17 +315,15 @@ module ExampleModule
MyButton 1.0 MyButton.qml
MyButton 1.1 MyButton11.qml
MyButton 1.3 MyButton13.qml
-MyButton 2.0 MyButton20.qml
MyRectangle 1.2 MyRectangle12.qml
\endcode
-a client who imports version 1.2 of ExampleModule will get the \c MyButton
-type definition provided by \c MyButton11.qml as it is the most closely
-matching (i.e., latest while not being greater than the import) version of the
+a client who imports version \c 1.2 of \c ExampleModule can use the \c MyButton
+type definition provided by \c MyButton11.qml as it is the latest version of that
type, and the \c MyRectangle type definition provided by \c MyRectangle12.qml.
-The versioning system ensures that a given QML file will work regardless of the
-version of installed software, since a versioned import \e only imports types
+The version system ensures that a given QML file works regardless of the
+version of installed software, as a versioned import only imports types
for that version, leaving other identifiers available, even if the actual
installed version might otherwise provide those identifiers.
@@ -324,7 +333,6 @@ One example of a \c qmldir file follows:
\code
module ExampleModule
-CustomButton 1.0 CustomButton.qml
CustomButton 2.0 CustomButton20.qml
CustomButton 2.1 CustomButton21.qml
plugin examplemodule
@@ -332,16 +340,16 @@ MathFunctions 2.0 mathfuncs.js
\endcode
The above \c qmldir file defines a module called "ExampleModule". It defines
-the \c CustomButton QML object type in versions 1.1, 2.0 and 2.1 of the
-module, with different implementations in each version. It specifies a plugin
-which must be loaded by the engine when the module is imported by clients, and
+the \c CustomButton QML object type in versions 2.0 and 2.1 of the
+module, with different implementations for each version. It specifies a plugin
+that must be loaded by the engine when the module is imported by clients, and
that plugin may register various C++-defined types with the QML type system.
-On Unix-like systems the QML engine will attempt to load \c libexamplemodule.so
-as a QQmlExtensionPlugin, and on Windows it will attempt to load
-\c examplemodule.dll as a QQmlExtensionPlugin. Finally, the \c qmldir file
-specifies a \l{qtqml-javascript-resources.html}{JavaScript resource} which is
-only available if version 2.0 or greater of the module is imported, accessible
-via the \c MathFunctions identifier.
+On Unix-like systems the QML engine attempts to load \c libexamplemodule.so
+as a QQmlExtensionPlugin, and on Windows it loads \c examplemodule.dll as a
+QQmlExtensionPlugin. Finally, the \c qmldir file specifies a
+\l{qtqml-javascript-resources.html}{JavaScript resource}, which is
+only available if version 2.0 or a later version (under the same major version)
+of the module is imported.
If the module is \l{qtqml-modules-identifiedmodules.html}{installed} into the
QML import path, clients could import and use the module in the following
@@ -368,7 +376,6 @@ The \c CustomButton type used above would come from the definition specified in
the \c CustomButton21.qml file, and the JavaScript resource identified by the
\c MathFunctions identifier would be defined in the \c mathfuncs.js file.
-
\section1 Writing a qmltypes File
QML modules may refer to one or more type information files in their
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 0665295287..8769519a59 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -51,10 +51,6 @@
// We mean it.
//
-#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
-#define V4_BOOTSTRAP
-#endif
-
#include <QtCore/qglobal.h>
#include <QString>
@@ -64,11 +60,11 @@
#define QML_NEARLY_ALWAYS_INLINE inline
#endif
-#ifdef V4_BOOTSTRAP
-#include <private/qtqmldevtoolsglobal_p.h>
-#else
#include <qtqmlglobal.h>
#include <private/qtqmlglobal_p.h>
+
+#ifdef QT_QML_BOOTSTRAPPED
+#define V4_BOOTSTRAP
#endif
#if defined(Q_CC_MSVC)
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp
index f033eb2d2d..1edb7d3914 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -270,3 +270,5 @@ void QV4Include::method_include(const QV4::BuiltinFunction *, QV4::Scope &scope,
}
QT_END_NAMESPACE
+
+#include "moc_qv4include_p.cpp"
diff --git a/src/qml/jsruntime/qv4profiling.cpp b/src/qml/jsruntime/qv4profiling.cpp
index 8862cbef8e..bedcb5b164 100644
--- a/src/qml/jsruntime/qv4profiling.cpp
+++ b/src/qml/jsruntime/qv4profiling.cpp
@@ -141,3 +141,5 @@ void Profiler::startProfiling(quint64 features)
} // namespace QV4
QT_END_NAMESPACE
+
+#include "moc_qv4profiling_p.cpp"
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 270aaba8f8..b28e686041 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -2190,3 +2190,4 @@ void MultiplyWrappedQObjectMap::removeDestroyedObject(QObject *object)
QT_END_NAMESPACE
+#include "moc_qv4qobjectwrapper_p.cpp"
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index e9dcc9172f..bc882bbd95 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -366,7 +366,7 @@ struct Scoped
struct ScopedCallData {
ScopedCallData(const Scope &scope, int argc = 0)
{
- int size = qMax(argc, QV4::Global::ReservedArgumentCount + int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)));
+ int size = int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)) + qMax(argc , int(QV4::Global::ReservedArgumentCount));
ptr = reinterpret_cast<CallData *>(scope.alloc(size));
ptr->tag = quint32(QV4::Value::ValueTypeInternal::Integer);
ptr->argc = argc;
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index c4bd1a733f..64b07153cc 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -266,6 +266,18 @@ void ChunkAllocator::free(Chunk *chunk, size_t size)
Q_ASSERT(false);
}
+#ifdef DUMP_SWEEP
+QString binary(quintptr n) {
+ QString s = QString::number(n, 2);
+ while (s.length() < 64)
+ s.prepend(QChar::fromLatin1('0'));
+ return s;
+}
+#define SDUMP qDebug
+#else
+QString binary(quintptr) { return QString(); }
+#define SDUMP if (1) ; else qDebug
+#endif
void Heap::Base::markChildren(MarkStack *markStack)
{
@@ -338,8 +350,9 @@ static void increaseFreedCountForClass(const char *className)
void Chunk::sweep(ClassDestroyStatsCallback classCountPtr)
{
- // DEBUG << "sweeping chunk" << this << (*freeList);
+ SDUMP() << "sweeping chunk" << this;
HeapItem *o = realBase();
+ bool lastSlotFree = false;
for (uint i = 0; i < Chunk::EntriesInBitmap; ++i) {
#if WRITEBARRIER(none)
Q_ASSERT((grayBitmap[i] | blackBitmap[i]) == blackBitmap[i]); // check that we don't have gray only objects
@@ -347,7 +360,13 @@ void Chunk::sweep(ClassDestroyStatsCallback classCountPtr)
quintptr toFree = objectBitmap[i] ^ blackBitmap[i];
Q_ASSERT((toFree & objectBitmap[i]) == toFree); // check all black objects are marked as being used
quintptr e = extendsBitmap[i];
- // DEBUG << hex << " index=" << i << toFree;
+ SDUMP() << " index=" << i;
+ SDUMP() << " toFree =" << binary(toFree);
+ SDUMP() << " black =" << binary(blackBitmap[i]);
+ SDUMP() << " object =" << binary(objectBitmap[i]);
+ SDUMP() << " extends =" << binary(e);
+ if (lastSlotFree)
+ e &= (e + 1); // clear all lowest extent bits
while (toFree) {
uint index = qCountTrailingZeroBits(toFree);
quintptr bit = (static_cast<quintptr>(1) << index);
@@ -377,6 +396,10 @@ void Chunk::sweep(ClassDestroyStatsCallback classCountPtr)
objectBitmap[i] = blackBitmap[i];
grayBitmap[i] = 0;
extendsBitmap[i] = e;
+ lastSlotFree = !((objectBitmap[i]|extendsBitmap[i]) >> (sizeof(quintptr)*8 - 1));
+ SDUMP() << " new extends =" << binary(e);
+ SDUMP() << " lastSlotFree" << lastSlotFree;
+ Q_ASSERT((objectBitmap[i] & extendsBitmap[i]) == 0);
o += Chunk::Bits;
}
// DEBUG << "swept chunk" << this << "freed" << slotsFreed << "slots.";
@@ -1084,6 +1107,13 @@ size_t dumpBins(BlockAllocator *b, bool printOutput = true)
if (printOutput)
qDebug() << " number of entries in slot" << i << ":" << nEntries;
}
+ SDUMP() << " large slot map";
+ HeapItem *h = b->freeBins[BlockAllocator::NumBins - 1];
+ while (h) {
+ SDUMP() << " " << hex << (quintptr(h)/32) << h->freeData.availableSlots;
+ h = h->freeData.next;
+ }
+
if (printOutput)
qDebug() << " total mem in bins" << totalSlotMem*Chunk::SlotSize;
return totalSlotMem*Chunk::SlotSize;
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp
index a10dda166c..faab8bf926 100644
--- a/src/qml/qml/qqmlapplicationengine.cpp
+++ b/src/qml/qml/qqmlapplicationengine.cpp
@@ -57,6 +57,10 @@ QQmlApplicationEnginePrivate::~QQmlApplicationEnginePrivate()
void QQmlApplicationEnginePrivate::cleanUp()
{
+ Q_Q(QQmlApplicationEngine);
+ for (auto obj : qAsConst(objects))
+ obj->disconnect(q);
+
qDeleteAll(objects);
#if QT_CONFIG(translation)
qDeleteAll(translators);
@@ -126,9 +130,12 @@ void QQmlApplicationEnginePrivate::finishLoad(QQmlComponent *c)
qWarning() << qPrintable(c->errorString());
q->objectCreated(0, c->url());
break;
- case QQmlComponent::Ready:
- objects << c->create();
+ case QQmlComponent::Ready: {
+ auto newObj = c->create();
+ objects << newObj;
+ QObject::connect(newObj, &QObject::destroyed, q, [&](QObject *obj) { objects.removeAll(obj); });
q->objectCreated(objects.constLast(), c->url());
+ }
break;
case QQmlComponent::Loading:
case QQmlComponent::Null:
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 75968ffc43..9b965a52fb 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1527,3 +1527,5 @@ void QV4::QmlIncubatorObject::statusChanged(QQmlIncubator::Status s)
#undef INITIALPROPERTIES_SOURCE
QT_END_NAMESPACE
+
+#include "moc_qqmlcomponent.cpp"
diff --git a/src/qml/qml/qqmlcontext.cpp b/src/qml/qml/qqmlcontext.cpp
index 018841b9b1..1476c276f4 100644
--- a/src/qml/qml/qqmlcontext.cpp
+++ b/src/qml/qml/qqmlcontext.cpp
@@ -834,3 +834,5 @@ QString QQmlContextData::urlString() const
}
QT_END_NAMESPACE
+
+#include "moc_qqmlcontext.cpp"
diff --git a/src/qml/qml/qqmldelayedcallqueue.cpp b/src/qml/qml/qqmldelayedcallqueue.cpp
index d5d2c9a28d..13e62ec696 100644
--- a/src/qml/qml/qqmldelayedcallqueue.cpp
+++ b/src/qml/qml/qqmldelayedcallqueue.cpp
@@ -210,3 +210,5 @@ void QQmlDelayedCallQueue::ticked()
}
QT_END_NAMESPACE
+
+#include "moc_qqmldelayedcallqueue_p.cpp"
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 9ff76d7b24..74b03c9f72 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2177,7 +2177,7 @@ QString QQmlEngine::offlineStoragePath() const
Returns the file path where a \l{QtQuick.LocalStorage}{Local Storage}
database with the identifier \a databaseName is (or would be) located.
- \sa LocalStorage.openDatabaseSync()
+ \sa {openDatabaseSync}{LocalStorage.openDatabaseSync()}
\since 5.9
*/
QString QQmlEngine::offlineStorageDatabaseFilePath(const QString &databaseName) const
@@ -2553,3 +2553,5 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn /* = -1 */)
*/
QT_END_NAMESPACE
+
+#include "moc_qqmlengine.cpp"
diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp
index 097fa71200..b0e6a24616 100644
--- a/src/qml/qml/qqmlextensionplugin.cpp
+++ b/src/qml/qml/qqmlextensionplugin.cpp
@@ -128,3 +128,5 @@ void QQmlExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
*/
QT_END_NAMESPACE
+
+#include "moc_qqmlextensionplugin.cpp"
diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp
index 461ca33b3e..be6216d3ff 100644
--- a/src/qml/qml/qqmlfileselector.cpp
+++ b/src/qml/qml/qqmlfileselector.cpp
@@ -222,3 +222,5 @@ QUrl QQmlFileSelectorInterceptor::intercept(const QUrl &path, DataType type)
}
QT_END_NAMESPACE
+
+#include "moc_qqmlfileselector.cpp"
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index f967dacd34..7939656107 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -450,3 +450,5 @@ void QQmlApplication::setDomain(const QString &arg)
}
QT_END_NAMESPACE
+
+#include "moc_qqmlglobal_p.cpp"
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index 712da78807..326b36c5cd 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -1090,3 +1090,5 @@ void QQmlLocale::method_localeCompare(const BuiltinFunction *b, Scope &scope, Ca
*/
QT_END_NAMESPACE
+
+#include "moc_qqmllocale_p.cpp"
diff --git a/src/qml/qml/qqmlloggingcategory.cpp b/src/qml/qml/qqmlloggingcategory.cpp
index 764b874131..08f8552ab6 100644
--- a/src/qml/qml/qqmlloggingcategory.cpp
+++ b/src/qml/qml/qqmlloggingcategory.cpp
@@ -126,3 +126,5 @@ void QQmlLoggingCategory::setName(const QString &name)
QScopedPointer<QLoggingCategory> category(new QLoggingCategory(m_name.constData()));
m_category.swap(category);
}
+
+#include "moc_qqmlloggingcategory_p.cpp"
diff --git a/src/qml/qml/qqmlplatform.cpp b/src/qml/qml/qqmlplatform.cpp
index 64ca208f1b..165cde5eb3 100644
--- a/src/qml/qml/qqmlplatform.cpp
+++ b/src/qml/qml/qqmlplatform.cpp
@@ -79,3 +79,5 @@ QString QQmlPlatform::os()
}
QT_END_NAMESPACE
+
+#include "moc_qqmlplatform_p.cpp"
diff --git a/src/qml/qml/qqmltypenotavailable.cpp b/src/qml/qml/qqmltypenotavailable.cpp
index b10a7c62b9..ffa4472e4b 100644
--- a/src/qml/qml/qqmltypenotavailable.cpp
+++ b/src/qml/qml/qqmltypenotavailable.cpp
@@ -49,3 +49,5 @@ int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMi
QQmlTypeNotAvailable::QQmlTypeNotAvailable() { }
QT_END_NAMESPACE
+
+#include "moc_qqmltypenotavailable_p.cpp"
diff --git a/src/qml/qml/qqmlvaluetype.cpp b/src/qml/qml/qqmlvaluetype.cpp
index bcefad0ee3..520f512b1a 100644
--- a/src/qml/qml/qqmlvaluetype.cpp
+++ b/src/qml/qml/qqmlvaluetype.cpp
@@ -566,3 +566,5 @@ QVariantList QQmlEasingValueType::bezierCurve() const
}
QT_END_NAMESPACE
+
+#include "moc_qqmlvaluetype_p.cpp"
diff --git a/src/qml/qtqmlglobal.h b/src/qml/qtqmlglobal.h
index 89228b7777..6704e55b52 100644
--- a/src/qml/qtqmlglobal.h
+++ b/src/qml/qtqmlglobal.h
@@ -48,7 +48,11 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_STATIC
+#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
+# define QT_QML_BOOTSTRAPPED
+#endif
+
+#if !defined(QT_QML_BOOTSTRAPPED) && !defined(QT_STATIC)
# if defined(QT_BUILD_QML_LIB)
# define Q_QML_EXPORT Q_DECL_EXPORT
# else
diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h
index 026be5a703..6547274d09 100644
--- a/src/qml/qtqmlglobal_p.h
+++ b/src/qml/qtqmlglobal_p.h
@@ -63,7 +63,7 @@
Q_ALLOCA_DECLARE(type, name); \
Q_ALLOCA_ASSIGN(type, name, size)
-#if QT_CONFIG(alloca)
+#if defined(QT_BOOTSTRAPPED) || QT_CONFIG(alloca)
#define Q_ALLOCA_DECLARE(type, name) \
type *name = 0
@@ -95,10 +95,6 @@ QT_END_NAMESPACE
#endif
-#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
-# define Q_QML_PRIVATE_EXPORT
-#else
-# define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT
-#endif
+#define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT
#endif // QTQMLGLOBAL_P_H
diff --git a/src/qml/types/qqmlbind.cpp b/src/qml/types/qqmlbind.cpp
index 2ded9c13c8..da644becc2 100644
--- a/src/qml/types/qqmlbind.cpp
+++ b/src/qml/types/qqmlbind.cpp
@@ -386,3 +386,5 @@ void QQmlBind::eval()
}
QT_END_NAMESPACE
+
+#include "moc_qqmlbind_p.cpp"
diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp
index 66bc772279..6e9cb5f1fe 100644
--- a/src/qml/types/qqmlconnections.cpp
+++ b/src/qml/types/qqmlconnections.cpp
@@ -313,3 +313,5 @@ void QQmlConnections::componentComplete()
}
QT_END_NAMESPACE
+
+#include "moc_qqmlconnections_p.cpp"
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index f26e5f6cdb..8f4b9cd519 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -3346,3 +3346,5 @@ QV4::ReturnedValue QQmlDelegateModelEngineData::array(QV8Engine *engine, const Q
}
QT_END_NAMESPACE
+
+#include "moc_qqmldelegatemodel_p.cpp"
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index efc2828dc5..06caa77bb4 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -2606,3 +2606,5 @@ bool QQmlListModelParser::definesEmptyList(const QString &s)
*/
QT_END_NAMESPACE
+
+#include "moc_qqmllistmodel_p.cpp"
diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qml/types/qqmllistmodelworkeragent.cpp
index 963459cc55..0a5adbf292 100644
--- a/src/qml/types/qqmllistmodelworkeragent.cpp
+++ b/src/qml/types/qqmllistmodelworkeragent.cpp
@@ -253,3 +253,4 @@ bool QQmlListModelWorkerAgent::event(QEvent *e)
QT_END_NAMESPACE
+#include "moc_qqmllistmodelworkeragent_p.cpp"
diff --git a/src/qml/types/qqmlmodelindexvaluetype.cpp b/src/qml/types/qqmlmodelindexvaluetype.cpp
index 0b05210ce5..cbf2fef348 100644
--- a/src/qml/types/qqmlmodelindexvaluetype.cpp
+++ b/src/qml/types/qqmlmodelindexvaluetype.cpp
@@ -64,3 +64,5 @@ QString QQmlItemSelectionRangeValueType::toString() const
}
QT_END_NAMESPACE
+
+#include "moc_qqmlmodelindexvaluetype_p.cpp"
diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qml/types/qqmlobjectmodel.cpp
index d926ecb6ce..2814b9d38f 100644
--- a/src/qml/types/qqmlobjectmodel.cpp
+++ b/src/qml/types/qqmlobjectmodel.cpp
@@ -439,3 +439,5 @@ void QQmlObjectModel::clear()
}
QT_END_NAMESPACE
+
+#include "moc_qqmlobjectmodel_p.cpp"
diff --git a/src/qml/types/qqmltimer.cpp b/src/qml/types/qqmltimer.cpp
index 7efdac4c22..2037c4f6cd 100644
--- a/src/qml/types/qqmltimer.cpp
+++ b/src/qml/types/qqmltimer.cpp
@@ -355,3 +355,5 @@ void QQmlTimerPrivate::animationFinished(QAbstractAnimationJob *)
}
QT_END_NAMESPACE
+
+#include "moc_qqmltimer_p.cpp"
diff --git a/src/qml/types/qquickpackage.cpp b/src/qml/types/qquickpackage.cpp
index 17eff5ac40..e0d1888f33 100644
--- a/src/qml/types/qquickpackage.cpp
+++ b/src/qml/types/qquickpackage.cpp
@@ -194,3 +194,5 @@ QQuickPackageAttached *QQuickPackage::qmlAttachedProperties(QObject *o)
QT_END_NAMESPACE
+
+#include "moc_qquickpackage_p.cpp"
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index f35e17c34d..6159355afc 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -758,3 +758,4 @@ QT_END_NAMESPACE
#include <qquickworkerscript.moc>
+#include "moc_qquickworkerscript_p.cpp"