[KPhotoAlbum] Member group containing nonexistent member

Joe josephj at main.nc.us
Tue Mar 12 06:39:49 GMT 2019


On 3/11/19 5:04 PM, Johannes Zarl-Zierl wrote:
> Am Sonntag, 3. März 2019, 04:22:32 CET schrieb Robert Krawitz:
>> I found that my index.xml file had this:
>>
>>         <member category="Keywords" group-name="Basketball"
>> members="202,203,204,205,206,207,208,216,219,220,221,222,223,224,225,226,22
>> 9,230,231,233,234,235,236,240,241,242,243,244,245,246,247,248,249,250,251,25
>> 3,254,255,257,259,263,264,265,266,267,268,269,270,271,272,273,276,279,280,28
>> 1,282,283,284,285,286,287,288,301,437,438,439,440,441,442,443,446,449,452,45
>> 3,454,457,458,483,488,489,492,493,495,496,497,500,501,502,505,512,513,514,51
>> 6,521,522"/>
>>
>> but I (currently, at any rate) don't have a keyword with ID 522 in my
>> index.xml file.  I'm not sure exactly how this came about; I know I
>> was trying to rearrange things and things went a bit strange when I
>> tried to move certain categories under others.
> I'm quite puzzled by this. In my understanding, if when reading index.xml 
> nameForId() does not find a name, nothing is inserted. So the ID 522 in your 
> database should vanish as soon as you save the database.
>
>> I also have some empty member groups, e. g.:
>>
>>         <member category="Keywords" group-name="MIT-Clark, Feb. 27, 2009"
>> members=""/>
>>
>> that presumably should get pruned at least when the file is saved.
> FWIW this is a design decision:
>
>> // XMLDB::FileReader::loadMemberGroups():
>> if(members.size() == 0) {
>>   // Groups are stored even if they are empty, so we also have to read them.
>>   // With no members, the above for loop will not be executed.
>>   m_db->m_members.addGroup(category, group);
>> }
> I have no clue why we do it this way, though...
>
>   Johannes
>
>
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at mail.kdab.com
> https://mail.kdab.com/mailman/listinfo/kphotoalbum

Just some thoughts:

Is it possible to keep all the categories, etc. from one set of pictures
and use them on a second set?

If it is, then keeping empty groups would be useful. If it's not about
pictures and just groups of tags with other tags within them, etc., then
if I'm maintaining a group and I delete its last member and don't add
another one in that session, I would still expect the group to be there
later so I could add members to it.

Joe



More information about the Kphotoalbum mailing list