KcoreAddons

David Faure faure at kde.org
Sun Oct 16 08:31:57 UTC 2011


On Saturday 15 October 2011 15:46:08 Oswald Buddenhagen wrote:
> On Fri, Oct 14, 2011 at 02:33:30PM +0200, David Faure wrote:
> > On Wednesday 28 September 2011 20:00:49 Romain Perier wrote:
> > > > The solution for KSaveFile is actually to split it up into two
> > > > separate things.
> > > > There's the class -- that one should stay.
> > > > And there's a bunch of static methods which are unrelated to
> > > > ksavefile and are all about backups. These should move into a new
> > > > class or namespace, and for sure into new .cpp/.h files. And since
> > > > that's not used inside kdelibs, we can always move it up together
> > > > with kconfig itself for now.
> > > 
> > > Ok, I will create a kbackups.{h,cpp} with a KDE5 TODO for now, we will
> > > move it up with kconfig later.
> > 
> > Great.
> 
> how is the split supposed to work? kbackups needs to be used by
> ksavefile to be useful in any way, so you don't get rid of the
> dependency.

No, KSaveFile has never called the backups methods, the application has to do 
that. This makes sense, you don't really want -every- file being saved (e.g. 
kconfig files, xmlgui files, bookmarks etc. etc.) to have 10 numbered backups 
if the user enables that. This is usually only done for actual documents.

> note that there is a qt-only ksavefile (more or less) equivalent in
> qtcreator/src/libs/util/ which i would like to import into qt.

Great! Please do ;)
Writing a ksavefile equivalent for Qt was on my TODO list, I'm happy to hear 
that there is some code already. This is -very- much needed for all Qt apps, 
to avoid losing documents in a disk-full situation...
 
> speaking of qt creator classes ...
> 
> qtcprocess is a replacement for most of kprocess+kshell. i already have
> a plan how to import that with a nice api.
> however, it also implies importing stringutils.cpp's
> abstractmacroexpander (which, of course, is the logical successor to
> kmacroexpander), and i'm *much* less sure about that one, in particular
> which concrete implementations should be put into qt. somebody feels
> like pondering the api? ping me.

I have little knowledge about these things, so I'll let you go ahead. Please 
start with ksavefile though, it's more urgent for the modularization of 
kdelibs :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).


More information about the Kde-frameworks-devel mailing list