Review Request 123707: Set session manager discard command
David Faure
faure at kde.org
Mon May 11 07:44:05 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123707/#review80198
-----------------------------------------------------------
isLocalFile() makes everyone think of QUrl::isLocalFile(), i.e. it's the opposite of a remote file. But KConfig doesn't support remote files.
Honestly, there's a ton of code out there that relies on KConfig currently storing stuff into files, I think we're shooting in the dark if we're trying to figure out the best API for other possible future cases. E.g. a DConf backend would store into local files too, just a binary database rather than an ini file. So this API would do the wrong thing in that hypothetical future.
As I said, given the QSP enum in the ctor, I would just use QSP outside the class too, without any new API in KConfig.
The way this KConfig instance is created (with a non-empty name), it *is* a file on disk (and a single one due to SimpleConfig), we know that, no need to check it.
- David Faure
On May 11, 2015, 4:20 a.m., Stefan Becker wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123707/
> -----------------------------------------------------------
>
> (Updated May 11, 2015, 4:20 a.m.)
>
>
> Review request for KDE Frameworks and Rex Dieter.
>
>
> Bugs: 346768
> https://bugs.kde.org/show_bug.cgi?id=346768
>
>
> Repository: kconfig
>
>
> Description
> -------
>
> If KConfig object provides a non-empty file path then set the session manager discard command to "rm <file path>". This makes sure that obsolete session files are deleted after creating a new one.
>
>
> Diffs
> -----
>
> src/core/kconfig.h 6cc7323
> src/core/kconfig.cpp 3819716
> src/gui/kconfiggui.h 173400f
> src/gui/kconfiggui.cpp 0048c60
>
> Diff: https://git.reviewboard.kde.org/r/123707/diff/
>
>
> Testing
> -------
>
> F22 kwrite & konsole, ksmserver and "Save Session..."
>
>
> Thanks,
>
> Stefan Becker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150511/ea254fa2/attachment.html>
More information about the Kde-frameworks-devel
mailing list