Index: sources/gui/guiglobals.cpp =================================================================== diff -u -rc71deaab48699cffdf9db816dfac2778d79c2238 -rd1907168ef46faa6de1ada400cad789f8379041f --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision c71deaab48699cffdf9db816dfac2778d79c2238) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision d1907168ef46faa6de1ada400cad789f8379041f) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * + * * \file guiglobals.cpp * \author (last) Behrouz NemaiPour * \date (last) 12-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 28-Oct-2019 - * + * */ #include "guiglobals.h" @@ -22,7 +22,7 @@ #include "guiview.h" // Project -#include "mmodel.h" +#include "MModel.h" #include "vview.h" #include "valarmstatus.h" @@ -35,9 +35,17 @@ #include "vtreatmentpressureocclusion.h" #include "vtreatmenttime.h" #include "vtreatmentranges.h" +#include "VHDOperationModeData.h" -#include "vloadcellreadings.h" -#include "vtemperaturesensors.h" +#include "VDGDrainPumpData.h" +#include "VDGHeatersData.h" +#include "VDGLoadCellReadingsData.h" +#include "VDGOperationModeData.h" +#include "VDGPressuresData.h" +#include "VDGROPumpData.h" +#include "VDGReservoirData.h" +#include "VDGTemperaturesData.h" +#include "VDGValvesStatesData.h" #include "vtreatmentadjustmentduration.h" #include "vtreatmentadjustmentflows.h" @@ -62,7 +70,11 @@ qRegisterMetaType ("GuiRequestReasons"); + // Note that this Models are not used in the qml + // but Qt needs them to be registered to be able to use them in between threads queue + // by their metadata information. REGISTER_MODEL_METATYPES + LOG_DEBUG("Models Registered"); } /*! @@ -75,6 +87,7 @@ qmlRegisterUncreatableType ("Gui.Actions", 0, 1, "GuiActions", QStringLiteral("Used only for enumerations no need to have an object")); REGISTER_VIEW_TYPES + LOG_DEBUG("Views Registered"); } /*! @@ -90,20 +103,23 @@ // coco begin validated: this portion of the code is handling application initialization // and if not initialized correctly will terminate the applicaiton . // So it had been manually tested. + LOG_DEBUG(__FUNCTION__); bool ok = vStatus == QQuickView::Ready; if (ok) { _viewer->show(); } else if (vStatus == QQuickView::Error || vStatus == QQuickView::Null) { for (const auto &error : _viewer->errors()) { - LOG_ERROR(QObject::tr("Application Terminated: %1").arg(error.toString())); + LOG_DEBUG(QString("Application Terminated: %1").arg(error.toString())); } QCoreApplication::exit(-1); } // coco end }, Qt::QueuedConnection ); + LOG_DEBUG("QQuickView Starting"); _viewer->setSource(QStringLiteral("qrc:/main.qml")); + LOG_DEBUG("QQuickView started"); return true; } }