https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #16 from Simon <[hidden email]> --- > --- Comment #15 from Mario Frank <[hidden email]> --- > Simon, polishing my patches is completely okay. > Just to be safe. Deleting the region, the identity and the connection from tag > to image is okay? I think deleting the region and identity by default, and asking about the tag is a sane behaviour. > Should I sync the metadata or not? What should I adopt in my patch? > Yes, metadata should be synced (always). However this is not done in many (if not all, I didn't check) methods of tagmodificationhelper. The other methods delete tags via AlbumManager and looking at the right tag sidebar, syncing metadata involves some fileworker interfaces. So this seems quite a big and separate fix that is not directly related to this. I discuss/solve that part in a new issue. Do you agree on Gilles proposition to change "Delete person tag" to "Remove Face Tag"? Another question: The patch introduced a new method with an sql query. In the existing code such queries are sometimes done directly via execSql, at other places via get-/exec- DBAction, so from dbconfig.xml.cmake.in . What decides whether a query gets into dbconfig.xml.cmake.in or whether it doesn't? And only for my education, so ignore at will: In the tagmodificationhelper methods, arguments are sometimes passed by reference (lists), sometimes not (single album) while both underlying types are pointers. Any particular reason for that? -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #17 from Mario Frank <[hidden email]> --- (In reply to Simon from comment #16) > > --- Comment #15 from Mario Frank <[hidden email]> --- > > Simon, polishing my patches is completely okay. > > Just to be safe. Deleting the region, the identity and the connection from tag > > to image is okay? > I think deleting the region and identity by default, and asking about > the tag is a sane behaviour. Okay. > > Should I sync the metadata or not? What should I adopt in my patch? > > > Yes, metadata should be synced (always). However this is not done in > many (if not all, I didn't check) methods of tagmodificationhelper. The > other methods delete tags via AlbumManager and looking at the right tag > sidebar, syncing metadata involves some fileworker interfaces. So this > seems quite a big and separate fix that is not directly related to this. > I discuss/solve that part in a new issue. Okay, I will look how to sync the metadata. > > Do you agree on Gilles proposition to change "Delete person tag" to > "Remove Face Tag"? Yes, I agree. I will adopt that. > > Another question: The patch introduced a new method with an sql query. > In the existing code such queries are sometimes done directly via > execSql, at other places via get-/exec- DBAction, so from > dbconfig.xml.cmake.in . > What decides whether a query gets into dbconfig.xml.cmake.in or whether > it doesn't? I cannot give a statement to this one. > > And only for my education, so ignore at will: > In the tagmodificationhelper methods, arguments are sometimes passed by > reference (lists), sometimes not (single album) while both underlying > types are pointers. Any particular reason for that? That's not easy to explain since there may be many reasons. Some are technical, some ideological. The difference is subtile. While complex (big) structures like single albums are handled in heap a list of X (e.g. pointers) is usually located in the stack. Consider that. A list of pointers with each pointer being 64 bit aka 8 byte does not take much space. Even if you store 100000, it's only 800000 byte aka 800 kilobyte. that's okay. But passing a list of this size by copy is expensive. Thus, you need a reference, to reduce the overhead. Also, you can modify the list in the called function. Whether you take a pointer or a ref does not make a difference (both collapse to 8 byte). But refs cannot be null, while pointers can. And if you know that you have an at least empty list, pointers do not make sense here. Passing a const pointer only forbids the manipulation of the pointer, but not the contents of the object. Passing a const ref list forbids altering the list. This is far more secure than passing a const pointer. Also, using pointers may indicate for other developers that the passed object is located in heap which may not be always the case. The developer could try to deallocate the object stored in stack which will impose errors. Though I do not think that this would compile. -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
Mario Frank <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103361|0 |1 is obsolete| | --- Comment #18 from Mario Frank <[hidden email]> --- Created attachment 103373 --> https://bugs.kde.org/attachment.cgi?id=103373&action=edit New patch for removing face tags Okay, I had to fix the dialog texts and some other stuff. Now, the actions are called "Remove Face Tag" and "Remove Face Tags", respectively. The dialog for untagging the tagged images after removing the face property has now Yes and No as options. The dialogs now explicitely state which face tags are still connected to some images and which face tags have subtags that are face tags, too. I also set What's this texts but they are not shown which is weird. Furthermore, in people sidebar, only "Remove Face Tag" and "Remove Face Tags" can be selected as actions. I removed "Delete Tag" and "Delete Tags" since these actions should be located only in tags sidebar. Otherwise, users may be confused about the semantics. And I think we should keep functionality where it fits best semantically. Thus, delete tags in tags sidebar and remove faces in people sidebar. Finally, I sync the tags metadata to the files - only the tags metadata. I get the image info for the files, load the metadata with metadata hub and use the function writeTags. I hope this is an appropriate way. I tested this functionality with showFoto and it worked. So, Please take a look. -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #19 from [hidden email] --- To Simon, from comment #16 "Another question: The patch introduced a new method with an sql query. In the existing code such queries are sometimes done directly via execSql, at other places via get-/exec- DBAction, so from dbconfig.xml.cmake.in . What decides whether a query gets into dbconfig.xml.cmake.in or whether it doesn't?" ==> SQL code can be portable between SQL engines. Currently mysql, mariadb, and sqlite. This is true for simple queries in tables. For complex queries, especially which touch the dB table structures, data join, or other SQL love, we need to wrap this code in a XML list with versioning rules, depending of DB structure version. So, if your SQL code is simple, and work everywhere, it can still in source code as well, else, it's more complex... -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #20 from [hidden email] --- To Mario, from comment #18: "Finally, I sync the tags metadata to the files - only the tags metadata. I get the image info for the files, load the metadata with metadata hub and use the function writeTags. I hope this is an appropriate way. I tested this functionality with showFoto and it worked." This want mean that tag are always sync in DB, and in file metadata if option is turned on, through MetadataHub ? If yes, it's the right way. I supose that by "testing with Showfoto" want mean to check metadata contents after to change tags inside digiKam. Showfoto do not support database and tags from digiKam. Gilles -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #21 from Mario Frank <[hidden email]> --- (In reply to caulier.gilles from comment #20) Hey Gilles, > To Mario, from comment #18: > > "Finally, I sync the tags metadata to the files - only the tags metadata. > I get the image info for the files, load the metadata with metadata hub and > use the function writeTags. > I hope this is an appropriate way. > I tested this functionality with showFoto and it worked." > > This want mean that tag are always sync in DB, and in file metadata if > option is turned on, through MetadataHub ? If yes, it's the right way. association from the images to the tag shall also be removed (if existent). If he confirms that, I delete the association of the tag to the image and sync the new tags for the images from database to the image. Like this: 1) Unassign the tag: imageTagAssociation.unAssignTag(); 2) get the modified image info, i.e. the new metadata: metadataHub.load(info); 3) write the new tags to the image file: metadataHub.writeTags(info.filePath()) > > I supose that by "testing with Showfoto" want mean to check metadata > contents after to change tags inside digiKam. Showfoto do not support > database and tags from digiKam. Exactly. After modifying the image in digiKam, i opened the Image in Showfoto and check the metadata. Result: everything as expected. > > Gilles -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #22 from Mario Frank <[hidden email]> --- Git commit 511ee541a76d22cef63ac9138dbe6f2cd037f808 by Mario Frank. Committed on 16/01/2017 at 09:20. Pushed by mfrank into branch 'master'. It is now possible to remove tags from people sidebar. This actions are called "Remove Face Tag" and "Remove Face Tags", respectively. The adoptions check if multiple face tags in the potential subtrees would be removed and asks the user for confirmation. Also, the adoptions tell the user which face tags are connected to images. The user can choose to remove not only the face tags but also the connection from the underlying tag to the affected images (untagging). If he confirms, the metadata is synced to the image files (with writeToMetadata) directly (if lazy sync is off). If lazy sync is activated, the metadata changes are enqueued. Furthermore, in people sidebar, only "Remove Face Tag" and "Remove Face Tags" can be selected as actions. I removed "Delete Tag" and "Delete Tags" since these actions should be located only in tags sidebar. Otherwise, users may be confused about the semantics. And I think we should keep functionality where it fits best semantically. Thus, delete tags in tags sidebar and remove faces in people sidebar. M +1 -1 NEWS M +22 -0 app/utils/contextmenuhelper.cpp M +6 -0 app/utils/contextmenuhelper.h M +1 -0 app/views/leftsidebarwidgets.cpp M +31 -0 libs/database/coredb/coredb.cpp M +10 -0 libs/database/coredb/coredb.h M +18 -0 libs/facesengine/facedb/facedb.cpp M +1 -0 libs/facesengine/facedb/facedb.h M +24 -2 libs/tags/tagfolderview.cpp M +9 -0 libs/tags/tagfolderview.h M +232 -0 libs/tags/tagmodificationhelper.cpp M +39 -0 libs/tags/tagmodificationhelper.h https://commits.kde.org/digikam/511ee541a76d22cef63ac9138dbe6f2cd037f808 -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
--- Comment #23 from Mario Frank <[hidden email]> --- (In reply to Mario Frank from comment #21) > > This want mean that tag are always sync in DB, and in file metadata if > > option is turned on, through MetadataHub ? If yes, it's the right way. To make it more precise: The tags are always in sync with DB. Now I write the metadata after confirmation with writeToMetadata. I think this is cleaner than with writeTags since writeTags does not evaluate the lazySync option. If lazy sync is off, the metadata is written directly to the file. I tested this with loading the image with showFoto. If lazySync option is turned on, the affected files are enqueued for later sync. I did not close this file since the deletion of metadata in tags sidebar is still open and part of this file. Cheers, Mario -- You are receiving this mail because: You are the assignee for the bug. |
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=374225
Mario Frank <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Version Fixed In| |5.5.0 Resolution|--- |FIXED Latest Commit| |https://commits.kde.org/dig | |ikam/2f8ddd42ef62d7aea9e490 | |cdb05ffcc644810c81 Status|UNCONFIRMED |RESOLVED --- Comment #24 from Mario Frank <[hidden email]> --- Git commit 2f8ddd42ef62d7aea9e490cdb05ffcc644810c81 by Mario Frank. Committed on 22/02/2017 at 15:05. Pushed by mfrank into branch 'master'. Merged the current state of the garbage collection branch which improves the database cleanup stage of the maintenance and improves the reactiveness of the maintenance overall. We ported the way items are processed to a queue based method that can use the CPUs more effectively and does not create thousands of threads. Related: bug 283062, bug 216895, bug 351658, bug 362023, bug 329353 FIXED-IN: 5.5.0 M +17 -12 NEWS https://commits.kde.org/digikam/2f8ddd42ef62d7aea9e490cdb05ffcc644810c81 -- You are receiving this mail because: You are the assignee for the bug. |
Free forum by Nabble | Edit this page |