Allow filter places based on alternative application name
ClosedPublic

Authored by renatoo on Dec 14 2017, 3:42 PM.

Details

Summary

You can use a alternative application name to filter items on places
model.

This new parameter will be use to match the 'OnlyInApp' metadata on
the bookmark item.

Test Plan

unit test

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
renatoo created this revision.Dec 14 2017, 3:42 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 14 2017, 3:42 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
renatoo requested review of this revision.Dec 14 2017, 3:42 PM
renatoo edited the summary of this revision. (Show Details)
renatoo edited the summary of this revision. (Show Details)
renatoo edited the summary of this revision. (Show Details)
renatoo edited the summary of this revision. (Show Details)Dec 14 2017, 3:50 PM
renatoo edited the summary of this revision. (Show Details)Dec 14 2017, 3:53 PM
aacid added a subscriber: aacid.Dec 14 2017, 4:39 PM
aacid added inline comments.
src/filewidgets/kfileplacesmodel.h
67–75

This breaks ABI so it's not acceptable.

Also how does this fix anything if the new alternativeApplicationName parameter is never passed in any of the existing constructors?

renatoo updated this revision to Diff 23922.Dec 14 2017, 4:57 PM

Avoid ABI break

renatoo edited the summary of this revision. (Show Details)Dec 14 2017, 4:58 PM
renatoo marked an inline comment as done.
renatoo added inline comments.
src/filewidgets/kfileplacesmodel.h
67–75

Ok I created a new constructor to avoid ABI break;

In fact this does not fix anything this only create a functionally that will be used by #D9332 (dolphin) to load contents exclusive for contents panel, since it uses a different appName to store it.

mlaurent requested changes to this revision.Dec 14 2017, 5:04 PM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
autotests/kfileplacesmodeltest.cpp
1276

QUrl(QStringLiteral("search:/videos-alternative"))

src/filewidgets/kfileplacesmodel.h
67–75

Add a comment for kf6 //kf6 merge with above method

This revision now requires changes to proceed.Dec 14 2017, 5:04 PM
renatoo updated this revision to Diff 23926.Dec 14 2017, 5:13 PM
renatoo marked 3 inline comments as done.
renatoo edited the summary of this revision. (Show Details)

Added documention for the new constructor

mlaurent added inline comments.Dec 14 2017, 5:25 PM
src/filewidgets/kfileplacesmodel.h
72

5.42 and missing //kf6 comment

renatoo updated this revision to Diff 23930.Dec 14 2017, 5:35 PM

Added kf6 comments

renatoo marked 2 inline comments as done.Dec 14 2017, 5:35 PM
mlaurent accepted this revision.Dec 15 2017, 8:33 AM
This revision is now accepted and ready to land.Dec 15 2017, 8:33 AM

Not commited ?

elvisangelaccio added inline comments.
autotests/kfileplacesmodeltest.cpp
145 ↗(On Diff #23930)

if (!currentModel) ?

src/filewidgets/kfileplacesmodel.h
69 ↗(On Diff #23930)

typo: an alternativeApplicationName

70 ↗(On Diff #23930)

wording: "in addition to" sound better to me

renatoo updated this revision to Diff 24605.Jan 2 2018, 4:37 PM
renatoo marked 3 inline comments as done.

Fixed typo

Is this commitable now?

aacid added a comment.Jan 23 2018, 8:38 PM

Probably the @since needs updating

renatoo updated this revision to Diff 25880.Jan 24 2018, 12:41 PM

Updated @since tag

Looks like this revision and the two that depend on it have all been accepted and are ready to land!

Closed by commit R241:fc1f2fe296d6: Allow filter places based on alternative application name (authored by Renato Araujo Oliveira Filho <renato.araujo@kdab.com>). · Explain WhyJan 26 2018, 1:25 PM
This revision was automatically updated to reflect the committed changes.