[Bug 266068] kde-runtime doesn't compile because of wrong line endings

Ralf Habacker ralf.habacker at freenet.de
Fri Feb 11 14:52:27 CET 2011


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


Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ralf.habacker at freenet.de




--- 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.


More information about the Kde-windows mailing list