SUMMARY When investigating bug #423978, I realized that one can simply add any tag name to the tokens category. STEPS TO REPRODUCE 1. Open the annotation dialog for an image 2. Make sure that the Tokens category is visible 3. Add tag "test" to the Tokens category OBSERVED RESULT The tag "test" is added to the tokens category. EXPECTED RESULT The dialog should prevent the user from adding such a tag because this is bound to cause confusion and because the UI assumes that tokens only ever have values 'a' to 'z'. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
As it turns out, the same is also true for the media type and folder categories, which should be read-only entirely...
Git commit 68efacfc38c9d27442bcfd4f3ac53340d6f32d1f by Johannes Zarl-Zierl. Committed on 08/07/2020 at 22:09. Pushed by johanneszarl into branch 'master'. ListSelects now can be read-only or selectable-only. This fixes a long-standing oddity that allowed one to add arbitrary values to the computed categories "media type" and "folder", as well as add arbitrary (i.e. non-single-letter) tags to the "tokens" category. M +5 -1 AnnotationDialog/CompletableLineEdit.h M +40 -10 AnnotationDialog/ListSelect.cpp M +23 -2 AnnotationDialog/ListSelect.h M +11 -5 AnnotationDialog/enums.h M +2 -0 ChangeLog https://invent.kde.org/graphics/kphotoalbum/commit/68efacfc38c9d27442bcfd4f3ac53340d6f32d1f
Git commit 810bf443e397c9c86183f853a4256d819d7a6c65 by Johannes Zarl-Zierl. Committed on 17/07/2020 at 00:16. Pushed by johanneszarl into branch 'master'. ListSelect: really prevent read-only items from being changed Up until now, one could still check items of a read-only category. M +7 -1 AnnotationDialog/ListSelect.cpp https://invent.kde.org/graphics/kphotoalbum/commit/810bf443e397c9c86183f853a4256d819d7a6c65