Dolphin and Baloo

Frank Reininghaus frank78ac at googlemail.com
Thu Feb 6 13:37:49 GMT 2014


Hi,

the build is broken again. Attached patch fixes it for me (I haven't
tested it with Baloo installed yet though).

2014-02-06 10:41 GMT+01:00 Vishesh Handa:
> On Thursday 06 February 2014 09:34:59 Frank Reininghaus wrote:
>> Hi,
>>
>> 2014-02-05 Christoph Feck:
>> > Hi,
>> >
>> > It would be nice to have these changes merged in the next two weeks
>> > (i.e. one week before the freeze, see
>> > http://techbase.kde.org/Schedules/KDE4/4.13_Release_Schedule )
>>
>> that's fine. From my point of view, the Baloo code is basically ready
>> (once the foreach loop is re-added to prevent that 322348 comes back).
>>
>
> Fixed
>
>> I'll try to have another look at the code later, and I also encourage
>> others to do so. If nothing else comes up today, I'd say that the
>> branch can be merged (if Vishesh thinks that the commit history of
>> that branch is worth keeping) or alternatively, master can be merged
>> into feature/baloo and then the diff be applied to master as a single
>> commit.
>>
>
> Lets keep the history.

Just out of curiosity, may I ask why the history is important? The
reason I'm asking is that I often use "git log" and "git blame" to
find out when and why some code was changed, and to understand why the
code is as it is (often very useful when I find out which line causes
a bug and I'm wondering why the line is there at all). This technique
is obviously much less useful if some lines/files get changed very
often.

If the branch contained a sequence of commits with valid intermediate
states which could help to find the cause of regressions in the
future, or which could help to understand the structure of the new
code, I could see that keeping all those commits makes sense. However,
from my point of view, most of the commits will just add noise to the
output of "git log" and "git blame" and make finding out about the
origin of some lines quite painful.

But I don't want to start bikeshedding about this issue - if you can
tell any reason why the history will be useful to you in the future,
I'll shut up ;-)

Cheers,
Frank
-------------- next part --------------
diff --git a/dolphin/src/search/dolphinsearchbox.cpp b/dolphin/src/search/dolphinsearchbox.cpp
index 6a85547..a5f09b9 100644
--- a/dolphin/src/search/dolphinsearchbox.cpp
+++ b/dolphin/src/search/dolphinsearchbox.cpp
@@ -107,8 +107,11 @@ void DolphinSearchBox::setSearchPath(const KUrl& url)
     m_fromHereButton->setVisible(showSearchFromButtons);
     m_everywhereButton->setVisible(showSearchFromButtons);
 
+    bool hasFacetsSupport = false;
+#ifdef HAVE_BALOO
     const Baloo::IndexerConfig searchInfo;
-    const bool hasFacetsSupport = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
+    hasFacetsSupport = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
+#endif
     m_facetsWidget->setEnabled(hasFacetsSupport);
 }
 
@@ -120,8 +123,12 @@ KUrl DolphinSearchBox::searchPath() const
 KUrl DolphinSearchBox::urlForSearching() const
 {
     KUrl url;
+    bool useBalooSearch = false;
+#ifdef HAVE_BALOO
     const Baloo::IndexerConfig searchInfo;
-    if (searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile())) {
+    useBalooSearch = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
+#endif
+    if (useBalooSearch) {
         url = balooUrlForSearching();
     } else {
         url.setProtocol("filenamesearch");


More information about the kfm-devel mailing list