D29347: KAuthorized: export method to reload restrictions

2020-05-08 Thread David Faure
dfaure added a comment. Good idea, done in https://commits.kde.org/kconfig/8e0f84030cc1d1e517ca75311ed9850ce88fac41 REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D29347 To: dfaure, aacid, apol, mdawson Cc: kossebau, kde-frameworks-devel, LeGast00n, cblack, michaelh

D29347: KAuthorized: export method to reload restrictions

2020-05-03 Thread Matthew Dawson
mdawson added a comment. One suggestion for this change: Instead of exporting a method that takes no parameters and always loads from configuration file, why not make a new method with the implementation that takes in a given KConfigGroup. That way unit tests can pass in a KConfigGroup se

D29347: KAuthorized: export method to reload restrictions

2020-05-03 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > kossebau wrote in kauthorized.cpp:247 > Please also add a note next to this that it is for unit test, so people are > not wondering about this random KCONFIGCORE_EXPORT and first have to research > commit history. Good idea, done: https://commit

D29347: KAuthorized: export method to reload restrictions

2020-05-03 Thread Friedrich W. H. Kossebau
kossebau added inline comments. INLINE COMMENTS > kauthorized.cpp:247 > > -static void initUrlActionRestrictions() > +KCONFIGCORE_EXPORT void reloadUrlActionRestrictions() > { Please also add a note next to this that it is for unit test, so people are not wondering about this random KCONFIGC

D29347: KAuthorized: export method to reload restrictions

2020-05-03 Thread David Faure
dfaure closed this revision. REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D29347 To: dfaure, aacid, apol, mdawson Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29347: KAuthorized: export method to reload restrictions

2020-05-03 Thread Albert Astals Cid
aacid accepted this revision. aacid added a comment. This revision is now accepted and ready to land. a, for using in a different repo, ok. REPOSITORY R237 KConfig BRANCH master REVISION DETAIL https://phabricator.kde.org/D29347 To: dfaure, aacid, apol, mdawson Cc: kde-frameworks-

D29347: KAuthorized: export method to reload restrictions

2020-05-02 Thread David Faure
dfaure added a comment. Yes declaring the function there, as in the code sample shown here. We do the same for internally-exported variables like KSERVICE_EXPORT int ksycoca_ms_between_checks; Qt does the same kind of things. A _p.h header would have to be installed, which we don't

D29347: KAuthorized: export method to reload restrictions

2020-05-02 Thread David Faure
dfaure edited the summary of this revision. REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D29347 To: dfaure, aacid, apol, mdawson Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29347: KAuthorized: export method to reload restrictions

2020-05-02 Thread Albert Astals Cid
aacid added a comment. So how you're going to use it from unittests? declaring the function there? maybe better to declare it to some of the _p.h headers ? REPOSITORY R237 KConfig REVISION DETAIL https://phabricator.kde.org/D29347 To: dfaure, aacid, apol, mdawson Cc: kde-frameworks-

D29347: KAuthorized: export method to reload restrictions

2020-05-01 Thread David Faure
dfaure created this revision. dfaure added reviewers: aacid, apol, mdawson. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. dfaure requested review of this revision. REVISION SUMMARY This is useful for unittests. Example: KCONFIGCORE_EXPORT void reloadUr