FindQHelpGenerator: avoid picking up Qt4 version
ClosedPublic

Authored by palimaka on Jun 17 2017, 10:44 AM.

Details

Summary

Passing NO_DEFAULT_PATH ignores $PATH and ensures that we use the
previously-detected Qt5 binary path.

Test Plan

qhelpgenerator is now picked up from the same location as Qt5::qmake. Before,
anything in $PATH was preferred even if it was the Qt 4 version.

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
palimaka created this revision.Jun 17 2017, 10:44 AM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptJun 17 2017, 10:44 AM
Restricted Application added a subscriber: Build System. · View Herald Transcript
palimaka updated this revision to Diff 15514.Jun 17 2017, 11:02 AM

Fix indentation.

kfunk accepted this revision.Jun 19 2017, 9:35 AM
This revision is now accepted and ready to land.Jun 19 2017, 9:35 AM
kossebau requested changes to this revision.Jun 19 2017, 12:22 PM

Thanks for the fix. Sadly this fails on my openSUSE TW system with system Qt5 packages, where _path is /usr/lib64/qt5/bin, and while that dir has both qhelpgenerator-qt5 and qhelpgenerator files, they are links pointing to the actual executable file located at /usr/bin/qhelpgenerator-qt5

lrwxrwxrwx 1 root root 31 28. Mai 12:40 /usr/lib64/qt5/bin/qhelpgenerator-qt5 -> ../../../bin/qhelpgenerator-qt5
lrwxrwxrwx 1 root root 31 28. Mai 12:40 /usr/lib64/qt5/bin/qhelpgenerator -> ../../../bin/qhelpgenerator-qt5

Still had no time to investigate some more why this fails.

(Actually it is not such an issue if the Qt4 version is used, it's working as well. But still using the latest version of qhelpgenerator, as provided by qt5, feels better -> "newer is better!")

This revision now requires changes to proceed.Jun 19 2017, 12:22 PM
kossebau accepted this revision.Jun 19 2017, 12:46 PM

Ah, PEBKAC, I only added NO_DEFAULT_PATH to the code when manually applying the patch. Fixing also PATH->PATHS improved things, and the executable now is found in ${_path}.

No more objection from my side :)

This revision is now accepted and ready to land.Jun 19 2017, 12:46 PM

@palimaka You have KDE push rights, correct? Will you have time this week to push this, or do you want someone/me to do that for you?
Would be good to have this in as soon as possible, given tagging release is <2 weeks away :)

So pushing now myself, so this todo can be checked off :)

This revision was automatically updated to reflect the committed changes.

Sorry for the delay, I was away. Thanks for pushing!