[resources] Use "/" instead of QDir::separator
ClosedPublic

Authored by poboiko on Apr 6 2020, 6:59 PM.

Details

Summary

As Qt documentation states (https://doc.qt.io/qt-5/qdir.html#separator),
QDir::separator() should not be used to build file paths.

Note to reviewers: I might have confused QStringLiteral vs QLatin1String vs QLatin1Char
in some places, please correct me if I'm wrong

Test Plan

It compiles

Diff Detail

Repository
R44 KDE PIM Runtime
Branch
maildir-qdir-separator (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24954
Build 24972: arc lint + arc unit
poboiko created this revision.Apr 6 2020, 6:59 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 6 2020, 6:59 PM
poboiko requested review of this revision.Apr 6 2020, 6:59 PM
mlaurent requested changes to this revision.Apr 7 2020, 4:51 AM
mlaurent added inline comments.
resources/shared/singlefileresource/singlefileresourcebase.cpp
242

Why replacing QLatin1Char(..) by QStringLiteral("..") ?

resources/vcarddir/vcarddirresource.cpp
251

Use QLatin1Char('/') everywhere

This revision now requires changes to proceed.Apr 7 2020, 4:51 AM
poboiko updated this revision to Diff 79578.Apr 7 2020, 2:25 PM

Use QLatin1Char

mlaurent requested changes to this revision.Apr 8 2020, 4:46 AM
mlaurent added inline comments.
resources/shared/singlefileresource/singlefileresourcebase.cpp
242

QLatin1Char('-') not QStringLiteral("-")

This revision now requires changes to proceed.Apr 8 2020, 4:46 AM
poboiko updated this revision to Diff 79659.Apr 8 2020, 5:46 PM

Changed yet another QStringLiteral(char) -> QLatin1Char.

Missed that one, sorry.

mlaurent accepted this revision.Apr 9 2020, 4:41 AM
This revision is now accepted and ready to land.Apr 9 2020, 4:41 AM
This revision was automatically updated to reflect the committed changes.