summaryrefslogtreecommitdiff
path: root/kde-frameworks/baloo/files
diff options
context:
space:
mode:
Diffstat (limited to 'kde-frameworks/baloo/files')
-rw-r--r--kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch77
-rw-r--r--kde-frameworks/baloo/files/baloo-5.77.0-strip-trailing-slash.patch34
-rw-r--r--kde-frameworks/baloo/files/baloo-5.80.0-update-filename-terms-moving-file.patch41
3 files changed, 41 insertions, 111 deletions
diff --git a/kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch b/kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch
deleted file mode 100644
index d49cc8f6d9d9..000000000000
--- a/kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From d102b01ee59d93de3fe18c12364ea69a85ea723f Mon Sep 17 00:00:00 2001
-From: Christoph Cullmann <cullmann@kde.org>
-Date: Thu, 31 Dec 2020 15:44:40 +0000
-Subject: [PATCH] avoid errors for application startup if no baloo index was
- ever created
-
-use case:
-
- * a KDE application started e.g. in an non-KDE Plasma environment
- * a KDE application started with baloo indexing disabled
-
-you normally will get:
-
-kf.kio.slaves.tags: tag fetch failed: "Failed to open the database"
-kf.kio.slaves.tags: "tags:/" list() invalid url
-
-Now this is not issued if no index database exist.
----
- src/engine/database.cpp | 6 ++++++
- src/engine/database.h | 7 +++++++
- src/lib/taglistjob.cpp | 7 +++++++
- 3 files changed, 20 insertions(+)
-
-diff --git a/src/engine/database.cpp b/src/engine/database.cpp
-index 427210d0..ac93426c 100644
---- a/src/engine/database.cpp
-+++ b/src/engine/database.cpp
-@@ -247,3 +247,9 @@ QString Database::path() const
- QMutexLocker locker(&m_mutex);
- return m_path;
- }
-+
-+bool Database::isAvailable() const
-+{
-+ QMutexLocker locker(&m_mutex);
-+ return QFileInfo::exists(m_path + QStringLiteral("/index"));
-+}
-diff --git a/src/engine/database.h b/src/engine/database.h
-index 0f43b623..26d21101 100644
---- a/src/engine/database.h
-+++ b/src/engine/database.h
-@@ -73,6 +73,13 @@ public:
- */
- QString path() const;
-
-+ /**
-+ * Is the database available for use?
-+ * For example if indexing is disabled or the indexer did never run this is false.
-+ * @return database available
-+ */
-+ bool isAvailable() const;
-+
- private:
- /**
- * serialize access, as open might be called from multiple threads
-diff --git a/src/lib/taglistjob.cpp b/src/lib/taglistjob.cpp
-index cea57889..58945cc7 100644
---- a/src/lib/taglistjob.cpp
-+++ b/src/lib/taglistjob.cpp
-@@ -33,7 +33,14 @@ TagListJob::~TagListJob()
- void TagListJob::start()
- {
- Database *db = globalDatabaseInstance();
-+
- if (!db->open(Database::ReadOnlyDatabase)) {
-+ // if we have no index, we have no tags
-+ if (!db->isAvailable()) {
-+ emitResult();
-+ return;
-+ }
-+
- setError(UserDefinedError);
- setErrorText(QStringLiteral("Failed to open the database"));
- emitResult();
---
-GitLab
-
diff --git a/kde-frameworks/baloo/files/baloo-5.77.0-strip-trailing-slash.patch b/kde-frameworks/baloo/files/baloo-5.77.0-strip-trailing-slash.patch
deleted file mode 100644
index ab9c7639799f..000000000000
--- a/kde-frameworks/baloo/files/baloo-5.77.0-strip-trailing-slash.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9b61371fdefbd538938f20cdc87eed03d170fa5b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
-Date: Sat, 12 Dec 2020 19:01:45 +0100
-Subject: [PATCH] [BasicIndexingJob] Strip trailing slash from folders
-
-If BasicIndexingJob is called with a path with a trailing slash, the
-search for the last slash (separating name from parent path) goes wrong.
-
-This was wrong already earlier, but with commit 47ebc15844f6b8a8
-("[Document] Add parent document ID and populate it") this caused
-document and parent id to be the same.
-
-CCBUG: 430273
----
- src/file/basicindexingjob.cpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/file/basicindexingjob.cpp b/src/file/basicindexingjob.cpp
-index e00c6a2b..c0f18ddd 100644
---- a/src/file/basicindexingjob.cpp
-+++ b/src/file/basicindexingjob.cpp
-@@ -23,6 +23,9 @@ BasicIndexingJob::BasicIndexingJob(const QString& filePath, const QString& mimet
- , m_mimetype(mimetype)
- , m_indexingLevel(level)
- {
-+ if (m_filePath.endsWith(QChar('/'))) {
-+ m_filePath.chop(1);
-+ }
- }
-
- namespace {
---
-GitLab
-
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 000000000000..a5ba6232d260
--- /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
+