D9044: Fix compile with QT_NO_CAST_FROM_ASCII
David Faure
noreply at phabricator.kde.org
Wed Nov 29 06:41:21 UTC 2017
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kbuildservicegroupfactory.cpp:84
>
> - if (menuName != "/") {
> + if (menuName != QStringLiteral("/")) {
> // Make sure parent dir exists.
Use QLatin1String for comparisons
> kbuildsycoca.cpp:248
> //qCDebug(SYCOCA) << "CHANGED:" << m_resource;
> - m_changedResources.append(m_resource);
> + m_changedResources.append(QString::fromUtf8(m_resource));
> }
`fromLatin1` would do, it's ascii strings like "services" etc.
> kbuildsycoca.cpp:302
> //qCDebug(SYCOCA) << "CHANGED:" << m_resource;
> - m_changedResources.append(m_resource);
> + m_changedResources.append(QString::fromUtf8(m_resource));
> }
same
> kmimeassociations.cpp:110
> const QStringList services = group.readXdgListEntry(mimeName);
> - const QString resolvedMimeName = mimeName.startsWith("x-scheme-handler/") ? mimeName : db.mimeTypeForName(mimeName).name();
> + const QString resolvedMimeName = mimeName.startsWith(QStringLiteral("x-scheme-handler/")) ? mimeName : db.mimeTypeForName(mimeName).name();
> if (resolvedMimeName.isEmpty()) {
startsWith() has a QLatin1String overload
REPOSITORY
R309 KService
REVISION DETAIL
https://phabricator.kde.org/D9044
To: mlaurent, dfaure
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171129/be2e9d70/attachment.html>
More information about the Kde-frameworks-devel
mailing list