SYNERGY-1218 Wrong window title after open preferences

This commit is contained in:
Serhii Hadzhilov 2021-09-28 11:39:53 +03:00
parent 7ed65369fb
commit 06f7c1d899
2 changed files with 13 additions and 10 deletions

View file

@ -184,12 +184,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
connect (m_AppConfig, SIGNAL(zeroConfToggled()),
this, SLOT(zeroConfToggled()), Qt::QueuedConnection);
#ifdef SYNERGY_ENTERPRISE
setWindowTitle ("Synergy 1 Enterprise");
#else
setWindowTitle (m_LicenseManager->activeEditionName());
m_LicenseManager->refresh();
#endif
updateWindowTitle();
QString lastVersion = m_AppConfig->lastVersion();
QString currentVersion = m_VersionChecker.getVersion();
@ -620,9 +615,6 @@ void MainWindow::restartSynergy()
void MainWindow::proofreadInfo()
{
#ifndef SYNERGY_ENTERPRISE
setEdition(m_AppConfig->edition()); // Why is this here?
#endif
int oldState = m_SynergyState;
m_SynergyState = synergyDisconnected;
setSynergyState((qSynergyState)oldState);
@ -1174,7 +1166,7 @@ void MainWindow::changeEvent(QEvent* event)
{
retranslateUi(this);
retranslateMenuBar();
updateWindowTitle();
proofreadInfo();
break;
@ -1303,6 +1295,16 @@ void MainWindow::updateAutoConfigWidgets()
m_pComboServerList->hide();
}
void MainWindow::updateWindowTitle()
{
#ifdef SYNERGY_ENTERPRISE
setWindowTitle ("Synergy 1 Enterprise");
#else
setWindowTitle (m_LicenseManager->activeEditionName());
m_LicenseManager->refresh();
#endif
}
void MainWindow::on_m_pActionSettings_triggered()
{
auto result = SettingsDialog(this, appConfig()).exec();

View file

@ -252,6 +252,7 @@ public slots:
ClientConnection m_clientConnection;
void updateAutoConfigWidgets();
void updateWindowTitle();
private slots:
void on_m_pButtonApply_clicked();