1
From 632abbd8a255bf01e334565e18c8b5d3c6ad0ebf Mon Sep 17 00:00:00 2001
2
From: Vishesh Handa <me@vhanda.in>
3
Date: Sat, 29 Mar 2014 17:23:52 +0100
4
Subject: [PATCH 20/56] Cleaner: Always remove it from both the databases
7
src/file/cleaner/cleaner.cpp | 22 +++++++++++++---------
8
1 file changed, 13 insertions(+), 9 deletions(-)
10
diff --git a/src/file/cleaner/cleaner.cpp b/src/file/cleaner/cleaner.cpp
11
index 880dcf4..1cfec6f 100644
12
--- a/src/file/cleaner/cleaner.cpp
13
+++ b/src/file/cleaner/cleaner.cpp
16
#include <QCoreApplication>
20
using namespace Baloo;
22
@@ -53,24 +54,27 @@ void Cleaner::start()
23
int id = query.value(0).toInt();
24
QString url = query.value(1).toString();
26
+ bool removeIt = false;
27
if (!QFile::exists(url)) {
29
- q.prepare("delete from files where id = ?");
32
- m_commitQueue->remove(id);
37
if (!config.shouldBeIndexed(url)) {
38
- m_commitQueue->remove(id);
43
QString mimetype = KMimeType::findByUrl(QUrl::fromLocalFile(url))->name();
44
if (!config.shouldMimeTypeBeIndexed(mimetype)) {
49
+ qDebug() << id << url;
51
+ q.prepare("delete from files where id = ?");
54
m_commitQueue->remove(id);