Commit 70a55798 authored by Don Gagne's avatar Don Gagne

Move Palette registration out of FactSystem

Since this is generic Qml support not specific to FactSystem
parent f7eb2306
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "UASManager.h" #include "UASManager.h"
#include "QGCApplication.h" #include "QGCApplication.h"
#include "VehicleComponent.h" #include "VehicleComponent.h"
#include "QGCPalette.h"
#include <QtQml> #include <QtQml>
...@@ -44,7 +43,6 @@ FactSystem::FactSystem(QObject* parent) : ...@@ -44,7 +43,6 @@ FactSystem::FactSystem(QObject* parent) :
// FIXME: Where should these go? // FIXME: Where should these go?
qmlRegisterUncreatableType<VehicleComponent>(_factSystemQmlUri, 1, 0, "VehicleComponent", "Can only reference VehicleComponent"); qmlRegisterUncreatableType<VehicleComponent>(_factSystemQmlUri, 1, 0, "VehicleComponent", "Can only reference VehicleComponent");
qmlRegisterType<QGCPalette>(_factSystemQmlUri, 1, 0, "QGCPalette");
} }
FactSystem::~FactSystem() FactSystem::~FactSystem()
......
...@@ -247,6 +247,9 @@ void QGCApplication::_initCommon(void) ...@@ -247,6 +247,9 @@ void QGCApplication::_initCommon(void)
// Avoid Using setFont(). In the Qt docu you can read the following: // Avoid Using setFont(). In the Qt docu you can read the following:
// "Warning: Do not use this function in conjunction with Qt Style Sheets." // "Warning: Do not use this function in conjunction with Qt Style Sheets."
// setFont(fontDatabase.font(fontFamilyName, "Roman", 12)); // setFont(fontDatabase.font(fontFamilyName, "Roman", 12));
// Register our Qml palette before anyone tries to use it
qmlRegisterType<QGCPalette>("QGroundControl.Palette", 1, 0, "QGCPalette");
} }
bool QGCApplication::_initForNormalAppBoot(void) bool QGCApplication::_initForNormalAppBoot(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment