D27999: [DesktopExecParser] Open {ssh, telnet, rlogin}:// urls with ktelnetservice

David Faure noreply at phabricator.kde.org
Thu Mar 12 21:23:14 GMT 2020


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> krununittest.cpp:245
> +        QCOMPARE(KShell::joinArgs(parser.resultingArguments()),
> +                 QStringLiteral("/usr/bin/ktelnetservice5 %1://root at 10.1.1.1").arg(protocol));
> +    }

Wait, I didn't notice before, but this is broken.
On my system it's in another prefix.
On Windows it won't be in /usr/bin either.
You need to either strip out the path, or use QStandardPaths::findExecutable("ktelnetservice5") in an arg() for that expected value.

> dfaure wrote in krununittest.cpp:238
> QFINDTESTDATA() is more flexible than a solution like CMAKE_SOURCE_DIR [e.g. it allows deploying unittests to android devices]. It's also simpler to use (no buildsystem change).

Good practice is to follow that with QVERIFY(!ktelnet.isEmpty());

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D27999

To: ahmadsamir, #frameworks, dfaure, sitter, meven, feverfew
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200312/bcb25b18/attachment.html>


More information about the Kde-frameworks-devel mailing list