Unable to launch Qt Assistant

Ryan Schmidt ryandesign at macports.org
Wed Jul 16 14:03:06 PDT 2014

On Jul 14, 2014, at 10:09 PM, Ian Wadham <iandw.au at gmail.com> wrote:

> On 15/07/2014, at 10:56 AM, Mark Brethen wrote:
>> On Jul 14, 2014, at 6:22 PM, Mark Brethen <mark.brethen at gmail.com> wrote:
>>> I'm testing the FreeCAD build and discovered that the help menu returns the error message: "Unable to launch Qt Assistant (/opt/local/bin/Assistant.app/Contents/MacOS/Assistant)".  Launching Qt Assistant is done in the function startAssistant() which is found in src/Gui/Assistant.cpp. The following lines get the name of the executable and the doc path:
>>> #ifdef Q_OS_WIN
>>>      QString app;
>>>      app = QDir::toNativeSeparators(QString::fromUtf8
>>>          (App::GetApplication().GetHomePath()) + QLatin1String("bin/"));
>>> #else
> As a quick and dirty fix, you could include here:
>       #ifdef Q_OS_MAC
>             QString app = "/Applications/MacPorts/Qt4/";
>       #else

This doesn't apply within MacPorts, but in general, on OS X, users expect to be able to move the application around on the disk and have it still work. So application locations should not be hardcoded. OS X provides other mechanisms for launching helper applications that don't depend on their location on disk.

More information about the macports-dev mailing list