Index: sources/gui/guiglobals.cpp =================================================================== diff -u -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d -rc933552983a659ca4cc351ff4d43d07319adab1e --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision c933552983a659ca4cc351ff4d43d07319adab1e) @@ -17,31 +17,50 @@ #include // Project -#include "guiactions.h" #include "guiview.h" namespace Gui { QQuickView *_viewer = nullptr; + /*! + * \brief registerTypes + * \details registering meta types + */ void registerTypes() { qRegisterMetaType ("GuiActionType"); - qRegisterMetaType ("GuiActionInfo"); - qmlRegisterType ("Gui.View", 0, 1, "GuiView"); - qmlRegisterUncreatableType ("Gui.Actions", 0, 1, "GuiActions",QStringLiteral("Used only for enumerations no need to have an object")); + qRegisterMetaType ("GuiActionData"); + qRegisterMetaType ("GuiActionIndx"); } + /*! + * \brief registerQmlTypes + * \details registering QML types + */ + void registerQmlTypes() + { + qmlRegisterType ("Gui.View" , 0, 1, "GuiView"); + qmlRegisterUncreatableType ("Gui.Actions", 0, 1, "GuiActions", QStringLiteral("Used only for enumerations no need to have an object")); + } + + /*! + * \brief startGui + * \details the GUI initializer/starter function + */ void startGui() { _viewer = new QQuickView; registerTypes(); + registerQmlTypes(); QObject::connect(_viewer, &QQuickView::statusChanged, qApp, [=](QQuickView::Status vStatus) { bool ok = vStatus == QQuickView::Ready; if (ok) { _viewer->show(); } else if (vStatus == QQuickView::Error || vStatus == QQuickView::Null) { - qDebug() << "Application Terminated:" << _viewer->errors(); + for (const auto &error : _viewer->errors()) { + qDebug() << "ERROR :" << QObject::tr("Application Terminated: %1").arg(error.toString()); + } QCoreApplication::exit(-1); }