Commit f2a14a01 authored by Gilles Caulier's avatar Gilles Caulier 🗼

Merge branch 'master' of invent.kde.org:kde/digikam

parents c455bd47 5643478a
......@@ -736,4 +736,5 @@ BUGFIXES:
700 ==> 406461 - Can't update from V9 to V10.
701 ==> 421361 - Removing a keyboard shortcut crashes Digikam.
702 ==> 421387 - Camera Leica V-Lux (Typ 114) not supported.
703 ==>
703 ==> 421023 - Face tagging quirky in digiKam 7.0.0-beta3.
704 ==>
......@@ -816,7 +816,9 @@ private Q_SLOTS:
Q_SIGNALS:
void signalFaceCountsDirty(const QMap<int, int>&, const QMap<int, int>&);
void signalFaceCountsDirty(const QMap<int, int>& faceCount,
const QMap<int, int>& uFaceCount,
const QList<int>& toUpdatedFaces);
//@}
......
......@@ -108,7 +108,9 @@ void AlbumManager::slotPeopleJobData(const QMap<QString, QMap<int, int> >& faces
}
}
emit signalFaceCountsDirty(d->fAlbumsCount, d->uAlbumsCount);
emit signalFaceCountsDirty(d->fAlbumsCount, d->uAlbumsCount, d->toUpdatedFaces);
d->toUpdatedFaces.clear();
}
} // namespace Digikam
......@@ -196,8 +196,9 @@ public:
QMap<int, int> tAlbumsCount;
QMap<YearMonth, int> dAlbumsCount;
QMap<int, int> fAlbumsCount;
//Unconfirmed face counts
// Unconfirmed face counts
QMap<int, int> uAlbumsCount;
QList<int> toUpdatedFaces;
public:
......
......@@ -951,12 +951,6 @@ void AlbumManager::slotTagChange(const TagChangeset& changeset)
break;
case TagChangeset::Updated:
// Start the timer new for fewer events
d->scanTAlbumsTimer->start();
break;
case TagChangeset::Renamed:
case TagChangeset::IconChanged:
/**
......@@ -966,7 +960,7 @@ void AlbumManager::slotTagChange(const TagChangeset& changeset)
case TagChangeset::PropertiesChanged:
{
TAlbum* tag = findTAlbum(changeset.tagId());
TAlbum* const tag = findTAlbum(changeset.tagId());
if (tag)
{
......@@ -1000,6 +994,14 @@ void AlbumManager::slotImageTagChange(const ImageTagChangeset& changeset)
// Thus, the count of entries in face tags are not
// updated. This adoption should fix the problem.
case ImageTagChangeset::PropertiesChanged:
{
foreach (int id, changeset.tags())
{
if (!d->toUpdatedFaces.contains(id))
{
d->toUpdatedFaces << id;
}
}
if (!d->tagItemCountTimer->isActive())
{
......@@ -1007,6 +1009,7 @@ void AlbumManager::slotImageTagChange(const ImageTagChangeset& changeset)
}
break;
}
default:
break;
......
......@@ -1279,7 +1279,6 @@ void CoreDB::addImageTagProperty(qlonglong imageId, int tagId, const QString& pr
imageId, tagId, property, value);
d->db->recordChangeset(ImageTagChangeset(imageId, tagId, ImageTagChangeset::PropertiesChanged));
//d->db->recordChangeset(TagChangeset(tagId, TagChangeset::Updated));
}
void CoreDB::addImageTagProperty(const ImageTagProperty& property)
......@@ -1315,7 +1314,6 @@ void CoreDB::removeImageTagProperties(qlonglong imageId, int tagId, const QStrin
}
d->db->recordChangeset(ImageTagChangeset(imageId, tagId, ImageTagChangeset::PropertiesChanged));
//d->db->recordChangeset(TagChangeset(tagId, TagChangeset::Updated));
}
ItemShortInfo CoreDB::getItemShortInfo(qlonglong imageID) const
......
......@@ -287,7 +287,6 @@ public:
Moved,
Deleted,
Renamed,
Updated,
Reparented,
IconChanged,
PropertiesChanged /// ImageTagProperties Table
......
......@@ -170,10 +170,31 @@ void TagModel::setTagCount(TagCountMode mode)
else
{
connect(AlbumManager::instance(), &AlbumManager::signalFaceCountsDirty,
[=](const QMap<int, int> &faceCount, const QMap<int, int>& unconfirmedFaceCount)
[=](const QMap<int, int>& faceCount,
const QMap<int, int>& uFaceCount,
const QList<int>& toUpdatedFaces)
{
setCountMap(faceCount);
m_unconfirmedFaceCount = unconfirmedFaceCount;
m_unconfirmedFaceCount = uFaceCount;
foreach (int id, toUpdatedFaces)
{
Album* const album = albumForId(id);
if (!album)
{
continue;
}
QModelIndex index = indexForAlbum(album);
if (!index.isValid())
{
continue;
}
emit dataChanged(index, index);
}
});
setCountMap(AlbumManager::instance()->getFaceCount());
......
......@@ -149,7 +149,7 @@ else() #Linux
INSTALL_DIR ${EXTPREFIX_opencv}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/opencv-mmpause-linux.patch
# PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/opencv-mmpause-linux.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_opencv}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment