Commit a084d9f7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QLatin1Char('/') here

parent 80590e91
......@@ -142,8 +142,8 @@ public:
if (attFileName.isEmpty()) {
attFileName = att->name();
}
mp->nodeHelper()->addTempFile(dir + QDir::separator() + attFileName);
const QString href = QLatin1String("file:") + dir + QDir::separator() + attFileName;
mp->nodeHelper()->addTempFile(dir + QLatin1Char('/') + attFileName);
const QString href = QLatin1String("file:") + dir + QLatin1Char('/') + attFileName;
const QString iconName = QUrl::fromLocalFile(MessageViewer::Util::iconPathForMimetype(att->mimeTag(),
KIconLoader::Desktop, attFileName)).url();
......
......@@ -140,7 +140,7 @@ public:
} else {
QImage img = a.photo().data();
const QString dir = msgPart->nodeHelper()->createTempDir(QLatin1String("vcard-") + a.uid());
const QString filename = dir + QDir::separator() + a.uid();
const QString filename = dir + QLatin1Char('/') + a.uid();
img.save(filename, "PNG");
msgPart->nodeHelper()->addTempFile(filename);
const QString href = QLatin1String("file:") + QLatin1String(QUrl::toPercentEncoding(filename));
......
......@@ -46,7 +46,7 @@ void GrantleeHeaderStylePluginTest::initTestCase()
QStandardPaths::setTestModeEnabled(true);
qputenv("LC_ALL", "C");
expectedDataLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
expectedDataLocation += QDir::separator() + QStringLiteral("messageviewer/themes");
expectedDataLocation += QStringLiteral("/messageviewer/themes");
QDir targetDir(expectedDataLocation);
QDir sourceDir(QStringLiteral(GRANTLEETHEME_DATA_DIR));
const auto themeDirs = sourceDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
......@@ -61,7 +61,7 @@ void GrantleeHeaderStylePluginTest::initTestCase()
const auto files = QDir(themeDir.absoluteFilePath()).entryInfoList(QDir::Files | QDir::Readable | QDir::NoSymLinks);
qDebug() << dirName << files;
for (const auto &file : files) {
const QString &newPath = dirName + QDir::separator() + file.fileName();
const QString &newPath = dirName + QLatin1Char('/') + file.fileName();
qDebug() << file << newPath;
QVERIFY(QFile(file.absoluteFilePath()).copy(newPath));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment