summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/moc
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-01-04 15:32:34 +0100
committerLiang Qi <liang.qi@qt.io>2020-01-04 15:32:34 +0100
commita503bf54705d89204007e8f887b668fe5ef519fc (patch)
treeb2d1a452da39450eac78a1aeb1df116a73f64b23 /tests/auto/tools/moc
parente65c43fd0ffa57248e7d750570b7deae171a82f5 (diff)
parent1f87fb359fdff14e42662384a9c8a0bcb3837671 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
Diffstat (limited to 'tests/auto/tools/moc')
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json11
-rw-r--r--tests/auto/tools/moc/grand-parent-gadget-class.h3
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp1
3 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json
index 9f99de65b5..c8abba6a8f 100644
--- a/tests/auto/tools/moc/allmocs_baseline_in.json
+++ b/tests/auto/tools/moc/allmocs_baseline_in.json
@@ -996,6 +996,17 @@
"name": "Derived"
}
]
+ },
+ {
+ "className": "CRTPDerivedGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::CRTPDerivedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "CRTP<CRTPDerivedGadget>"
+ }
+ ]
}
],
"inputFile": "grand-parent-gadget-class.h",
diff --git a/tests/auto/tools/moc/grand-parent-gadget-class.h b/tests/auto/tools/moc/grand-parent-gadget-class.h
index 7ffd636ca1..c7720a1ab9 100644
--- a/tests/auto/tools/moc/grand-parent-gadget-class.h
+++ b/tests/auto/tools/moc/grand-parent-gadget-class.h
@@ -36,7 +36,8 @@ namespace GrandParentGadget {
struct BaseGadget { Q_GADGET };
struct Derived : BaseGadget {};
struct DerivedGadget : Derived { Q_GADGET };
-
+template<typename T> struct CRTP : BaseGadget {};
+struct CRTPDerivedGadget : CRTP<CRTPDerivedGadget> { Q_GADGET };
}
#endif // GRANDPARENTGADGETCLASS_H
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 36ea101814..e5de647930 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -3813,6 +3813,7 @@ void tst_Moc::gadgetHierarchy()
{
QCOMPARE(NonGadgetParent::Derived::staticMetaObject.superClass(), static_cast<const QMetaObject*>(nullptr));
QCOMPARE(GrandParentGadget::DerivedGadget::staticMetaObject.superClass(), &GrandParentGadget::BaseGadget::staticMetaObject);
+ QCOMPARE(GrandParentGadget::CRTPDerivedGadget::staticMetaObject.superClass(), &GrandParentGadget::BaseGadget::staticMetaObject);
}
void tst_Moc::optionsFileError_data()