summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-04-04 13:57:11 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-04-04 15:19:37 +0200
commit1864f401c9efcea3a6a6fef344826f14718526e7 (patch)
tree865bed1da1fc1bac992b6f5e4ea68e809c498c1b /kde-frameworks/baloo/files
parentdev-libs/plasma-wayland-protocols: Drop 1.2.0 (r0) (diff)
downloadgentoo-1864f401c9efcea3a6a6fef344826f14718526e7.tar.gz
gentoo-1864f401c9efcea3a6a6fef344826f14718526e7.tar.bz2
gentoo-1864f401c9efcea3a6a6fef344826f14718526e7.zip
kde-frameworks/baloo: Fix baloo losing filename after rename
Upstream commit 24da759545088060b863fef13496a5b22a5534d6 See also: https://invent.kde.org/frameworks/baloo/-/merge_requests/44 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=433116 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/baloo/files')
-rw-r--r--kde-frameworks/baloo/files/baloo-5.80.0-update-filename-terms-moving-file.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/kde-frameworks/baloo/files/baloo-5.80.0-update-filename-terms-moving-file.patch b/kde-frameworks/baloo/files/baloo-5.80.0-update-filename-terms-moving-file.patch
new file mode 100644
index 00000000000..a5ba6232d26
--- /dev/null
+++ b/kde-frameworks/baloo/files/baloo-5.80.0-update-filename-terms-moving-file.patch
@@ -0,0 +1,41 @@
+From f6a7845b8f3cd3188053ba58f9fe7053558aec86 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
+Date: Sat, 27 Mar 2021 13:32:55 +0100
+Subject: [PATCH] [MetadataMover] Update filename terms when moving/renaming
+ file
+
+After the removal of BasicIndexingJob::index() (bd1041ea2826e295 "Make
+renames a DB only operation") the filename terms where left empty.
+
+BUG: 433116
+---
+ src/file/metadatamover.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/file/metadatamover.cpp b/src/file/metadatamover.cpp
+index 70ca9822..2bff5a2e 100644
+--- a/src/file/metadatamover.cpp
++++ b/src/file/metadatamover.cpp
+@@ -8,6 +8,7 @@
+
+ #include "metadatamover.h"
+ #include "database.h"
++#include "termgenerator.h"
+ #include "transaction.h"
+ #include "baloodebug.h"
+
+@@ -99,6 +100,11 @@ void MetadataMover::updateMetadata(Transaction* tr, const QString& from, const Q
+ }
+
+ Document doc;
++
++ const QByteArray fileName = toPath.mid(lastSlash + 1);
++ TermGenerator tg(doc);
++ tg.indexFileNameText(QFile::decodeName(fileName));
++
+ doc.setId(id);
+ doc.setParentId(parentId);
+ doc.setUrl(toPath);
+--
+GitLab
+