D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Méven Car
meven added a task: T12551: Revamp KCM/Component chooser. REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Méven Car
This revision was automatically updated to reflect the committed changes. Closed by commit R309:f10db4e6f0af: Make Default Applications in mimeapps.list the preferred applications (authored by meven). REPOSITORY R309 KService CHANGES SINCE LAST UPDATE

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Méven Car
meven updated this revision to Diff 74002. meven added a comment. Fix indentation issue REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73996=74002 BRANCH arcpatch-D26690 REVISION DETAIL https://phabricator.kde.org/D26690 AFFECTED FILES

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Kevin Ottens
ervin accepted this revision. REPOSITORY R309 KService BRANCH arcpatch-D26690 REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Méven Car
meven marked 6 inline comments as done. REPOSITORY R309 KService BRANCH arcpatch-D26690 REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-21 Thread Méven Car
meven updated this revision to Diff 73996. meven added a comment. Add explanatory comment regarding 25 magic number REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73913=73996 BRANCH arcpatch-D26690 REVISION DETAIL

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Kevin Ottens
ervin added inline comments. INLINE COMMENTS > meven wrote in kmimeassociations.cpp:104 > The first 25 with the highest preferences cannot be affected but then they > can have the same base reference as the next most category loaded. > Like the 26th "Default Applications" would have the same

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Méven Car
meven added inline comments. INLINE COMMENTS > dfaure wrote in kmimeassociations.cpp:104 > More precisely, it assumes that a single mimetype entry doesn't have more > than 25 desktop files associated with it. And even then, what would happen is > that the ordering is wrong after the first 25.

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > meven wrote in kmimeassociations.cpp:104 > The code kinda assumes we don't have more than 25 entries by configgroup. More precisely, it assumes that a single mimetype entry doesn't have more than 25 desktop files associated with it. And even

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Méven Car
meven added inline comments. INLINE COMMENTS > dfaure wrote in kmimeassociations.cpp:104 > No. What about my job security? ;-) > > It's half of the +50 from line 86. > > The range 1000-1025 is used by Added Associations, the range 1025-1050 is > used by Default Applications, and so on for the

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > ervin wrote in kmimeassociations.cpp:104 > Shouldn't the comment also include why the value 25 (and not 1, or 42 or NaN > ;-)) for mere mortals like me? No. What about my job security? ;-) It's half of the +50 from line 86. The range 1000-1025

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Kevin Ottens
ervin added inline comments. INLINE COMMENTS > kmimeassociations.cpp:104 > +// Other than that, they work the same... > +parseAddedAssociations(KConfigGroup(, "Default Applications"), > file, basePreference + 25); > } Shouldn't the comment also include why the value 25 (and not 1, or

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Méven Car
meven edited the summary of this revision. REPOSITORY R309 KService BRANCH arcpatch-D26690 REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread David Faure
dfaure accepted this revision. dfaure added a comment. This revision is now accepted and ready to land. Good solution :-) LOL. REPOSITORY R309 KService BRANCH arcpatch-D26690 REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc:

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-20 Thread Méven Car
meven updated this revision to Diff 73913. meven added a comment. Simplify implementation of Default Applications parsing, update tests REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73781=73913 BRANCH arcpatch-D26690 REVISION DETAIL

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-18 Thread Méven Car
meven planned changes to this revision. meven added a comment. In D26690#596551 , @dfaure wrote: > I'm quite confused by all this. Wouldn't it be enough to do http://www.davidfaure.fr/2020/kmimeassociations.cpp.diff ? > The modified unittest

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-18 Thread David Faure
dfaure added a comment. I'm quite confused by all this. Wouldn't it be enough to do http://www.davidfaure.fr/2020/kmimeassociations.cpp.diff ? The modified unittest passes :-) REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil,

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-17 Thread Méven Car
meven edited the summary of this revision. REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-17 Thread Méven Car
meven added a comment. In D26690#596116 , @ngraham wrote: > Does this fix https://bugs.kde.org/show_bug.cgi?id=403499? Partially I believe, D26557 should have helped too. Currently a file change of

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-17 Thread Nathaniel Graham
ngraham added a comment. Does this fix https://bugs.kde.org/show_bug.cgi?id=403499? REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-17 Thread Méven Car
meven updated this revision to Diff 73781. meven added a comment. KCM/Component Revamp browser config REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73778=73781 BRANCH master REVISION DETAIL https://phabricator.kde.org/D26690 AFFECTED

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-17 Thread Méven Car
meven updated this revision to Diff 73778. meven marked 4 inline comments as done. meven added a comment. Review : Add an enum AddServiceFlag REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73679=73778 BRANCH master REVISION DETAIL

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-16 Thread David Faure
dfaure added a comment. Thanks for looking into this, I'm glad that finally someone does dig into this code. I'm a bit surprised by the solution though. The spec simply says - add any "Default Applications" and then "Added Associations" in the first mimeapps.list This doesn't

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-16 Thread Méven Car
meven updated this revision to Diff 73679. meven added a comment. Update code to have a better implementation reusing existant API REPOSITORY R309 KService CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26690?vs=73633=73679 BRANCH master REVISION DETAIL

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-16 Thread Méven Car
meven added a reviewer: Frameworks. REPOSITORY R309 KService REVISION DETAIL https://phabricator.kde.org/D26690 To: meven, dfaure, dvratil, ervin, #frameworks Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D26690: Make "Default Applications" in mimeapps.list the preferred applications

2020-01-16 Thread Méven Car
meven retitled this revision from "[WIP] Add KMimeTypeTrader::defaultSchemaHandler to return default service associated with scheme" to "Make "Default Applications" in mimeapps.list the preferred applications". meven edited the summary of this revision. REPOSITORY R309 KService REVISION