Unable to launch Qt Assistant

Mark Brethen mark.brethen at gmail.com
Mon Jul 14 16:22:58 PDT 2014

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/"));
        QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
#if !defined(Q_OS_MAC)
        app += QLatin1String("assistant");
        app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");

        QString exe = QString::fromUtf8(App::GetApplication().getExecutableName());
        QString doc = QString::fromUtf8(App::Application::getHelpDir().c_str());
        QString qhc = doc + exe.toLower() + QLatin1String(".qhc");

I'm not that familiar with c++ but I believe 'QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator()' is setting the variable 'app' to /opt/local/bin. This line needs to be patched so that it finds /Applications/Macports/Qt4. How is a string used as a file path In c++?


More information about the macports-dev mailing list