[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: locate(...) and KParts
From: David Faure <david () mandrakesoft ! com>
Date: 2001-02-27 2:51:12
[Download RAW message or body]
On Tuesday 27 February 2001 02:31, Michael Olbrich wrote:
> Hello!
>
> In my application I use 'locate("appdata",...)' to access some recources.
> Now I started to make a KPart of my program, and of course locate doesn't
> work any more.
> Where does locate search now, or what's the best way to solve this
> problem?
You have to use your part's instance, this way for "instance" (no pun intended) :
instance()->dirs()->findResource( type, filename )
or
locate( type, filename, instance() );
appdata may be an additional problem though (it's related to
the application)... Better use locate( "data", mypart+'/'+.... )
where mypart is the instance name.
(see kdelibs/kparts/tests/example.cpp for instance)
Basically, use the part's instance as much as possible, for everything
relating to the part (directories, config files, resources etc.)
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
>> Visit http://master.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