[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: using ~ in KURL
From: Frans Englich <frans.englich () telia ! com>
Date: 2005-09-01 14:55:22
Message-ID: 200509011504.20591.frans.englich () telia ! com
[Download RAW message or body]
On Thursday 01 September 2005 14:45, Abdalla Alothman wrote:
> Hi, Jens.
>
> On Thursday 01 September 2005 17:09, Jens Herden wrote:
> > Any hints are welcome
>
> The homeDirPath() member in QT's QDir returns the path of the
> user's home directory as a QString. You can use that string
> (prepend() or append()) in whatever way you want until you figure
> out how to handle the ~ in KURL.
>
> There are a dozen of methods in QDir to find absolute paths and
> so on. Probably you can build a string from those methods and
> feed them to the KURL constructor.
>
> To get the user name use getenv("USER"); see man getenv.
I would look at KUser(kdecore) for portablity and convenience.
Cheers,
Frans
>> 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