[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-doc-english
Subject: Re: [kde-doc-english] Review Request 116604: Allow directories with . as output for meinproc
From: Burkhard_Lück <lueck () hube-lueck ! de>
Date: 2014-03-07 13:36:52
Message-ID: 20140307133652.2613.52179 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116604/#review52347
-----------------------------------------------------------
Ship it!
Thanks
- Burkhard Lück
On March 5, 2014, 1:06 a.m., Luigi Toscano wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116604/
> -----------------------------------------------------------
>
> (Updated March 5, 2014, 1:06 a.m.)
>
>
> Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol Gonzalez.
>
>
> Bugs: 246755
> https://bugs.kde.org/show_bug.cgi?id=246755
>
>
> Repository: kdoctools
>
>
> Description
> -------
>
> The outputFile parameter is not used by the stylesheets, so don't pass it. If a \
> directory starts with ".", it is interpreted in a wrong way by libxslt with an \
> error like:
> -------------------
> XPath error : Invalid expression
> /home/kde-devel/.cache5/khelpcenter/help/__home__kde-
> devel__kde__share__doc__HTML__en__kioslave__file__index.docbook
> ^
> runtime error
> Evaluating user parameter outputFile failed
> -------------------
> This is an old issue, it was "solved" on windows by not compiling that code, but I \
> suspect that the issue has been in UNIX systems too for a long time.
> Another way to solve the bug is quoting the value of the parameter with '...', \
> replacing: params.append(qstrdup(parser.value(QStringLiteral("output")).toLocal8Bit().constData()));
>
> with something like
> QString quotedOutput = "'" + parser.value(QStringLiteral("output")) + "'";
> params.append(qstrdup(quotedOutput.toLocal8Bit().constData()));
>
> but anyway in this case the name of output file is not used, or I can't find any \
> occurrence in the stylesheets. The stylesheet is applied and the name of the file \
> is used only after to write the generated XML (see tranform() function).
> A similar patch can be applied to kdelibs/kdoctools too (same codepath).
>
>
> Diffs
> -----
>
> src/meinproc.cpp 95adcea
>
> Diff: https://git.reviewboard.kde.org/r/116604/diff/
>
>
> Testing
> -------
>
> Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the directory \
> must exist), no error anymore and the file is generated.
>
> Thanks,
>
> Luigi Toscano
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/116604/">https://git.reviewboard.kde.org/r/116604/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thanks</pre> <br />
<p>- Burkhard Lück</p>
<br />
<p>On March 5th, 2014, 1:06 a.m. UTC, Luigi Toscano wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Documentation, KDE Frameworks, kdelibs, and Aleix Pol \
Gonzalez.</div> <div>By Luigi Toscano.</div>
<p style="color: grey;"><i>Updated March 5, 2014, 1:06 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=246755">246755</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdoctools
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The outputFile parameter is not used by the stylesheets, so don't \
pass it. If a directory starts with ".", it is interpreted in a wrong way \
by libxslt with an error like:
-------------------
XPath error : Invalid expression
/home/kde-devel/.cache5/khelpcenter/help/__home__kde-
devel__kde__share__doc__HTML__en__kioslave__file__index.docbook
^
runtime error
Evaluating user parameter outputFile failed
-------------------
This is an old issue, it was "solved" on windows by not compiling that \
code, but I suspect that the issue has been in UNIX systems too for a long time.
Another way to solve the bug is quoting the value of the parameter with \
'...', replacing: \
params.append(qstrdup(parser.value(QStringLiteral("output")).toLocal8Bit().constData()));
with something like
QString quotedOutput = "'" + \
parser.value(QStringLiteral("output")) + "'"; \
params.append(qstrdup(quotedOutput.toLocal8Bit().constData()));
but anyway in this case the name of output file is not used, or I can't find any \
occurrence in the stylesheets. The stylesheet is applied and the name of the file is \
used only after to write the generated XML (see tranform() function).
A similar patch can be applied to kdelibs/kdoctools too (same codepath).</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Run meinproc5 (and 4) with -o /something/with/a/.dotdir/myfile.txt (the \
directory must exist), no error anymore and the file is generated.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/meinproc.cpp <span style="color: grey">(95adcea)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116604/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kde-doc-english mailing list
kde-doc-english@kde.org
https://mail.kde.org/mailman/listinfo/kde-doc-english
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic