SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION works fine until digiKam-8.2.0-20231120T151458
Git commit e0e44234d790026b3fce5a904133d323bfc65777 by Maik Qualmann. Committed on 01/12/2023 at 23:32. Pushed by mqualmann into branch 'master'. fix missing begin/end model reset, Qt6 requires it FIXED-IN: 8.3.0 M +2 -2 NEWS M +3 -0 core/libs/tags/engine/tagscompleter.cpp https://invent.kde.org/graphics/digikam/-/commit/e0e44234d790026b3fce5a904133d323bfc65777
There is another crash here when exiting the preview/scene, deep in Qt6. I'll take a look at that tomorrow. Maik
Maik, The code do not compile under Qt6.5.3 here: [ 36%] Building CXX object core/libs/models/CMakeFiles/gui_digikammodels_obj.dir/itemalbummodel.cpp.o /home/gilles/Devel/Devel/8.x/core/libs/tags/engine/tagscompleter.cpp: In member function ‘void Digikam::TagCompleter::update(const QString&)’: /home/gilles/Devel/Devel/8.x/core/libs/tags/engine/tagscompleter.cpp:145:30: error: ‘void QAbstractItemModel::beginResetModel()’ is protected within this context 145 | d->model->beginResetModel(); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /opt/qt6/include/QtWidgets/qcompleter.h:11, from /opt/qt6/include/QtWidgets/QCompleter:1, from /home/gilles/Devel/Devel/8.x/core/libs/tags/engine/tagscompleter.h:20, from /home/gilles/Devel/Devel/8.x/core/libs/tags/engine/tagscompleter.cpp:20: /opt/qt6/include/QtCore/qabstractitemmodel.h:392:10: note: declared protected here 392 | void beginResetModel(); | ^~~~~~~~~~~~~~~ /home/gilles/Devel/Devel/8.x/core/libs/tags/engine/tagscompleter.cpp:202:28: error: ‘void QAbstractItemModel::endResetModel()’ is protected within this context 202 | d->model->endResetModel(); | ~~~~~~~~~~~~~~~~~~~~~~~^~ /opt/qt6/include/QtCore/qabstractitemmodel.h:393:10: note: declared protected here 393 | void endResetModel(); | ^~~~~~~~~~~~~ make[2]: *** [core/libs/tags/CMakeFiles/gui_digikamtags_obj.dir/build.make:188: core/libs/tags/CMakeFiles/gui_digikamtags_obj.dir/engine/tagscompleter.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:9488: core/libs/tags/CMakeFiles/gui_digikamtags_obj.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 36%] Building CXX object core/utilities/imageeditor/CMakeFiles/gui_imageeditorgui_obj.dir/main/imagewindow_setup.cpp.o [ 36%] Built target gui_lighttable_obj [ 36%] Building CXX object core/utilities/imageeditor/CMakeFiles/gui_imageeditorgui_obj.dir/main/imagewindow_config.cpp.o [ 36%] Building CXX object core/libs/models/CMakeFiles/gui_digikammodels_obj.dir/itemalbumfiltermodel.cpp.o [ 36%] Built target gui_digikammodels_obj [ 36%] Building CXX object core/utilities/imageeditor/CMakeFiles/gui_imageeditorgui_obj.dir/main/imagewindow_import.cpp.o [ 36%] Built target gui_imageeditorgui_obj make: *** [Makefile:146: all] Error 2 Gilles
Git commit 0499a54ac935c30c710c2aff1e92289f27792edb by Maik Qualmann. Committed on 02/12/2023 at 07:56. Pushed by mqualmann into branch 'master'. revert model reset M +0 -14 core/libs/tags/engine/tagscompleter.cpp https://invent.kde.org/graphics/digikam/-/commit/0499a54ac935c30c710c2aff1e92289f27792edb
Yes, I'm also surprised that it's compiled here, since the functions are protected. But it's the cause, I'm looking for another solution, could also be a bug in Qt6. Maik
My build folder wasn't clean, so it seemed to compile. Maik
Hi Maik, Look in source code, beginResetModel() and endResetModel() is only called in derived classes from QModel* Gilles
Git commit 83b05dfd1bbcf582e30118f804539cee3faf3e8b by Maik Qualmann. Committed on 02/12/2023 at 23:16. Pushed by mqualmann into branch 'master'. fix crash in the TagCompleter when model changes In Qt6, the QCompleter::setModel() function uses the move constructor. That's really not nice, as it causes us to lose our QStandardItemModel. This clearly shows the problem of the move constructor. This should definitely be communicated in the Qt doc. M +5 -9 core/libs/tags/engine/tagscompleter.cpp https://invent.kde.org/graphics/digikam/-/commit/83b05dfd1bbcf582e30118f804539cee3faf3e8b
Git commit 1009320c87bbd465a9794aaf175176e0f3741b79 by Maik Qualmann. Committed on 03/12/2023 at 12:32. Pushed by mqualmann into branch 'master'. we need different code for Qt5/6 M +44 -2 core/libs/tags/engine/tagscompleter.cpp https://invent.kde.org/graphics/digikam/-/commit/1009320c87bbd465a9794aaf175176e0f3741b79