Ignore baloo urls created from new KIO model
ClosedPublic

Authored by renatoo on Dec 15 2017, 12:14 PM.

Details

Summary

For now ignore baloo urls that was created by new KIO::KFilePlacesModel,
until we make use of new KIO API.

BUG: 387888

Test Plan

Open any KIO file dialog using the new API.
Runs dolphin v17.12.0
Make sure that baloo urls does not appear duplicated

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
renatoo created this revision.Dec 15 2017, 12:14 PM
Restricted Application added a subscriber: Dolphin. · View Herald TranscriptDec 15 2017, 12:14 PM
renatoo requested review of this revision.Dec 15 2017, 12:14 PM
mlaurent requested changes to this revision.Dec 15 2017, 12:32 PM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
src/panels/places/placesitemmodel.cpp
849

qCWarning(DolphinDebug) <<

This revision now requires changes to proceed.Dec 15 2017, 12:32 PM
renatoo updated this revision to Diff 23961.Dec 15 2017, 12:38 PM

Removed use of qWarning

renatoo marked an inline comment as done.Dec 15 2017, 12:38 PM
ervin added a subscriber: ervin.Dec 19 2017, 1:22 PM

Looks fine to me as well.

What's the difference with D9333?

What's the difference with D9333?

This version is for v17.12.0 that does not require API changes on KIO.

ngraham accepted this revision.Dec 29 2017, 12:33 AM
elvisangelaccio accepted this revision.Dec 31 2017, 10:08 AM
elvisangelaccio added inline comments.
src/panels/places/placesitemmodel.cpp
848

This TODO could be removed, since we already have D9333

This revision is now accepted and ready to land.Dec 31 2017, 11:01 AM
cfeck added a subscriber: cfeck.Jan 2 2018, 2:58 AM

Does it only avoid duplicate timeline:/ and search:/ ? I have duplicate 'Devices' and 'Removable Devices' sections since recently, and I cannot right-click to remove them.

renatoo marked an inline comment as done.EditedJan 2 2018, 12:38 PM
In D9347#184697, @cfeck wrote:

Does it only avoid duplicate timeline:/ and search:/ ? I have duplicate 'Devices' and 'Removable Devices' sections since recently, and I cannot right-click to remove them.

Devices are handled different, could you check if that is related with this fix? D9441

cfeck added a comment.Jan 2 2018, 1:07 PM

Cannot test uncommitted patches right now (no development environment installed), but that may indeed fix the issue, because devices appear, even if I have places hidded. Then selecting "Show All Entries" shows the duplicate devices entries.

renatoo updated this revision to Diff 24587.Jan 2 2018, 1:09 PM

Removed TODO comments

Closed by commit R318:9d3a019445d7: Ignore baloo urls created from new KIO model (authored by Renato Araujo Oliveira Filho <renato.araujo@kdab.com>). · Explain WhyJan 2 2018, 1:15 PM
This revision was automatically updated to reflect the committed changes.

Don't forget to merge your commits on the 17.12 branch back to master.

Don't forget to merge your commits on the 17.12 branch back to master.

For master, I was expecting to land this: D9333 which is the proper fix but requires the new KIO version.

Oh okay, great.

rkflx added a subscriber: rkflx.Jan 2 2018, 5:01 PM

Don't forget to merge your commits on the 17.12 branch back to master.

For master, I was expecting to land this: D9333 which is the proper fix but requires the new KIO version.

While Nate missed the purpose of D9333, technically he is right since merging is still required, isn't it?

Eventually someone will merge Applications/17.12 to master for a different fix, I would imagine. Or are you proposing to change to a cherry-pick model?

I guess merging now and then rebasing the patch for master on top, i.e. reverting some parts and applying the proper code fix, would be the way to go.

Yes, please merge on master and then rebase D9333.

Btw I cannot reproduce the duplicated places with dolphin master + kio master...

Yes, please merge on master and then rebase D9333.

ok I will do that.

Btw I cannot reproduce the duplicated places with dolphin master + kio master...

yes this will not be duplicated because kio is filtering only entries that has "OnlyInApp" with exactly the same name as the running app. Dolphin uses a extra suffix for the entries for each panel. This branch D9332 will allow to use alternative application names (necessary for dolphin), and this branch D9333 will make sure to remove the old entries and do not duplicate it.

Yes, please merge on master and then rebase D9333.

Hi, I tried to merge this to master but that causes some regressions and unit tests started to fail because this will ignore baloo urls that came from NEW KIO and the tests expect that urls be part of the list. The only easy way that I see it to be merged in master is that we need make sure that D9333 will land together otherwise that will cause regressions. Is that a option? I am not sure if that is a good idea.

Yes, please merge on master and then rebase D9333.

Hi, I tried to merge this to master but that causes some regressions and unit tests started to fail because this will ignore baloo urls that came from NEW KIO and the tests expect that urls be part of the list. The only easy way that I see it to be merged in master is that we need make sure that D9333 will land together otherwise that will cause regressions. Is that a option? I am not sure if that is a good idea.

I see, then let's merge with git merge -s recursive -Xours Applications/17.12, which will ignore this patch.

broulik added a subscriber: broulik.EditedJan 19 2018, 11:16 AM

As a result of all this places meddling I now have Dolphin crash immediately on startup, see https://bugs.kde.org/show_bug.cgi?id=389147
m_indexMap inserts indices out bounds (non consequetive) because it skips timeline and baloo URLs from what I can tell and then it blows up.

I went back to Dolphin 64d2fd29819fa46c293e8c726c7df2ff00b332b3 (before the merge) and KIO cd9856d14552809251d11a5d0fc88d63928a7bab master where everything works.

Sounds like @lbeltrame's merge commit (1a6b3c0a2bab) did not go as planned. See above for why both branches aren't really "compatible" currently.

This will probably need @renatoo to figure out the situation…

yes this code should be skipped on the mainline, but was not.

I will make sure that: D9333 fixes that

Well, I didn't expect that master and Applications had differing behaviors... Anyway, is there a short-term solution short of undoing the merge (which is hard to do)?

I reverted this change in master: this doesn't solve all the problems (places aren't keeping edits now) but at least solves the crash, which is far more critical.

yes. I can confirm that entries recently created can not be edited , But if you create it re-open dolphin you can edit the entries. (Working on a fix right now).

Edit item fixed on: D9985 (do we have a bug report for that? or should I create one?)