refs #350 Extra static function registerMetadata, so it can be called explicitly

This commit is contained in:
Klaus Basan
2014-12-17 18:38:48 +01:00
parent 95df9edd52
commit 8a43efca92
2 changed files with 12 additions and 6 deletions

View File

@@ -43,13 +43,8 @@ namespace BlackCore
QMap<QString, int> times; QMap<QString, int> times;
QTime time; 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); this->connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, &CRuntime::gracefulShutdown);
// upfront reading of settings, as DBus server already relies on settings // upfront reading of settings, as DBus server already relies on settings
@@ -133,6 +128,14 @@ namespace BlackCore
return (token == this->m_contextApplication->ping(token)); 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 CRuntime::parseCommandLine(const QString commandLine)
{ {
bool handled = false; bool handled = false;

View File

@@ -147,6 +147,9 @@ namespace BlackCore
//! Is application context available? //! Is application context available?
bool canPingApplicationContext() const; bool canPingApplicationContext() const;
//! Register metadata
static void registerMetadata();
public slots: public slots:
//! Parse command line in all contexts //! Parse command line in all contexts
bool parseCommandLine(const QString commandLine); bool parseCommandLine(const QString commandLine);