tests: Port to QStringLiteral operator

This commit is contained in:
Jonas Kvinge
2024-10-20 23:19:38 +02:00
parent a9ea686577
commit 60f4a57425
9 changed files with 304 additions and 294 deletions

View File

@@ -28,6 +28,8 @@
#include <QString>
#include <QUrl>
using namespace Qt::Literals::StringLiterals;
std::ostream &operator<<(std::ostream &stream, const QString &str) {
stream << str.toStdString();
return stream;
@@ -62,7 +64,7 @@ void PrintTo(const ::QUrl &url, std::ostream &os) {
TemporaryResource::TemporaryResource(const QString &filename, QObject *parent) : QTemporaryFile(parent) {
setFileTemplate(QDir::tempPath() + QStringLiteral("/strawberry_test-XXXXXX.") + filename.section(u'.', -1, -1));
setFileTemplate(QDir::tempPath() + u"/strawberry_test-XXXXXX."_s + filename.section(u'.', -1, -1));
open();
QFile resource(filename);