@@ -247,17 +247,21 QStringList SetupGenerator::writePolymorphicHandler(QTextStream &s, const QStrin | |||
|
247 | 247 | foreach (const AbstractMetaClass *clazz, allClasses) { |
|
248 | 248 | bool inherits = false; |
|
249 | 249 | if (isGraphicsItem) { |
|
250 |
|
|
|
251 | if (interfaze->qualifiedCppName()=="QGraphicsItem") { | |
|
252 | inherits = true; | |
|
253 | break; | |
|
250 | const AbstractMetaClass *currentClazz = clazz; | |
|
251 | while (!inherits && currentClazz) { | |
|
252 | foreach(AbstractMetaClass* interfaze, currentClazz->interfaces()) { | |
|
253 | if (interfaze->qualifiedCppName()=="QGraphicsItem") { | |
|
254 | inherits = true; | |
|
255 | break; | |
|
256 | } | |
|
254 | 257 | } |
|
258 | currentClazz = currentClazz->baseClass(); | |
|
255 | 259 | } |
|
256 | 260 | } else { |
|
257 | 261 | inherits = clazz->inheritsFrom(cls); |
|
258 | 262 | } |
|
259 | 263 | if (clazz->package() == package && inherits) { |
|
260 |
if (!clazz->typeEntry()->polymorphicIdValue().isEmpty() |
|
|
264 | if (!clazz->typeEntry()->polymorphicIdValue().isEmpty()) { | |
|
261 | 265 | // On first find, open the function |
|
262 | 266 | if (first) { |
|
263 | 267 | first = false; |
@@ -275,9 +279,6 QStringList SetupGenerator::writePolymorphicHandler(QTextStream &s, const QStrin | |||
|
275 | 279 | |
|
276 | 280 | // For each, add case label |
|
277 | 281 | QString polyId = clazz->typeEntry()->polymorphicIdValue(); |
|
278 | if (isGraphicsItem) { | |
|
279 | polyId = "%1->type() == " + clazz->qualifiedCppName() + "::Type"; | |
|
280 | } | |
|
281 | 282 | s << " if (" |
|
282 | 283 | << polyId.replace("%1", "object") |
|
283 | 284 | << ") {" << endl |
@@ -1455,7 +1455,7 | |||
|
1455 | 1455 | <interface-type name="QLayoutItem"/> |
|
1456 | 1456 | <interface-type name="QPaintDevice"/> |
|
1457 | 1457 | |
|
1458 | <interface-type name="QGraphicsItem" delete-in-main-thread="yes"> | |
|
1458 | <interface-type name="QGraphicsItem" delete-in-main-thread="yes" polymorphic-base="yes"> | |
|
1459 | 1459 | <modify-function signature="setCursorForItemOnly(QCursor)" remove="all"/> |
|
1460 | 1460 | |
|
1461 | 1461 | <modify-function signature="setMatrix(QMatrix, bool)" remove="all"/> |
@@ -1837,7 +1837,7 | |||
|
1837 | 1837 | </modify-function> |
|
1838 | 1838 | </object-type> |
|
1839 | 1839 | |
|
1840 | <object-type name="QGraphicsEllipseItem" delete-in-main-thread="yes"/> | |
|
1840 | <object-type name="QGraphicsEllipseItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsEllipseItem::Type" /> | |
|
1841 | 1841 | <object-type name="QGraphicsItemAnimation"> |
|
1842 | 1842 | <modify-function signature="setItem(QGraphicsItem*)"> |
|
1843 | 1843 | <modify-argument index="1"> |
@@ -1854,29 +1854,30 | |||
|
1854 | 1854 | <include file-name="QPair" location="global"/> |
|
1855 | 1855 | </extra-includes> |
|
1856 | 1856 | </object-type> |
|
1857 |
<object-type name="QGraphicsItemGroup" delete-in-main-thread="yes" |
|
|
1857 | <object-type name="QGraphicsItemGroup" delete-in-main-thread="yes" | |
|
1858 | polymorphic-id-expression="%1->type() == QGraphicsItemGroup::Type"> | |
|
1858 | 1859 | <modify-function signature="matrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1859 | 1860 | <modify-function signature="resetMatrix()" remove="all"/> <!--### Obsolete in 4.3--> |
|
1860 | 1861 | <modify-function signature="sceneMatrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1861 | 1862 | <modify-function signature="setMatrix(QMatrix, bool)" remove="all"/> <!--### Obsolete in 4.3--> |
|
1862 | 1863 | </object-type> |
|
1863 | <object-type name="QGraphicsLineItem" delete-in-main-thread="yes"> | |
|
1864 | <object-type name="QGraphicsLineItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsLineItem::Type"> | |
|
1864 | 1865 | <modify-function signature="matrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1865 | 1866 | <modify-function signature="resetMatrix()" remove="all"/> <!--### Obsolete in 4.3--> |
|
1866 | 1867 | <modify-function signature="sceneMatrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1867 | 1868 | <modify-function signature="setMatrix(QMatrix, bool)" remove="all"/> <!--### Obsolete in 4.3--> |
|
1868 | 1869 | </object-type> |
|
1869 | <object-type name="QGraphicsPathItem" delete-in-main-thread="yes"/> | |
|
1870 | <object-type name="QGraphicsPathItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsPathItem::Type"/> | |
|
1870 | 1871 | |
|
1871 | <object-type name="QGraphicsPixmapItem" delete-in-main-thread="yes"> | |
|
1872 | <object-type name="QGraphicsPixmapItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsPixmapItem::Type"> | |
|
1872 | 1873 | <modify-function signature="matrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1873 | 1874 | <modify-function signature="resetMatrix()" remove="all"/> <!--### Obsolete in 4.3--> |
|
1874 | 1875 | <modify-function signature="sceneMatrix()const" remove="all"/> <!--### Obsolete in 4.3--> |
|
1875 | 1876 | <modify-function signature="setMatrix(QMatrix, bool)" remove="all"/> <!--### Obsolete in 4.3--> |
|
1876 | 1877 | </object-type> |
|
1877 | <object-type name="QGraphicsPolygonItem" delete-in-main-thread="yes"/> | |
|
1878 | <object-type name="QGraphicsRectItem" delete-in-main-thread="yes"/> | |
|
1879 | <object-type name="QGraphicsSimpleTextItem" delete-in-main-thread="yes"/> | |
|
1878 | <object-type name="QGraphicsPolygonItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsPolygonItem::Type"/> | |
|
1879 | <object-type name="QGraphicsRectItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsRectItem::Type"/> | |
|
1880 | <object-type name="QGraphicsSimpleTextItem" delete-in-main-thread="yes" polymorphic-id-expression="%1->type() == QGraphicsSimpleTextItem::Type"/> | |
|
1880 | 1881 | <object-type name="QHBoxLayout"/> |
|
1881 | 1882 | <object-type name="QHeaderView"> |
|
1882 | 1883 | <modify-function signature="initStyleOption(QStyleOptionHeader*)const"> |
@@ -3518,7 +3519,7 | |||
|
3518 | 3519 | <modify-function signature="operator<(QListWidgetItem)const" remove="all"/> |
|
3519 | 3520 | </object-type> |
|
3520 | 3521 | |
|
3521 | <object-type name="QGraphicsTextItem"> <!-- a QObject so main-thread delete redundant --> | |
|
3522 | <object-type name="QGraphicsTextItem" polymorphic-id-expression="%1->type() == QGraphicsTextItem::Type"> <!-- a QObject so main-thread delete redundant --> | |
|
3522 | 3523 | <extra-includes> |
|
3523 | 3524 | <include file-name="QTextCursor" location="global"/> |
|
3524 | 3525 | </extra-includes> |
@@ -5427,7 +5428,9 | |||
|
5427 | 5428 | </modify-function> |
|
5428 | 5429 | </object-type> |
|
5429 | 5430 | <object-type name="QGraphicsProxyWidget"/> <!-- a QObject so main-thread delete redundant --> |
|
5430 | <object-type name="QGraphicsWidget"> <!-- a QObject so main-thread delete redundant --> | |
|
5431 | <object-type name="QGraphicsWidget" | |
|
5432 | polymorphic-id-expression="%1->isWidget()"> | |
|
5433 | <!-- a QObject so main-thread delete redundant --> | |
|
5431 | 5434 | <!-- Duplicate function to QObject::children() to override accidental shadowing which is not present in Jambi --> |
|
5432 | 5435 | <modify-function signature="children()const" remove="all"/> |
|
5433 | 5436 | <modify-function signature="setLayout(QGraphicsLayout*)"> |
General Comments 0
You need to be logged in to leave comments.
Login now