Cppcheck found an issue with the order of the function arguments between declaration and definition in latest git sources: Id: funcArgOrderDifferent Summary: Function 'getImageIdsFromArea' argument order different: declaration 'lat1, lng1, lat2, lng2, sortMode, sortBy' definition 'lat1, lat2, lng1, lng2, , ' Declaration in coredb.h: QList<QVariant> getImageIdsFromArea(qreal lat1, qreal lng1, qreal lat2, qreal lng2, int sortMode, const QString& sortBy); Definition in coredb.cpp: QList<QVariant> CoreDB::getImageIdsFromArea(qreal lat1, qreal lat2, qreal lng1, qreal lng2, int /*sortMode*/, const QString& /*sortBy*/) One of them must be wrong. I do not know if it results in an error currently, but i guess it is better to fix it.
The place where this function is used is this one : QList<QVariant> imagesInfoFromArea = CoreDbAccess().db()->getImageIdsFromArea(m_jobInfo.lat1(), m_jobInfo.lat2(), m_jobInfo.lng1(), m_jobInfo.lng2(), 0, QLatin1String("rating")); ... from GPSJob class. So the right order is lattitude x2 , longitude x2. Into CoreDB::getImageIdsFromArea(), the argument are serialized into a QList<Qvariant> and passed to the DB interface to build the query. So just the coredb.h file must be modified. Thank to ccpcheck to find the mess in arguments order. Gilles Caulier
Git commit e44632338a2ce8af7883d657a8a0201b79f7d6c4 by Gilles Caulier. Committed on 27/03/2018 at 13:55. Pushed by cgilles into branch 'master'. fix arg order mess detected by ccpcheck FIXED-IN: 6.0.0 M +1 -1 core/libs/database/coredb/coredb.h https://commits.kde.org/digikam/e44632338a2ce8af7883d657a8a0201b79f7d6c4
Sebastian, Just for info, we have a Jenkins CI running on KDE server to check code and more... Look here : https://build.kde.org/job/Extragear%20digikam%20kf5-qt5%20SUSEQt5.9/ ANother static analyzer source code script running over digiKam is Krazy. This give another reports, more focused on Qt like source code (ccpcheck is more generic) : http://ebn.kde.org/krazy/reports/extragear/graphics/digikam/ All patches to fixes warnings from these tools are welcome... BEst Gilles Caulier