diff --git a/autotests/krununittest.cpp b/autotests/krununittest.cpp --- a/autotests/krununittest.cpp +++ b/autotests/krununittest.cpp @@ -235,20 +235,16 @@ void KRunUnitTest::testKtelnetservice() { - const QString ktelnetDesk = QFINDTESTDATA(QStringLiteral("../src/ioslaves/telnet/ktelnetservice5.desktop")); - QVERIFY(!ktelnetDesk.isEmpty()); + const QString ktelnetDesk = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, QStringLiteral("ktelnetservice5.desktop")); + const QString ktelnetExec = QStandardPaths::findExecutable(QStringLiteral("ktelnetservice5")); - QString ktelnetExec = QStandardPaths::findExecutable(QStringLiteral("ktelnetservice5")); + if (ktelnetDesk.isEmpty() || ktelnetExec.isEmpty()) { + qWarning() << "ktelnetservice5 not found, skippping test"; + return; + } const KService service(ktelnetDesk); - // if KIO is installed we'll find /ktelnetservice5, otherwise KIO::DesktopExecParser will - // use the executable from Exec= line - if (ktelnetExec.isEmpty()) { - ktelnetExec = service.exec().remove(QLatin1String(" %u")); - } - QVERIFY(!ktelnetExec.isEmpty()); - const QStringList protocols({QStringLiteral("ssh"), QStringLiteral("telnet"), QStringLiteral("rlogin")}); for (const QString &protocol : protocols) { QList urls({QUrl(QStringLiteral("%1://root@10.1.1.1").arg(protocol))});