diff --git a/src/ui/apmtoolbar.cpp b/src/ui/apmtoolbar.cpp index 6899f88d70cc20a98644f44426f09e485b1e9519..7b82aa8641fa89cf42fbd8ef7fb5efdd907ad49d 100644 --- a/src/ui/apmtoolbar.cpp +++ b/src/ui/apmtoolbar.cpp @@ -10,7 +10,16 @@ APMToolBar::APMToolBar(QWidget *parent): QDeclarativeView(parent), m_uas(0) { // Configure our QML object + + // Hack to fix QTBUG 34300 on OSX where QDir::currentPath has changed behavior. This causes + // relative paths to inside the .app package to fail. +#ifdef Q_OS_MAC + QString qmlFile = QApplication::applicationDirPath(); + qmlFile.append("/qml/ApmToolBar.qml"); + setSource(QUrl::fromLocalFile(qmlFile)); +#else setSource(QUrl::fromLocalFile("qml/ApmToolBar.qml")); +#endif setResizeMode(QDeclarativeView::SizeRootObjectToView); this->rootContext()->setContextProperty("globalObj", this); connect(LinkManager::instance(),SIGNAL(newLink(LinkInterface*)),