Main Window receives screen name change (#6916)

* corresponding slot and signal

* changelog updated

Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
This commit is contained in:
Ignacio Rodríguez 2021-01-20 18:27:46 +07:00 committed by GitHub
parent ec79083753
commit 519b4af730
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 0 deletions

View file

@ -3,6 +3,9 @@ v1.13.1-snapshot
Bug fixes:
- #6900 Remaining SonarCloud reported bug items (test fixed)
- #6889 Systray Icon on Ubuntu Auto Start (take 2)
Enhancements:
- #6916 Main Window receives screen name change
- #6910 Don't use the word “Version” for release names because it can lead to errors during update checking.
- #6918 Removing positional union initialisation
===========

View file

@ -335,6 +335,7 @@ void AppConfig::setLastVersion(const QString& version) {
void AppConfig::setScreenName(const QString &s) {
setSettingModified(m_ScreenName, s);
emit screenNameChanged();
}
void AppConfig::setPort(int i) {

View file

@ -293,6 +293,7 @@ protected:
signals:
void sslToggled() const;
void zeroConfToggled();
void screenNameChanged() const;
};
#endif

View file

@ -135,7 +135,9 @@ MainWindow::MainWindow (AppConfig& appConfig,
m_pWidgetUpdate->hide();
m_VersionChecker.setApp(appPath(appConfig.synergycName()));
m_pLabelScreenName->setText(getScreenName());
connect(m_AppConfig, SIGNAL(screenNameChanged()), this, SLOT(updateScreenName()));
m_pLabelIpAddresses->setText(getIPAddresses());
#if defined(Q_OS_WIN)
@ -1403,3 +1405,8 @@ void MainWindow::windowStateChanged()
if (windowState() == Qt::WindowMinimized && appConfig().getMinimizeToTray())
hide();
}
void MainWindow::updateScreenName()
{
m_pLabelScreenName->setText(getScreenName());
}

View file

@ -143,6 +143,7 @@ public slots:
protected slots:
void updateLocalFingerprint();
void updateScreenName();
void on_m_pGroupClient_toggled(bool on);
void on_m_pGroupServer_toggled(bool on);
bool on_m_pButtonBrowseConfigFile_clicked();