[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 126329: kio: Do not use QStringLiteral with multi strings
From: "Nick Shaforostoff" <shafff () ukr ! net>
Date: 2015-12-13 0:55:57
Message-ID: 20151213005557.3920.49097 () mimi ! kde ! org
[Download RAW message or body]
--===============4446632887970078490==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126329/#review89405
-----------------------------------------------------------
please use QLatin1String instead of QString::fromLatin1 for QRegExp.
for the rest i suggest using
#ifdef Q_OS_WIN
#define U QLatin1String
#else
#define U QStringLiteral
#endif
or smth like that.
- Nick Shaforostoff
On Dec. 12, 2015, 11:08 p.m., Patrick Spendrin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126329/
> -----------------------------------------------------------
>
> (Updated Dec. 12, 2015, 11:08 p.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: kio
>
>
> Description
> -------
>
> Strings that are separated into multiple parts don't work on Windows
> together with QStringLiteral as the first string is interpreted as a
> wide (16bit) string, and the second one as a narrow (8bit) string.
> Replacing with QString::fromLatin1 is the easiest solution keeping
> the code layout the same, joining the strings does work too though.
>
>
> Diffs
> -----
>
> autotests/dataprotocoltest.cpp 9fe238fdbb0e9682141772d423a64edd5621921b
> src/core/ksambashare.cpp a3f84ac3971141e687d9ab17e0131a66db34ed5a
> src/filewidgets/kfileplacesmodel.cpp b409c1b1617f97f3cdbc79a2c76110a5f9449398
> src/ioslaves/help/kio_help.cpp cb27a77b22fe378a126d985621985265edb93767
> src/widgets/kpropertiesdialog.cpp 0ff506273a10dba238fefc5c552c71434681285e
>
> Diff: https://git.reviewboard.kde.org/r/126329/diff/
>
>
> Testing
> -------
>
> Windows.
>
>
> Thanks,
>
> Patrick Spendrin
>
>
--===============4446632887970078490==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/126329/">https://git.reviewboard.kde.org/r/126329/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">please use QLatin1String instead of QString::fromLatin1 for QRegExp. for \
the rest i suggest using</p> <h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">ifdef Q_OS_WIN</h1> <h1 style="font-size: 100%;text-rendering: \
inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">define U QLatin1String</h1> <h1 \
style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">else</h1> <h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">define U QStringLiteral</h1> <h1 style="font-size: \
100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">endif</h1> \
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">or \
smth like that.</p></pre> <br />
<p>- Nick Shaforostoff</p>
<br />
<p>On December 12th, 2015, 11:08 p.m. UTC, Patrick Spendrin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Patrick Spendrin.</div>
<p style="color: grey;"><i>Updated Dec. 12, 2015, 11:08 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</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;">Strings that are separated into multiple \
parts don't work on Windows together with QStringLiteral as the first string is interpreted as a
wide (16bit) string, and the second one as a narrow (8bit) string.
Replacing with QString::fromLatin1 is the easiest solution keeping
the code layout the same, joining the strings does work too though.</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;"><p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Windows.</p></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>autotests/dataprotocoltest.cpp <span style="color: \
grey">(9fe238fdbb0e9682141772d423a64edd5621921b)</span></li>
<li>src/core/ksambashare.cpp <span style="color: \
grey">(a3f84ac3971141e687d9ab17e0131a66db34ed5a)</span></li>
<li>src/filewidgets/kfileplacesmodel.cpp <span style="color: \
grey">(b409c1b1617f97f3cdbc79a2c76110a5f9449398)</span></li>
<li>src/ioslaves/help/kio_help.cpp <span style="color: \
grey">(cb27a77b22fe378a126d985621985265edb93767)</span></li>
<li>src/widgets/kpropertiesdialog.cpp <span style="color: \
grey">(0ff506273a10dba238fefc5c552c71434681285e)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/126329/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============4446632887970078490==--
[Attachment #3 (text/plain)]
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic