~ubuntu-branches/ubuntu/trusty/baloo/trusty-updates

« back to all changes in this revision

Viewing changes to debian/patches/upstream_git/0025-IndexerConfigTest-Show-both-fast-and-slow-mimetype.patch

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-04-10 21:32:59 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140410213259-b3hkzveqwe4hd3ax
Tags: 4:4.13.0-0ubuntu1
New upstream KDE Software Compilation release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 9d1c2d8c8e7d195b7d0648af0ca9bf6c874780fa Mon Sep 17 00:00:00 2001
2
 
From: Vishesh Handa <me@vhanda.in>
3
 
Date: Tue, 1 Apr 2014 11:34:40 +0200
4
 
Subject: [PATCH 25/56] IndexerConfigTest: Show both fast and slow mimetype
5
 
 
6
 
---
7
 
 src/file/tests/indexerconfigtest.cpp | 7 +++++--
8
 
 1 file changed, 5 insertions(+), 2 deletions(-)
9
 
 
10
 
diff --git a/src/file/tests/indexerconfigtest.cpp b/src/file/tests/indexerconfigtest.cpp
11
 
index acf9041..5b487b8 100644
12
 
--- a/src/file/tests/indexerconfigtest.cpp
13
 
+++ b/src/file/tests/indexerconfigtest.cpp
14
 
@@ -66,11 +66,14 @@ int main(int argc, char** argv)
15
 
     bool shouldIndex = config.shouldBeIndexed(url.toLocalFile());
16
 
 
17
 
     QString mimetype = KMimeType::findByUrl(url)->name();
18
 
-    bool shouldIndexMimetype = config.shouldMimeTypeBeIndexed(mimetype);
19
 
+    QString fastMimetype = KMimeType::findByUrl(url, 0, true, true)->name();
20
 
+
21
 
+    bool shouldIndexMimetype = config.shouldMimeTypeBeIndexed(fastMimetype);
22
 
     std::cout << url.toLocalFile().toUtf8().constData() << "\n"
23
 
               << "Should Index: " << std::boolalpha << shouldIndex << "\n"
24
 
               << "Should Index Mimetype: " << std::boolalpha << shouldIndexMimetype << "\n"
25
 
-              << "Mimetype: " << mimetype.toUtf8().constData() << std::endl;
26
 
+              << "Fast Mimetype: " << fastMimetype.toUtf8().constData() << std::endl
27
 
+              << "Slow Mimetype: " << mimetype.toUtf8().constData() << std::endl;
28
 
 
29
 
     return 0; //app.exec();
30
 
 }
31
 
1.9.1
32