Due to Qt not providing OOTB support for parallel installation of different
base versions (like Qt4 and Qt5), Linux distributions have separated into
different approaches how to name the Qt tools like qmake and qdbus.
Many use -qt4 and -qt5 suffixes and link the normal name to a variant, e.g.
controlled by a custom tool qtchooser. Others kept the Qt4 versions to stay
with the names, and only added a suffix -qt5 to the new ones.
Details
There is no longer a warning about missing qtdbus in the embedded konsole on
opening. The commands like search! & Co. work again.
Diff Detail
- Repository
- R32 KDevelop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Yes, that was my starting patch, but then I got unsure about the great picture.
If going this route, any shell script wizard proposal how to change checkToolsInPath in kdevplatform_shell_environment.sh to check for both variants, without adding too much boilerplate code?
kdevelop! I had changed to if ! [ "$(which qdbus-qt5)$(which qdbus)" ]; then which should work fine, no?
What about this:
qdbus_exe=$(which qdbus-qt5 qdbus 2>/dev/null | head -n1) if [ -z "${qdbus_exe}" ]; then checkToolsInPath qdbus-qt5; fi $qdbus_exe $KDEV_DBUS_ID etc.
`kdevelop!` I had changed to `if ! [ "$(which qdbus-qt5)$(which qdbus)" ]; then` which should work fine, no?
Looks fine to me, but doesn't the other script check for its presence already?
Thanks. Small issue I have with this that it would result in the error message only talking about qdbus-qt5, which might be a name not making sense on some platforms. Instead proposing in the updated patch to use some explicit custom code, with custom warning.
`kdevelop!` I had changed to `if ! [ "$(which qdbus-qt5)$(which qdbus)" ]; then` which should work fine, no?Looks fine to me, but doesn't the other script check for its presence already?
Not exactly sure why this is, so left that aspect untouched for now.
- use custom explicit checkToolsInPath code for qdbus variants
- avoid error print from "which" in kdevelop!
kdevplatform/util/kdevplatform_shell_environment.sh | ||
---|---|---|
74 | I used _qdbus to follow _shell, but then the naming patterns seems not consistent. I preferred qdbus over qdbus-qt5, as the latter seems he exception. But no fixed opinion, there are arguments for both orders. Why the "too"? |
kdevplatform/util/kdevplatform_shell_environment.sh | ||
---|---|---|
74 |
Reasoning here: qdbus could resemble the Qt4-Version of qdbus in case there are multiple installs of Qt; qdbus-qt5 never is. Thus using qdbus-qt5 as first option is more fail-safe.
Well, kdevelop! first checks qdbus-qt5 -- but otoh order is not important there.
Ah, okay, that wasn't obvious from the diff: Use whatever you prefer, and what appears consistent in this file. _qdbus then, if you prefer. |