[KPhotoAlbum] Keywords with id=0?
rlk at alum.mit.edu
Sun Dec 15 15:11:23 GMT 2019
On Sat, 14 Dec 2019 20:27:26 -0500 (EST), Robert Krawitz wrote:
> On Sun, 15 Dec 2019 00:46:26 +0100, Johannes Zarl-Zierl wrote:
>> Am Samstag, 14. Dezember 2019, 22:45:57 CET schrieb Robert Krawitz:
>>> I'm seeing that somehow my index.xml has an item with id=0. I'm not
>>> quite sure how it happened; I know I was using the preferences dialog
>>> to add a new member-group and then I created more member-groups under
>> I can see several categories with id="0" as well. Checking my
>> index.xml backups it seems to be a long-standing issue: the first
>> category with id=0 was introduced in my index.xml in May 2017. By
>> itself, though that should not really be a problem (AFAICS id 0 is
>> not handled specially compared to other index numbers).
> I thought the indexes were supposed to start at 1, but OK. Let me
> know what it is, because I'm playing around with my kpa-merge script
> and can fix these problems. With an uncompressed file they're easy to
> fix, as the index isn't used for anything. With the compressed format
> it can't be fixed if there are duplicates.
Zero is *not* a valid index, from XMLDB/FileWriter.cpp:
if (category->idForName(member) == 0)
qCWarning(XMLDBLog) << "Member" << member << "in group" << categoryName << "->" << groupMapIt.key() << "has no id!";
And here's the git blame:
cf66aa988 (Johannes Zarl-Zierl 2019-07-19 00:43:14 +0200 235) if (category->idForName(member) == 0)
6dcea79ad (Johannes Zarl-Zierl 2018-01-02 21:56:09 +0100 236) qCWarning(XMLDBLog) << "Member" << member << "in group" << categoryName << "->" << groupMapIt.key() << "has no id!";
Robert Krawitz <rlk at alum.mit.edu>
*** MIT Engineers A Proud Tradition http://mitathletics.com ***
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
More information about the Kphotoalbum