Merge PR #719: NymeaCore: class cleanup and statup improvements

This commit is contained in:
jenkins 2026-01-19 10:09:49 +01:00
commit 6999f96577
3 changed files with 9 additions and 14 deletions

View File

@ -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);

View File

@ -56,6 +56,7 @@
#include <QDir>
#include <QCoreApplication>
#include <QMetaObject>
#ifdef WITH_SYSTEMD
#include <systemd/sd-daemon.h>
@ -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;

View File

@ -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;