Prepping KDirModel and KFileItem for QML
David Faure
faure+bluesystems at kde.org
Mon Nov 19 19:01:12 GMT 2012
On Monday 19 November 2012 19:39:19 Mark wrote:
> 4. in org.kde.kio, add a KDirModel subclass (DirModel) and add a
> indexForItem that returns a FileItem object. (this is a
> QDeclerativeItem)
Right, which enforces my point about making this separate: it comes with a
dependency on a different Qt library than the existing code.
Maybe you don't want to call this indexForItem/itemForIndex though, it will
conflict a little bit with the methods from the base class (especially the
itemForIndex one, which would only differ by its return type).
Maybe KIO::QMLFileItem, and indexForQMLFileItem, or something like that.
> @David, is there anything else to further improve this in the frameworks?
Yes, create a "declarative" subdir under staging/kio/src/ (which has core and
will have gui and widgets later), and put the code there, with a lib of its
own (libkiodeclarative). I say declarative, but name it after the qt5 library
that this will depend on...
More precisely:
* if this goes into kdelibs-4.x, then first let it go there, then merge 4.x
into frameworks, and then split out the stuff. Otherwise git merge will be lots
of fun.
* if this only goes into frameworks, then create the lib, and put your code
there.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks
More information about the kde-core-devel
mailing list