[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Application data file location?
From:       Stefan Majewsky <kdemailinglists () bethselamin ! de>
Date:       2010-03-25 9:02:15
Message-ID: 201003251002.15869.kdemailinglists () bethselamin ! de
[Download RAW message or body]

Am Donnerstag, 25. März 2010 07:19:11 schrieb lindsay.mathieson@gmail.com:
> With a std KDE4 gui app, is there an api or config item that lets it
> know where it can read/write data files to  - not config entries per
> say but what ever binary data etc it may need for its own purposes.

Have a look at KStandardDirs. Example:

> const QString dataFilePath = KStandardDirs::locate("appdata", "file.dat");

This returns e.g. "/usr/share/kde4/apps/$APPNAME/file.dat" if your $(kde4-
config --prefix) is /usr and the given file exists there.

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic