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