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 @@
#include "UASManager.h"
#include "QGCApplication.h"
#include "VehicleComponent.h"
#include "QGCPalette.h"
#include <QtQml>
......@@ -44,7 +43,6 @@ FactSystem::FactSystem(QObject* parent) :
// FIXME: Where should these go?
qmlRegisterUncreatableType<VehicleComponent>(_factSystemQmlUri, 1, 0, "VehicleComponent", "Can only reference VehicleComponent");
qmlRegisterType<QGCPalette>(_factSystemQmlUri, 1, 0, "QGCPalette");
}
FactSystem::~FactSystem()
......
......@@ -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<QGCPalette>("QGroundControl.Palette", 1, 0, "QGCPalette");
}
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