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

List:       kde-devel
Subject:    Re: Spam:****, Re: Application data file location?
From:       Lindsay Mathieson <lindsay.mathieson () gmail ! com>
Date:       2010-03-25 9:16:46
Message-ID: 201003251916.47054.lindsay.mathieson () gmail ! com
[Download RAW message or body]

On Thu, 25 Mar 2010 06:57:42 pm Stefan Majewsky wrote:
> 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.


Brilliant, thanks, that's exactly what I was looking for.


-- 
Lindsay
http://blackpaw.jalbum.net/home
 
>> 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