<typesystem package="com.trolltech.qt.svg" default-superclass="com.trolltech.qt.QtJambiObject">
    <inject-code>
        com.trolltech.qt.Utilities.loadQtLibrary("QtXml");
        com.trolltech.qt.Utilities.loadQtLibrary("QtGui");
        com.trolltech.qt.Utilities.loadQtLibrary("QtSvg");
    </inject-code>


    <object-type name="QGraphicsSvgItem" delete-in-main-thread="yes">
        <modify-function signature="setGroup(QGraphicsItemGroup*)">
            <modify-argument index="1">
                <!-- Handled by injected code in QGraphicsItem -->
                <reference-count action="ignore" />
            </modify-argument>
        </modify-function>
        <modify-function signature="setParentItem(QGraphicsItem*)">
            <modify-argument index="1">
                <!-- Handled by injected code in QGraphicsItem -->
                <reference-count action="ignore" />
            </modify-argument>
        </modify-function>
        <modify-function signature="setSharedRenderer(QSvgRenderer*)">
            <modify-argument index="1">
                <define-ownership class="java" owner="c++" />
            </modify-argument>
            <inject-code position="beginning">
                QSvgRenderer oldRenderer = renderer();
            </inject-code>
            <inject-code position="end">
            if (oldRenderer != null)
                oldRenderer.reenableGarbageCollection();
            </inject-code>
        </modify-function>
        <modify-function signature="QGraphicsSvgItem(QGraphicsItem*)">
            <inject-code position="end">
                <argument-map index="1" meta-name="%1" />
            if (%1 != null) disableGarbageCollection();
            </inject-code>
        </modify-function>
        <modify-function signature="QGraphicsSvgItem(const QString &amp;,QGraphicsItem*)">
            <inject-code position="end">
                <argument-map index="2" meta-name="%2" />
            if (%2 != null) disableGarbageCollection();
            </inject-code>
        </modify-function>

    </object-type>

    <suppress-warning text="WARNING(CppImplGenerator) :: protected function '*' in final class '*'" />
    <suppress-warning text="WARNING(MetaJavaBuilder) :: visibility of function '*' modified in class '*'" />
    <suppress-warning text="WARNING(MetaJavaBuilder) :: hiding of function '*' in class '*'" />
</typesystem>
