diff --git a/libnymea-core/jsonrpc/jsonrpcserverimplementation.cpp b/libnymea-core/jsonrpc/jsonrpcserverimplementation.cpp index 4d7d20bc..e938593e 100644 --- a/libnymea-core/jsonrpc/jsonrpcserverimplementation.cpp +++ b/libnymea-core/jsonrpc/jsonrpcserverimplementation.cpp @@ -216,8 +216,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); diff --git a/libnymea-core/nymeacore.cpp b/libnymea-core/nymeacore.cpp index 30d1191d..327a1543 100644 --- a/libnymea-core/nymeacore.cpp +++ b/libnymea-core/nymeacore.cpp @@ -56,6 +56,7 @@ #include #include +#include #ifdef WITH_SYSTEMD #include @@ -165,6 +166,8 @@ void NymeaCore::init(const QStringList &additionalInterfaces, bool disableLogEng connect(m_thingManager, &ThingManagerImplementation::loaded, this, &NymeaCore::thingManagerLoaded); connect(m_thingManager, &ThingManagerImplementation::thingRemoved, m_userManager, &UserManager::onThingRemoved); + QMetaObject::invokeMethod(m_serverManager->jsonServer(), "setup", Qt::QueuedConnection); + m_logger->log({"started"}, {{"version", NYMEA_VERSION_STRING}}); #ifdef WITH_SYSTEMD @@ -269,10 +272,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); + } } } @@ -319,11 +324,6 @@ UserManager *NymeaCore::userManager() const return m_userManager; } -CloudManager *NymeaCore::cloudManager() const -{ - return m_cloudManager; -} - DebugServerHandler *NymeaCore::debugServerHandler() const { return m_debugServerHandler; diff --git a/libnymea-core/nymeacore.h b/libnymea-core/nymeacore.h index 3d9e5e9a..af5ecb37 100644 --- a/libnymea-core/nymeacore.h +++ b/libnymea-core/nymeacore.h @@ -57,7 +57,6 @@ class UserManager; class Platform; class System; class ExperienceManager; -class CloudManager; class ZigbeeManager; class ZWaveManager; class ModbusRtuManager; @@ -102,7 +101,6 @@ public: BluetoothServer *bluetoothServer() const; NetworkManager *networkManager() const; UserManager *userManager() const; - CloudManager *cloudManager() const; DebugServerHandler *debugServerHandler() const; TagsStorage *tagsStorage() const; Platform *platform() const; @@ -134,7 +132,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;