Hi,

if a Qt fairy (pun intended) would visit me and grant me one wish, it
would be native Qt support for KStandardDirs (through a platform
plugin or whatever). Instead of

> QSvgRenderer renderer(KStandardDirs::locate("appdata", 
> "themes/default.svgz"));

I want to write e.g.

> QSvgRenderer renderer("%/appdata/themes/default.svgz");

The "%" is just an example. This syntax is similar to Qt's embedded resources:

> QSvgRenderer renderer(":/themes/default.svgz");

Of course, this syntax should also work in all other occasions where
files can be given:

> QFileInfo("%/config/plasma-desktop-appletsrc").lastModified();
> declarativeComponent.setBaseUrl("%/appdata/qmlresources");
> $ kate %/config/konquerorrc

Access from QML is most important one for me personally, although it
would be nice in general, esp. to safely determine relative locations
in the virtual file system provided by KStandardDirs. Right now, one
can only hack something together with
KStandardDirs::relativeLocation() if files in relative locations need
to be located, but even this requires you to know the location type.

(How) Can something like this be achieved?

Greetings
Stefan
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to