| Summary: | kde-runtime doesn't compile because of wrong line endings | ||
|---|---|---|---|
| Product: | [Unmaintained] kde-windows | Reporter: | Peter Grasch <me> |
| Component: | general | Assignee: | KDE-Windows <windows-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ralf.habacker |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Peter Grasch
2011-02-11 11:10:44 UTC
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.
this has been fixed by adding special handling of eols to our gits configuration. |