[Development] Qt 4.8.6 Release Plans

Calogero Mauceri mauceri at actgate.com
Wed Oct 30 08:45:02 CET 2013


On 10/30/2013 1:45 AM, Sandy Martel wrote:
> Le 2013/10/30 à 11:06, Nicolás Alvarez <nicolas.alvarez at gmail.com> a écrit :
>
>> 2013/10/29 Calogero Mauceri <mauceri at actgate.com>:
>>>> ...
>>>
>>> The Qt documentation states that QDir::currentPath() returns "The
>>> application working directory".  Shouldn't the workind directory be
>>> initialized with the path the application was launched from? If that's
>>> not the case, which is the right way to obtain the working directory?
>> That is the correct way to get the working directory. But there is no
>> documentation from Apple guaranteeing what the working directory will
>> be when Finder launches an application.
> Calogero, I don't think "working" directory means exactly what you think it means. Also, as Nicolás says, "the path the application was launched from" means whatever the Finder wants it to be.
>
> Looks like you want something like CFBundleCopyBundleURL(CFBundleGetMainBundle()) .
>
> For Qt, I'd say QApplication::applicationDirPath() + ../../.. or Qt5's QStandardPaths::ApplicationsLocation are your best bets.

Ok guys, I understand the point.
Thanks a lot for your advice!




More information about the Development mailing list