From kde-devel Sun May 30 21:32:57 1999 From: Stephan Kulow Date: Sun, 30 May 1999 21:32:57 +0000 To: kde-devel Subject: Re: KStandardDirs X-MARC-Message: https://marc.info/?l=kde-devel&m=92809922808752 Harri Porten wrote: > > Hi ! > > I am just trying to switch from the KApp::*_dir() methods to > KStandardDirs. In some cases the transition is easy (and makes sense) in > others it won't be trivial. To make things a more convenient for > programmers I would like to propose two extensions: > > o how about adding a type like "appdata" that would have a relative path > "share/apps/${application name}/" ? > > o a QString findResourceDir( const QString& type, const QString& > relative ) method ? > > I found that need when trying to convert the following line: > > QDir d(kapp->kde_datadir() + "/kppp/Provider/"); > > The application name would already be covered by the first proposal, of > course. > > All in all I expect that KStandardDirs will allow a great deal of > flexibility (fs standard- and multiple-configuration-wise). But I guess > that there will be a few occasions when the programmer may want to > explicitly demand a system or local location. Especially concerning > _writing_ to files. Oh well. Let's see. We'll find a solution :) > The writing of files is still open - yes. Your suggestions make very much sense, I already thought about a way to get this right myself and what you suggested was my favorite ;) When we do it right, we should also remove localkdedir(). The ideal solution would cover this too. BTW: I would prefer QStringList list = dirs()->findAllResources("appdata", "Provider"); Greetings, Stephan -- Und sie nannten ihn, wie er selbst unterschrieb - Den Trojanischen Pferdedieb