t-artistik / qtscriptgenerator

Automatically exported from code.google.com/p/qtscriptgenerator
0 stars 0 forks source link

Return Type in the Typesystem is not respected in the documentation #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Typesystem type change:

        <template name="app.prepare_removed_typeref_argument">
            %TYPE __result;
            %TYPE&amp; %out% = __result;
        </template>

        <template name="app.convert_to_null_or_wrap">
            QScriptValue %out%;
            if (!%in%)
                %out% = context-&gt;engine()-&gt;nullValue();
            else
                %out% = qScriptValueFromValue(context-&gt;engine(), 
__result);
        </template>

        <value-type name="Employee">
            <inject-code class="native" position="beginning">
            Q_DECLARE_METATYPE(QScriptValue)
            </inject-code>
            <modify-function signature="load( const int, const QString, 
Employee&amp;)">
                <modify-argument index="3">
                    <remove-default-expression/>
                    <remove-argument/>
                    <conversion-rule class="native">
                       <insert-template 
name="app.prepare_removed_typeref_argument">
                            <replace from="%TYPE" to="Employee"/>
                       </insert-template>
                    </conversion-rule>
                </modify-argument>
                <modify-argument index="return">
                    <replace-type modified-type="Employee" />
                    <conversion-rule class="native">
                        <insert-template 
name="app.convert_to_null_or_wrap"/>
                    </conversion-rule>
                </modify-argument>
            </modify-function>
        </value-type>

What is the expected output? What do you see instead?
In this case the return Value should change from bool to Employee.
But in the docs, still bool is the return type

Original issue reported on code.google.com by zbnj...@gmail.com on 17 Feb 2010 at 12:12