https://bugs.kde.org/show_bug.cgi?id=266068


Ralf Habacker <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]




--- Comment #1 from Ralf Habacker <ralf habacker freenet de>  2011-02-11 
14:52:25 ---
The related generated code looks like shown below: 


    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.kde.JobViewServer\">\n"
"    <method name=\"requestView\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"appName\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"appIconName\"/>\n"
\n"    <!-- 'capabilities' is used as a bit field:
\n"         0x0001 means that the user should be able to cancel the job
\n"         0x0002 means that the user should be able to suspend/resume the job
"       -->\n"
"      <arg direction=\"in\" type=\"i\" name=\"capabilities\"/>\n"
"      <arg direction=\"out\" type=\"o\" name=\"trackerPath\"/>\n"
"    </method>\n"
"  </interface>\n"
        "")

The related code in <qt-source>/tools/qdbus/dbusxml2cpp.cpp is shown below: 

           << "    Q_CLASSINFO(\"D-Bus Introspection\", \"\"" << endl
           << stringify(interface->introspection)
           << "        \"\")" << endl

The string is converted by stringify, which follows: 

static QString stringify(const QString &data)
{
    QString retval;
    int i;
    for (i = 0; i < data.length(); ++i) {
        retval += QLatin1Char('\"');
        for ( ; i < data.length() && data[i] != QLatin1Char('\n'); ++i)
            if (data[i] == QLatin1Char('\"'))
                retval += QLatin1String("\\\"");
            else
                retval += data[i];
        retval += QLatin1String("\\n\"\n");
    }
    return retval;
}

Maybe this function do not parse the xml file correctly or
interface->introspection contains additional \n.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows

Reply via email to