Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
feda356f
Commit
feda356f
authored
Nov 28, 2013
by
Don Gagne
Browse files
Mavericks fix to APM_Toolbar
QTBUG 34300 causes relative path references to qml file loading to fail.
parent
095323a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/apmtoolbar.cpp
View file @
feda356f
...
...
@@ -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
*
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment