summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuís Pereira <luis.artur.pereira@gmail.com>2013-08-14 08:50:55 -0700
committerLuís Pereira <luis.artur.pereira@gmail.com>2013-08-28 14:23:59 +0200
commitaa3ca15d8c82577156c04ca9e2311a11fde970ed (patch)
tree52dc60bd9a08c1ad237efe2d90bce94089cada87
parentcfe10226261e96e7adbd5abb6120081552dffa6f (diff)
Replaces QStringLiteral by QLatin1String
QStringLiteral was introduced in Qt5. Change-Id: Id1942225a1a9758db7bc8e05df45223d13bf86dc Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
-rw-r--r--tests/auto/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp5
-rw-r--r--tests/auto/qmimedatabase/tst_qmimedatabase.cpp16
2 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp b/tests/auto/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
index 53ad1ef..7a43573 100644
--- a/tests/auto/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
+++ b/tests/auto/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
@@ -49,7 +49,8 @@
void tst_QMimeDatabase::init()
{
- const QString mimeDirName = m_globalXdgDir + QStringLiteral("/mime");
+ const QString mimeDirName = m_globalXdgDir + QLatin1String("/mime");
+
runUpdateMimeDatabase(mimeDirName);
- QVERIFY(QFile::exists(mimeDirName + QStringLiteral("/mime.cache")));
+ QVERIFY(QFile::exists(mimeDirName + QLatin1String("/mime.cache")));
}
diff --git a/tests/auto/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/qmimedatabase/tst_qmimedatabase.cpp
index a2018a3..47e48ee 100644
--- a/tests/auto/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/qmimedatabase/tst_qmimedatabase.cpp
@@ -72,7 +72,7 @@ static inline QString testSuiteWarning()
QTextStream str(&result);
str << "\nCannot find the shared-mime-info test suite\nstarting from: "
<< QDir::toNativeSeparators(QDir::currentPath()) << "\n"
- "cd " << QDir::toNativeSeparators(QStringLiteral("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n"
+ "cd " << QDir::toNativeSeparators(QLatin1String("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n"
"wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-0.zip\n"
"unzip Release-1-0.zip\n";
#ifdef Q_OS_WIN
@@ -99,10 +99,10 @@ void tst_QMimeDatabase::initTestCase()
const QDir here = QDir(m_temporaryDir.path());
- m_globalXdgDir = m_temporaryDir.path() + QStringLiteral("/global");
- m_localXdgDir = m_temporaryDir.path() + QStringLiteral("/local");
+ m_globalXdgDir = m_temporaryDir.path() + QLatin1String("/global");
+ m_localXdgDir = m_temporaryDir.path() + QLatin1String("/local");
- const QString globalPackageDir = m_globalXdgDir + QStringLiteral("/mime/packages");
+ const QString globalPackageDir = m_globalXdgDir + QLatin1String("/mime/packages");
QVERIFY(here.mkpath(globalPackageDir) && here.mkpath(m_localXdgDir));
qputenv("XDG_DATA_DIRS", QFile::encodeName(m_globalXdgDir));
@@ -110,11 +110,11 @@ void tst_QMimeDatabase::initTestCase()
qDebug() << "\nLocal XDG_DATA_HOME: " << m_localXdgDir
<< "\nGlobal XDG_DATA_DIRS: " << m_globalXdgDir;
- const QString freeDesktopXml = QStringLiteral("freedesktop.org.xml");
+ const QString freeDesktopXml = QLatin1String("freedesktop.org.xml");
const QString xmlFileName = QLatin1String(CORE_SOURCES)
- + QStringLiteral("/mimetypes/mime/packages/")
+ + QLatin1String("/mimetypes/mime/packages/")
+ freeDesktopXml;
- QVERIFY2(QFileInfo(xmlFileName).exists(), qPrintable(xmlFileName + QStringLiteral(" does not exist")));
+ QVERIFY2(QFileInfo(xmlFileName).exists(), qPrintable(xmlFileName + QLatin1String(" does not exist")));
QFile xml(xmlFileName);
QVERIFY(xml.copy(globalPackageDir + '/' + freeDesktopXml));
@@ -869,7 +869,7 @@ void tst_QMimeDatabase::installNewLocalMimeType()
QFile::remove(destFile);
QVERIFY(QFile::copy(m_yastMimeTypes, destFile));
if (!runUpdateMimeDatabase(mimeDir)) {
- const QString skipWarning = QStringLiteral("shared-mime-info not found, skipping mime.cache test (")
+ const QString skipWarning = QLatin1String("shared-mime-info not found, skipping mime.cache test (")
+ QDir::toNativeSeparators(mimeDir) + QLatin1Char(')');
QSKIP(qPrintable(skipWarning));
}