On 10/30/2013 1:45 AM, Sandy Martel wrote:
> Le 2013/10/30 à 11:06, Nicolás Alvarez <[email protected]> a écrit :
>
>> 2013/10/29 Calogero Mauceri <[email protected]>:
>>>> ...
>>>
>>> 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!

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to