Dolphin and Baloo

Vishesh Handa me at vhanda.in
Wed Jan 29 18:19:19 GMT 2014


On Wednesday 29 January 2014 17:59:45 Frank Reininghaus wrote:
> Hi,
> 
> 2014-01-28 Vishesh Handa:
> > Baloo is mostly just a library to access stuff. It does not need to be
> > running for applications to use it - imagine sqlite.
> > 
> > It does have a separate process `baloo_file` which is responsible for
> > updating the index. But even if it crashes/whatever applications can
> > still access all the data.
> 
> Thanks for the explanation. Do I understand correctly that this means
> that the switch to Baloo will fix problems like
> 
> https://bugs.kde.org/show_bug.cgi?id=330117
> 
> (this is about Dolphin failing to show Nepomuk info in Details View if
> the user logs in, and an earlier session is restored - Dolphin may
> start up before Nepomuk is running then and fails to show roles that
> require a "running Nepomuk")?
> 

Yup. The second part of the bug will now be fixed.

> 
> Here are a few more things:
> 
> 1. Compilation fails here if Baloo is not installed. It seems that
> HAVE_BALOO is defined nevertheless?
> 

Hmm. I did not bother testing the non Baloo mode. I'll test it out and fix it.

> 2. Coding style:
> 
> (a) Put {...} even around one-line statements after if (...) (see
> KFileItemModelRolesUpdater::rolesData(const KFileItem&))
> 
> (b) Use
> 
> } else if (...) {
> 
> rather than
> 
> }
> else if (...) {

Oops. Thanks. I'll fix it.

> 
> (see KBalooRolesProvider::roleValues())
> 
> (c) KBalooRolesProvider: the indentation is inconsistent in "static
> const PropertyInfo propertyInfoList[]"
> 
> Better indent the second part of each {..., ...} to the same common
> multiple of 4 columns.
> 

Will do.

> 3. PlacesItemModel::PlacesItemModel(QObject* parent): the statement
> "m_fileIndexingEnabled = true;" is redundant, right?
> 

Yup. You're right. I'll remove that line.

> 4. Could you point out why you commented out some code in
> KFileItemModelRolesUpdater::applyChangedBalooRoles(const QString&
> itemUrl), please?
> 

I should have added a comment. We no longer have detailed information about 
what exactly changed so I have no way of doing data.insert(role, QVariant()) 
because I do not know the variant.

I'm not sure how to fix this.

> 5. About the FIXME comments in KFileItemModelRolesUpdater: I agree
> that these things should be fixed because I don't like nested event
> loops much. It should be quite straightforward to do, right? I don't
> mind if it's fixed after merging the branch, but it should be done
> before the next beta releases.

I tried using a thread, moving the event loop to that thread and then blocking 
until the thread is finished. I was not successful. I'll run it by someone who 
understands threads better than I do.

Unless you can think of a better way?

> 
> 
> Thanks,
> Frank

-- 
Vishesh Handa




More information about the kfm-devel mailing list