Created attachment 145895 [details] Change QScopedPointer get to data (fix FTBFS with Qt 5.9.5) SUMMARY digiKam 7.5.0 FTBFS with Qt 5.9.5 due introducing use of code requiring a newer Qt version. STEPS TO REPRODUCE 1. Download digiKam 7.5.0 source and extract. 2. Attempt building source using pbuilder in a clean chroot with all appropriate build dependencies. 3. Build fails with errors as described below. OBSERVED RESULT The build fails with two distinct errors: 1) due use of QScopedPointer get function (Qt >= 5.11) in this file: core/utilities/geolocation/geoiface/tiles/abstractmarkertiler.cpp 2) due use of key_value_iterator (Qt >= 5.10) in this file (iNaturalist): core/dplugins/generic/webservices/inaturalist/inattalker.cpp EXPECTED RESULT That the build succeeds with Qt 5.9.5 as Qt 5.9 is (still, for now!) listed as a sufficient minimum Qt build dependency for digiKam. SOFTWARE/OS VERSIONS Windows: n/a macOS: n/a Linux/KDE Plasma: Ubuntu 18.04 / KDE 5.44 (available in About System) KDE Plasma Version: 5.44 KDE Frameworks Version: 5.44 Qt Version: 5.9.5 ADDITIONAL INFORMATION Changing the QScopedPointer get call to a data call fixes the first issue, as per bug 440313 (see attached patch). However, the use of key_value_iterator is more complex (for myself, not a C++ or Qt programmer!) and after a couple hours looking at how to rework the new slotTimeout function in the iNaturalist plugin with Qt 5.9 compatible iterators it was not obvious to me what would be functionally equivalent. So for a successful "unofficial" Ubuntu 18.04 build at the digiKam PPA that I maintain the temporary solution was to remove the entire new slotTimeout function from the iNaturalist plugin, specifically removing relevant code from these two files: core/dplugins/generic/webservices/inaturalist/inattalker.cpp core/dplugins/generic/webservices/inaturalist/inattalker.h No doubt there is a way to rework slotTimeout to use Qt 5.9 compatible iterators, such that anyone running an older system who uploads to iNaturalist will have the new timeout functionality as well. Official documentation of relevance for the two issues: 1) https://doc.qt.io/archives/qt-5.11/qscopedpointer.html 2) https://doc.qt.io/archives/qt-5.10/qhash.html
Git commit f174d5cf715433084a3b5874a7908052f24234c2 by Maik Qualmann. Committed on 25/01/2022 at 07:07. Pushed by mqualmann into branch 'master'. apply patch #145895 from Rob Savoury to fix compile under Qt-5.9.0 M +1 -1 core/utilities/geolocation/geoiface/tiles/abstractmarkertiler.cpp https://invent.kde.org/graphics/digikam/commit/f174d5cf715433084a3b5874a7908052f24234c2
Git commit aa19e4afddbdac9e2d0dbe89dadfd93db0856679 by Maik Qualmann. Committed on 25/01/2022 at 07:26. Pushed by mqualmann into branch 'master'. fix use of QKeyValueIterator for Qt < 5.10 M +6 -6 core/dplugins/generic/webservices/inaturalist/inattalker.cpp https://invent.kde.org/graphics/digikam/commit/aa19e4afddbdac9e2d0dbe89dadfd93db0856679
Hi Rob, please test if everything compiles fine now under Qt-5.9.5. Maik
(In reply to Maik Qualmann from comment #3) > Hi Rob, please test if everything compiles fine now under Qt-5.9.5. > > Maik Hi Maik, everything compiles fine now for Qt 5.9.5 and thanks for the quick response and fix! Rob
Thanks Rob to contribute. Gilles Caulier