[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kcoreaddons] autotests: Fix compilation in Ubuntu 14.04
From:       Diego Iastrubni <elcuco () kde ! org>
Date:       2014-10-24 21:51:29
Message-ID: E1Xhmld-0003GP-HY () scm ! kde ! org
[Download RAW message or body]

Git commit dd8ee827ed3b88f1871d3265b6a66ebf99ad3f0c by Diego Iastrubni.
Committed on 24/10/2014 at 21:47.
Pushed by iastrubni into branch 'master'.

Fix compilation in Ubuntu 14.04

I have no idea how this was not cought up until now. But fix is trivial.
Use QStringLiteral instead of a "raw const char*"

M  +18   -18   autotests/desktoptojsontest.cpp

http://commits.kde.org/kcoreaddons/dd8ee827ed3b88f1871d3265b6a66ebf99ad3f0c

diff --git a/autotests/desktoptojsontest.cpp b/autotests/desktoptojsontest.cpp
index 0408c3c..64373d5 100644
--- a/autotests/desktoptojsontest.cpp
+++ b/autotests/desktoptojsontest.cpp
@@ -127,28 +127,28 @@ private Q_SLOTS:
             "[New Group]\n"
             "InWrongGroup=true\n";
 
-        expectedResult["Categories"] = "foo;bar;a\\;b";
-        expectedResult["CaseSensitive"] = "ABC";
-        expectedResult["CASESENSITIVE"] = "abc";
-        expectedResult["SpacesBeforeEq"] = "foo";
-        expectedResult["SpacesAfterEq"] = "foo";
-        expectedResult["SpacesBeforeKey"] = "foo";
-        expectedResult["SpacesAfterKey"] = "foo";
-        expectedResult["TrailingSpaces"] = "foo";
-        expectedResult["SpacesInValue"] = "Hello, World!";
-        expectedResult["EscapeSequences"] = "So me esc\nap\te se\\qu\re\\nces";
-        kpluginObj["Name"] = "Example";
-        kpluginObj["Name[de_DE]"] = "Beispiel";
-        kpluginObj["Category"] = "Examples";
+        expectedResult["Categories"] = QStringLiteral("foo;bar;a\\;b");
+        expectedResult["CaseSensitive"] = QStringLiteral("ABC");
+        expectedResult["CASESENSITIVE"] = QStringLiteral("abc");
+        expectedResult["SpacesBeforeEq"] = QStringLiteral("foo");
+        expectedResult["SpacesAfterEq"] = QStringLiteral("foo");
+        expectedResult["SpacesBeforeKey"] = QStringLiteral("foo");
+        expectedResult["SpacesAfterKey"] = QStringLiteral("foo");
+        expectedResult["TrailingSpaces"] = QStringLiteral("foo");
+        expectedResult["SpacesInValue"] = QStringLiteral("Hello, World!");
+        expectedResult["EscapeSequences"] = QStringLiteral("So me esc\nap\te \
se\\qu\re\\nces"); +        kpluginObj["Name"] = QStringLiteral("Example");
+        kpluginObj["Name[de_DE]"] = QStringLiteral("Beispiel");
+        kpluginObj["Category"] = QStringLiteral("Examples");
         kpluginObj["Dependencies"] = QJsonArray::fromStringList(QStringList() << \
                "foo" << "bar" << "esc,aped");
         kpluginObj["ServiceTypes"] = QJsonArray::fromStringList(QStringList());
         kpluginObj["EnabledByDefault"] = true;
-        kpluginObj["Version"] = "1.0";
+        kpluginObj["Version"] = QStringLiteral("1.0");
         QJsonObject compatResult = expectedResult;
-        compatResult["Name"] = "Example";
-        compatResult["Name[de_DE]"] = "Beispiel";
-        compatResult["X-KDE-PluginInfo-Category"] = "Examples";
-        compatResult["X-KDE-PluginInfo-Version"] = "1.0";
+        compatResult["Name"] = QStringLiteral("Example");
+        compatResult["Name[de_DE]"] = QStringLiteral("Beispiel");
+        compatResult["X-KDE-PluginInfo-Category"] = QStringLiteral("Examples");
+        compatResult["X-KDE-PluginInfo-Version"] = QStringLiteral("1.0");
         compatResult["X-KDE-PluginInfo-Depends"] = \
                QJsonArray::fromStringList(QStringList() << "foo" << "bar" << \
                "esc,aped");
         compatResult["X-KDE-ServiceTypes"] = \
QJsonArray::fromStringList(QStringList());  \
compatResult["X-KDE-PluginInfo-EnabledByDefault"] = true;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic