summaryrefslogtreecommitdiff
path: root/kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch')
-rw-r--r--kde-frameworks/baloo/files/baloo-5.77.0-no-error-w-o-index.patch77
1 files changed, 0 insertions, 77 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
-