diff --git a/src/blackcore/context_runtime.cpp b/src/blackcore/context_runtime.cpp index 452bcbd96..921ce4d54 100644 --- a/src/blackcore/context_runtime.cpp +++ b/src/blackcore/context_runtime.cpp @@ -43,13 +43,8 @@ namespace BlackCore QMap times; QTime time; - time.start(); + registerMetadata(); - BlackMisc::registerMetadata(); - BlackMisc::initResources(); - BlackSim::registerMetadata(); - BlackCore::registerMetadata(); - times.insert("Register metadata", time.restart()); this->connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CRuntime::gracefulShutdown); // upfront reading of settings, as DBus server already relies on settings @@ -133,6 +128,14 @@ namespace BlackCore return (token == this->m_contextApplication->ping(token)); } + void CRuntime::registerMetadata() + { + BlackMisc::registerMetadata(); + BlackMisc::initResources(); + BlackSim::registerMetadata(); + BlackCore::registerMetadata(); + } + bool CRuntime::parseCommandLine(const QString commandLine) { bool handled = false; diff --git a/src/blackcore/context_runtime.h b/src/blackcore/context_runtime.h index a9a2827b4..db8bc9c38 100644 --- a/src/blackcore/context_runtime.h +++ b/src/blackcore/context_runtime.h @@ -147,6 +147,9 @@ namespace BlackCore //! Is application context available? bool canPingApplicationContext() const; + //! Register metadata + static void registerMetadata(); + public slots: //! Parse command line in all contexts bool parseCommandLine(const QString commandLine);