diff --git a/autotests/kpluginloadertest.cpp b/autotests/kpluginloadertest.cpp --- a/autotests/kpluginloadertest.cpp +++ b/autotests/kpluginloadertest.cpp @@ -252,8 +252,8 @@ // only jsonplugin, since unversionedplugin has no json metadata QList plugins = KPluginLoader::instantiatePlugins(temp.path()); QCOMPARE(plugins.size(), 2); - QStringList classNames = QStringList() << plugins[0]->metaObject()->className() - << plugins[1]->metaObject()->className(); + QStringList classNames = QStringList() << QString::fromLatin1(plugins[0]->metaObject()->className()) + << QString::fromLatin1(plugins[1]->metaObject()->className()); classNames.sort(); QCOMPARE(classNames[0], QStringLiteral("jsonplugin2")); QCOMPARE(classNames[1], QStringLiteral("jsonpluginfa")); @@ -295,8 +295,8 @@ QVERIFY(!QDir::isAbsolutePath(subDirName)); plugins = KPluginLoader::instantiatePlugins(subDirName); QCOMPARE(plugins.size(), 2); - classNames = QStringList() << plugins[0]->metaObject()->className() - << plugins[1]->metaObject()->className(); + classNames = QStringList() << QString::fromLatin1(plugins[0]->metaObject()->className()) + << QString::fromLatin1(plugins[1]->metaObject()->className()); classNames.sort(); QCOMPARE(classNames[0], QStringLiteral("jsonplugin2")); QCOMPARE(classNames[1], QStringLiteral("jsonpluginfa")); diff --git a/autotests/kprocesstest.cpp b/autotests/kprocesstest.cpp --- a/autotests/kprocesstest.cpp +++ b/autotests/kprocesstest.cpp @@ -44,9 +44,9 @@ { QProcess p; p.setProcessChannelMode(QProcess::MergedChannels); - p.start(gargv[0], QStringList() << QString::number(how) << QStringLiteral("--nocrashhandler")); + p.start(QString::fromLatin1(gargv[0]), QStringList() << QString::number(how) << QString::fromLatin1("--nocrashhandler")); p.waitForFinished(); - return p.readAllStandardOutput(); + return QString::fromLatin1(p.readAllStandardOutput()); } #define EOUT "foo - stdout" @@ -58,7 +58,7 @@ #define EO EOUT "\n" #define EE EERR "\n" #define TESTCHAN(me,ms,pout,rout,rerr) \ - e = "mode: " ms "\n" POUT pout ROUT rout RERR rerr; \ + e = QStringLiteral("mode: " ms "\n" POUT pout ROUT rout RERR rerr); \ a = "mode: " ms "\n" + recurse(KProcess::me); \ QCOMPARE(a, e) @@ -85,20 +85,21 @@ #else KProcess p; - p.setShellCommand("cat"); + p.setShellCommand(QStringLiteral("cat")); QCOMPARE(p.program().count(), 1); - QCOMPARE(p.program().at(0), QStandardPaths::findExecutable("cat")); - QVERIFY(p.program().at(0).endsWith("/bin/cat")); - p.setShellCommand("true || false"); - QCOMPARE(p.program(), QStringList() << "/bin/sh" << "-c" << "true || false"); + QCOMPARE(p.program().at(0), QStandardPaths::findExecutable(QStringLiteral("cat"))); + QVERIFY(p.program().at(0).endsWith(QStringLiteral("/bin/cat"))); + p.setShellCommand(QStringLiteral("true || false")); + QCOMPARE(p.program(), QStringList() << QString::fromLatin1("/bin/sh") << QString::fromLatin1("-c") + << QString::fromLatin1("true || false")); #endif } static void recursor(char **argv) { if (argv[1]) { KProcess p; - p.setShellCommand("echo " EOUT "; echo " EERR " >&2"); + p.setShellCommand(QString::fromLatin1("echo " EOUT "; echo " EERR " >&2")); p.setOutputChannelMode(static_cast(atoi(argv[1]))); fputs(POUT, stdout); fflush(stdout);