D29089: Dolphin Service Menu Installer: Launch certain scripts in Konsole
Elvis Angelaccio
noreply at phabricator.kde.org
Mon Apr 27 00:15:16 BST 2020
elvisangelaccio added inline comments.
INLINE COMMENTS
> servicemenuinstaller.cpp:55-64
> +void startGUIProcess(QProcess &process, const QString &command, const QStringList &args, bool gui)
> +{
> + const static bool konsoleAvailable = !QStandardPaths::findExecutable("konsole").isEmpty();
> + if (konsoleAvailable && gui) {
> + // TODO Use --hold option?
> + process.start("konsole", QStringList() << "-e" << "bash" << "-c" << command << args, QIODevice::NotOpen);
> + } else {
Given that this function is very simple and it's only called in one place, I'd just put the logic in `runScriptOnce()`.
> servicemenuinstaller.cpp:140
>
> -bool runScriptOnce(const QString &path, const QStringList &args)
> +bool runScriptOnce(const QString &path, const QStringList &args, bool gui = false)
> {
enums should be preferred to booleans as arguments in API.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D29089
To: alex, #dolphin, ngraham, nicolasfella, elvisangelaccio, meven
Cc: kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200426/431b25f9/attachment.htm>
More information about the kfm-devel
mailing list