Browse Source

Move Palette registration out of FactSystem

Since this is generic Qml support not specific to FactSystem
QGC4.4
Don Gagne 10 years ago
parent
commit
70a55798bb
  1. 2
      src/FactSystem/FactSystem.cc
  2. 3
      src/QGCApplication.cc

2
src/FactSystem/FactSystem.cc

@ -28,7 +28,6 @@ @@ -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) : @@ -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()

3
src/QGCApplication.cc

@ -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:
// "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)

Loading…
Cancel
Save