Warning, /graphics/digikam/project/patches/Remove_face_tags_from_Recently_Used_Tags_context_menu.patch is written in an unsupported language. File is not indexed.
0001 diff --git a/core/libs/database/coredb/coredb.cpp b/core/libs/database/coredb/coredb.cpp 0002 index f3b2ce0827..c26b7e19e0 100644 0003 --- a/core/libs/database/coredb/coredb.cpp 0004 +++ b/core/libs/database/coredb/coredb.cpp 0005 @@ -65,11 +65,9 @@ public: 0006 0007 static const QString configGroupName; 0008 static const QString configRecentlyUsedTags; 0009 - static const QString configRecentlyUsedFaceTags; 0010 0011 CoreDbBackend* db; 0012 QList<int> recentlyAssignedTags; 0013 - QList<int> recentlyAssignedFaceTags; 0014 0015 int uniqueHashVersion; 0016 0017 @@ -81,7 +79,6 @@ public: 0018 0019 const QString CoreDB::Private::configGroupName(QLatin1String("CoreDB Settings")); 0020 const QString CoreDB::Private::configRecentlyUsedTags(QLatin1String("Recently Used Tags")); 0021 -const QString CoreDB::Private::configRecentlyUsedFaceTags(QLatin1String("Recently Used Face Tags")); 0022 0023 QString CoreDB::Private::constructRelatedImagesSQL(bool fromOrTo, DatabaseRelation::Type type, bool boolean) 0024 { 0025 @@ -3063,26 +3060,13 @@ void CoreDB::addItemTag(qlonglong imageID, int tagID) 0026 if (TagsCache::instance()->isInternalTag(tagID)) 0027 return; 0028 0029 - //don't mix face tags and common tags 0030 - if (TagsCache::instance()->hasProperty(tagID, TagPropertyName::person())) 0031 - { 0032 - //move current tag to front 0033 - d->recentlyAssignedFaceTags.removeAll(tagID); 0034 - d->recentlyAssignedFaceTags.prepend(tagID); 0035 + //move current tag to front 0036 + d->recentlyAssignedTags.removeAll(tagID); 0037 + d->recentlyAssignedTags.prepend(tagID); 0038 0039 - if (d->recentlyAssignedFaceTags.size() > 10) 0040 - { 0041 - d->recentlyAssignedFaceTags.removeLast(); 0042 - } 0043 - } else { 0044 - //move current tag to front 0045 - d->recentlyAssignedTags.removeAll(tagID); 0046 - d->recentlyAssignedTags.prepend(tagID); 0047 - 0048 - if (d->recentlyAssignedTags.size() > 10) 0049 - { 0050 - d->recentlyAssignedTags.removeLast(); 0051 - } 0052 + if (d->recentlyAssignedTags.size() > 10) 0053 + { 0054 + d->recentlyAssignedTags.removeLast(); 0055 } 0056 } 0057 0058 @@ -3124,11 +3108,6 @@ QList<int> CoreDB::getRecentlyAssignedTags() const 0059 return d->recentlyAssignedTags; 0060 } 0061 0062 -QList<int> CoreDB::getRecentlyAssignedFaceTags() const 0063 -{ 0064 - return d->recentlyAssignedFaceTags; 0065 -} 0066 - 0067 void CoreDB::removeItemTag(qlonglong imageID, int tagID) 0068 { 0069 d->db->execSql(QString::fromUtf8("DELETE FROM ImageTags " 0070 @@ -4547,7 +4526,6 @@ void CoreDB::readSettings() 0071 KConfigGroup group = config->group(d->configGroupName); 0072 0073 d->recentlyAssignedTags = group.readEntry(d->configRecentlyUsedTags, QList<int>()); 0074 - d->recentlyAssignedFaceTags = group.readEntry(d->configRecentlyUsedFaceTags, QList<int>()); 0075 } 0076 0077 void CoreDB::writeSettings() 0078 @@ -4556,7 +4534,6 @@ void CoreDB::writeSettings() 0079 KConfigGroup group = config->group(d->configGroupName); 0080 0081 group.writeEntry(d->configRecentlyUsedTags, d->recentlyAssignedTags); 0082 - group.writeEntry(d->configRecentlyUsedFaceTags, d->recentlyAssignedFaceTags); 0083 } 0084 0085 } // namespace Digikam 0086 diff --git a/core/libs/database/coredb/coredb.h b/core/libs/database/coredb/coredb.h 0087 index bbafd4865e..d87635ce01 100644 0088 --- a/core/libs/database/coredb/coredb.h 0089 +++ b/core/libs/database/coredb/coredb.h 0090 @@ -373,12 +373,6 @@ public: 0091 //TODO move to other place (AlbumManager) 0092 QList<int> getRecentlyAssignedTags() const; 0093 0094 - /** 0095 - * Get a list of recently assigned face tags (only last 6 face tags are listed) 0096 - * @return the list of recently assigned face tags 0097 - */ 0098 - QList<int> getRecentlyAssignedFaceTags() const; 0099 - 0100 /** 0101 * Deletes a tag from the database. This will not delete the 0102 * subtags of the tag.