diff --git a/src/FactSystem/FactSystem.cc b/src/FactSystem/FactSystem.cc index 0fe30b35f893689b1b86f1c3ba08c93a1f0c29ee..650166b21d06788757b28852bc5aa4fd097aa295 100644 --- a/src/FactSystem/FactSystem.cc +++ b/src/FactSystem/FactSystem.cc @@ -28,7 +28,6 @@ #include "UASManager.h" #include "QGCApplication.h" #include "VehicleComponent.h" -#include "QGCPalette.h" #include @@ -44,7 +43,6 @@ FactSystem::FactSystem(QObject* parent) : // FIXME: Where should these go? qmlRegisterUncreatableType(_factSystemQmlUri, 1, 0, "VehicleComponent", "Can only reference VehicleComponent"); - qmlRegisterType(_factSystemQmlUri, 1, 0, "QGCPalette"); } FactSystem::~FactSystem() diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index f383226e6aa7f248bad906f8ae11abab347fee31..70370c2ce8a532ff74f402ebf4a33dc0b86f3fc7 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -247,6 +247,9 @@ void QGCApplication::_initCommon(void) // Avoid Using setFont(). In the Qt docu you can read the following: // "Warning: Do not use this function in conjunction with Qt Style Sheets." // setFont(fontDatabase.font(fontFamilyName, "Roman", 12)); + + // Register our Qml palette before anyone tries to use it + qmlRegisterType("QGroundControl.Palette", 1, 0, "QGCPalette"); } bool QGCApplication::_initForNormalAppBoot(void)