D26440: Add utility method for opening a KSharedConfig suitable to store state information

David Faure noreply at phabricator.kde.org
Sun Jan 5 17:57:59 GMT 2020


dfaure added a comment.


  > For e.g. dolphin the file .config/dolphin/dolphinstate would be created.
  
  You mean ~/.local/share/dolphin/dolphinstate, right?

INLINE COMMENTS

> ksharedconfig.cpp:124
>  
> +KSharedConfig::Ptr KSharedConfig::openStateConfig()
> +{

My idea was to add `const QString &fileName = QString()` to this method so that complex apps can use multiple state files. Or for parts and plugins to use a fixed name whatever app they're in.
(one example: kmail-standalone vs kmail-in-kontact).

> ksharedconfig.cpp:126
> +{
> +    return openConfig(QCoreApplication::applicationName() + QLatin1String("state"), FullConfig, QStandardPaths::AppDataLocation);
> +}

I think SimpleConfig would be enough. We don't need cascading (I think) and we don't need kdeglobals (for sure).

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26440

To: nicolasfella, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200105/75585cbc/attachment.html>


More information about the Kde-frameworks-devel mailing list