X-Git-Url: https://vaikene.ee/gitweb/highlight.css?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Fglobals.cpp;h=5054bd1e05c71f1d4d8093277e564d7b3240a67f;hb=18ba5c0014514a8248a77dd36d8ee8d9acc3227b;hp=dfb15953292b404f512688fee30b13b8df6a7635;hpb=720224734cb4f6ea2708c6b5ecf93cc666aad378;p=evaf diff --git a/src/libs/Common/globals.cpp b/src/libs/Common/globals.cpp index dfb1595..5054bd1 100644 --- a/src/libs/Common/globals.cpp +++ b/src/libs/Common/globals.cpp @@ -3,7 +3,7 @@ * @brief Global constants and macros for eVaf * @author Enar Vaikene * - * Copyright (c) 2011 Enar Vaikene + * Copyright (c) 2011-2012 Enar Vaikene * * This file is part of the eVaf C++ cross-platform application development framework. * @@ -18,8 +18,9 @@ */ #include "globals.h" -#include "env.h" #include "app.h" +#include "config.h" +#include "prop.h" #include "logger.h" #include "version.h" #include "ilogger.h" @@ -36,30 +37,36 @@ bool eVaf::Common::init() return false; } - EVAF_INFO("Initializing %s.Globals", VER_MODULE_NAME_STR); + EVAF_INFO("Initializing %s-Globals", VER_MODULE_NAME_STR); // Initialize all the common interface implementations in the proper sequence - eVaf::Common::Internal::Env * env = - qobject_cast(eVaf::Common::iEnv::instance()); - if (env) { - if (!env->init()) + eVaf::Common::Internal::App * app = + qobject_cast(eVaf::Common::iApp::instance()); + if (app) { + if (!app->init()) + return false; + } + eVaf::Common::Internal::Config * config = + qobject_cast(eVaf::Common::iConfig::instance()); + if (config) { + if (!config->init()) + return false; + } + eVaf::Common::Internal::Prop * prop = + qobject_cast(eVaf::Common::iProp::instance()); + if (prop) { + if (!prop->init()) return false; } eVaf::Common::Internal::Logger * logger = - qobject_cast(eVaf::Common::iLogger::instance()); + qobject_cast(eVaf::Common::iLogger::instance()); if (logger) { if (!logger->init()) return false; } - eVaf::Common::Internal::App * app = - qobject_cast(eVaf::Common::iApp::instance()); - if (app) { - if (!app->init()) - return false; - } - EVAF_INFO("%s.Globals initialized", VER_MODULE_NAME_STR); + EVAF_INFO("%s-Globals initialized", VER_MODULE_NAME_STR); return true; }