added signal-slot connection between corecontroller and systemtraynofificationhandler updating websiteurl
This commit is contained in:
parent
979ab42c5a
commit
95d48d8a2d
4 changed files with 19 additions and 1 deletions
|
@ -243,6 +243,9 @@ void CoreController::initNotificationHandler()
|
|||
&ConnectionController::closeConnection);
|
||||
connect(this, &CoreController::translationsUpdated, m_notificationHandler.get(), &NotificationHandler::onTranslationsUpdated);
|
||||
#endif
|
||||
|
||||
auto* trayHandler = qobject_cast<SystemTrayNotificationHandler*>(m_notificationHandler.get());
|
||||
connect(this, &CoreController::websiteUrlChanged, trayHandler, &SystemTrayNotificationHandler::updateWebsiteUrl);
|
||||
}
|
||||
|
||||
void CoreController::updateTranslator(const QLocale &locale)
|
||||
|
@ -279,6 +282,7 @@ void CoreController::updateTranslator(const QLocale &locale)
|
|||
m_engine->retranslate();
|
||||
|
||||
emit translationsUpdated();
|
||||
emit websiteUrlChanged(m_languageModel->getCurrentSiteUrl());
|
||||
}
|
||||
|
||||
void CoreController::initErrorMessagesHandler()
|
||||
|
@ -335,6 +339,8 @@ void CoreController::initTranslationsUpdatedHandler()
|
|||
connect(m_languageModel.get(), &LanguageModel::updateTranslations, this, &CoreController::updateTranslator);
|
||||
connect(this, &CoreController::translationsUpdated, m_languageModel.get(), &LanguageModel::translationsUpdated);
|
||||
connect(this, &CoreController::translationsUpdated, m_connectionController.get(), &ConnectionController::onTranslationsUpdated);
|
||||
//auto* trayHandler = qobject_cast<SystemTrayNotificationHandler*>(m_notificationHandler.get());
|
||||
//connect(this, &CoreController::websiteUrlChanged, trayHandler, &SystemTrayNotificationHandler::updateWebsiteUrl);
|
||||
}
|
||||
|
||||
void CoreController::initAutoConnectHandler()
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <QQmlContext>
|
||||
#include <QThread>
|
||||
|
||||
#include "ui/systemtray_notificationhandler.h"
|
||||
|
||||
#include "ui/controllers/api/apiConfigsController.h"
|
||||
#include "ui/controllers/api/apiSettingsController.h"
|
||||
#include "ui/controllers/api/apiPremV1MigrationController.h"
|
||||
|
@ -61,6 +63,7 @@ public:
|
|||
|
||||
signals:
|
||||
void translationsUpdated();
|
||||
void websiteUrlChanged(const QString &newUrl);
|
||||
|
||||
private:
|
||||
void initModels();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue