NymeaCore: class cleanup and statup improvements
This commit is contained in:
parent
e4ef75b76d
commit
cfc13d6984
@ -229,8 +229,6 @@ JsonRPCServerImplementation::JsonRPCServerImplementation(const QSslConfiguration
|
||||
params.insert("o:token", enumValueName(String));
|
||||
registerNotification("PushButtonAuthFinished", description, params);
|
||||
|
||||
QMetaObject::invokeMethod(this, "setup", Qt::QueuedConnection);
|
||||
|
||||
connect(NymeaCore::instance()->userManager(), &UserManager::pushButtonAuthFinished, this, &JsonRPCServerImplementation::onPushButtonAuthFinished);
|
||||
|
||||
m_connectionLockdownTimer.setSingleShot(true);
|
||||
|
||||
@ -60,6 +60,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <QMetaObject>
|
||||
|
||||
#ifdef WITH_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
@ -168,6 +169,8 @@ void NymeaCore::init(const QStringList &additionalInterfaces, bool disableLogEng
|
||||
|
||||
connect(m_thingManager, &ThingManagerImplementation::loaded, this, &NymeaCore::thingManagerLoaded);
|
||||
|
||||
QMetaObject::invokeMethod(m_serverManager->jsonServer(), "setup", Qt::QueuedConnection);
|
||||
|
||||
m_logger->log({"started"}, {{"version", NYMEA_VERSION_STRING}});
|
||||
#ifdef WITH_SYSTEMD
|
||||
sd_notify(0, "READY=1");
|
||||
@ -271,10 +274,12 @@ QStringList NymeaCore::getAvailableLanguages()
|
||||
foreach (const QString &path, searchPaths) {
|
||||
QDir translationDirectory(path);
|
||||
translationDirectory.setNameFilters(QStringList() << "*.qm");
|
||||
translationFiles = translationDirectory.entryList();
|
||||
qCDebug(dcTranslations()) << translationFiles.count() << "translations in" << path;
|
||||
if (translationFiles.count() > 0) {
|
||||
break;
|
||||
const QStringList filesInPath = translationDirectory.entryList();
|
||||
qCDebug(dcTranslations()) << filesInPath.count() << "translations in" << path;
|
||||
foreach (const QString &translationFile, filesInPath) {
|
||||
if (!translationFiles.contains(translationFile)) {
|
||||
translationFiles.append(translationFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,11 +326,6 @@ UserManager *NymeaCore::userManager() const
|
||||
return m_userManager;
|
||||
}
|
||||
|
||||
CloudManager *NymeaCore::cloudManager() const
|
||||
{
|
||||
return m_cloudManager;
|
||||
}
|
||||
|
||||
DebugServerHandler *NymeaCore::debugServerHandler() const
|
||||
{
|
||||
return m_debugServerHandler;
|
||||
|
||||
@ -64,7 +64,6 @@ class UserManager;
|
||||
class Platform;
|
||||
class System;
|
||||
class ExperienceManager;
|
||||
class CloudManager;
|
||||
class ZigbeeManager;
|
||||
class ZWaveManager;
|
||||
class ModbusRtuManager;
|
||||
@ -108,7 +107,6 @@ public:
|
||||
BluetoothServer *bluetoothServer() const;
|
||||
NetworkManager *networkManager() const;
|
||||
UserManager *userManager() const;
|
||||
CloudManager *cloudManager() const;
|
||||
DebugServerHandler *debugServerHandler() const;
|
||||
TagsStorage *tagsStorage() const;
|
||||
Platform *platform() const;
|
||||
@ -140,7 +138,6 @@ private:
|
||||
LogEngine *m_logEngine = nullptr;
|
||||
Logger *m_logger = nullptr;
|
||||
TimeManager *m_timeManager = nullptr;
|
||||
CloudManager *m_cloudManager = nullptr;
|
||||
HardwareManagerImplementation *m_hardwareManager = nullptr;
|
||||
DebugServerHandler *m_debugServerHandler = nullptr;
|
||||
TagsStorage *m_tagsStorage = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user