From aa3ca15d8c82577156c04ca9e2311a11fde970ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= Date: Wed, 14 Aug 2013 08:50:55 -0700 Subject: Replaces QStringLiteral by QLatin1String MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QStringLiteral was introduced in Qt5. Change-Id: Id1942225a1a9758db7bc8e05df45223d13bf86dc Signed-off-by: Luís Pereira Reviewed-by: David Faure (KDE) --- .../qmimedatabase-cache/tst_qmimedatabase-cache.cpp | 5 +++-- tests/auto/qmimedatabase/tst_qmimedatabase.cpp | 16 ++++++++-------- 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)); } -- cgit v1.2.3