chore: df-gui mainwindow directly connect more methods without intermediarty methods
This commit is contained in:
parent
cad1243d75
commit
a5f28616f4
2 changed files with 3 additions and 21 deletions
|
|
@ -237,15 +237,15 @@ void MainWindow::connectSlots()
|
||||||
connect(&m_configScopes, &ConfigScopes::saving, this, &MainWindow::configScopesSaving, Qt::DirectConnection);
|
connect(&m_configScopes, &ConfigScopes::saving, this, &MainWindow::configScopesSaving, Qt::DirectConnection);
|
||||||
|
|
||||||
connect(&m_appConfig, &AppConfig::tlsChanged, this, &MainWindow::appConfigTlsChanged);
|
connect(&m_appConfig, &AppConfig::tlsChanged, this, &MainWindow::appConfigTlsChanged);
|
||||||
connect(&m_appConfig, &AppConfig::screenNameChanged, this, &MainWindow::appConfigScreenNameChanged);
|
connect(&m_appConfig, &AppConfig::screenNameChanged, this, &MainWindow::updateScreenName);
|
||||||
connect(&m_appConfig, &AppConfig::invertConnectionChanged, this, &MainWindow::appConfigInvertConnection);
|
connect(&m_appConfig, &AppConfig::invertConnectionChanged, this, &MainWindow::applyConfig);
|
||||||
|
|
||||||
connect(&m_coreProcess, &CoreProcess::starting, this, &MainWindow::coreProcessStarting, Qt::DirectConnection);
|
connect(&m_coreProcess, &CoreProcess::starting, this, &MainWindow::coreProcessStarting, Qt::DirectConnection);
|
||||||
connect(&m_coreProcess, &CoreProcess::error, this, &MainWindow::coreProcessError);
|
connect(&m_coreProcess, &CoreProcess::error, this, &MainWindow::coreProcessError);
|
||||||
connect(&m_coreProcess, &CoreProcess::logLine, this, &MainWindow::handleLogLine);
|
connect(&m_coreProcess, &CoreProcess::logLine, this, &MainWindow::handleLogLine);
|
||||||
connect(&m_coreProcess, &CoreProcess::processStateChanged, this, &MainWindow::coreProcessStateChanged);
|
connect(&m_coreProcess, &CoreProcess::processStateChanged, this, &MainWindow::coreProcessStateChanged);
|
||||||
connect(&m_coreProcess, &CoreProcess::connectionStateChanged, this, &MainWindow::coreConnectionStateChanged);
|
connect(&m_coreProcess, &CoreProcess::connectionStateChanged, this, &MainWindow::coreConnectionStateChanged);
|
||||||
connect(&m_coreProcess, &CoreProcess::secureSocket, this, &MainWindow::coreProcessSecureSocket);
|
connect(&m_coreProcess, &CoreProcess::secureSocket, this, &MainWindow::secureSocket);
|
||||||
|
|
||||||
connect(m_actionAbout, &QAction::triggered, this, &MainWindow::openAboutDialog);
|
connect(m_actionAbout, &QAction::triggered, this, &MainWindow::openAboutDialog);
|
||||||
connect(m_actionClearSettings, &QAction::triggered, this, &MainWindow::clearSettings);
|
connect(m_actionClearSettings, &QAction::triggered, this, &MainWindow::clearSettings);
|
||||||
|
|
@ -354,16 +354,6 @@ void MainWindow::versionCheckerUpdateFound(const QString &version)
|
||||||
ui->lblUpdate->setText(text);
|
ui->lblUpdate->setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::appConfigScreenNameChanged()
|
|
||||||
{
|
|
||||||
updateScreenName();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::appConfigInvertConnection()
|
|
||||||
{
|
|
||||||
applyConfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::coreProcessError(CoreProcess::Error error)
|
void MainWindow::coreProcessError(CoreProcess::Error error)
|
||||||
{
|
{
|
||||||
if (error == CoreProcess::Error::AddressMissing) {
|
if (error == CoreProcess::Error::AddressMissing) {
|
||||||
|
|
@ -761,11 +751,6 @@ void MainWindow::showFirstConnectedMessage()
|
||||||
messages::showFirstConnectedMessage(this, m_appConfig.closeToTray(), m_appConfig.enableService(), isServer);
|
messages::showFirstConnectedMessage(this, m_appConfig.closeToTray(), m_appConfig.enableService(), isServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::coreProcessSecureSocket(bool enabled)
|
|
||||||
{
|
|
||||||
secureSocket(enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::updateStatus()
|
void MainWindow::updateStatus()
|
||||||
{
|
{
|
||||||
const auto connection = m_coreProcess.connectionState();
|
const auto connection = m_coreProcess.connectionState();
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,10 @@ private:
|
||||||
|
|
||||||
void configScopesSaving();
|
void configScopesSaving();
|
||||||
void appConfigTlsChanged();
|
void appConfigTlsChanged();
|
||||||
void appConfigScreenNameChanged();
|
|
||||||
void appConfigInvertConnection();
|
|
||||||
void coreProcessStarting();
|
void coreProcessStarting();
|
||||||
void coreProcessError(CoreProcess::Error error);
|
void coreProcessError(CoreProcess::Error error);
|
||||||
void coreConnectionStateChanged(CoreProcess::ConnectionState state);
|
void coreConnectionStateChanged(CoreProcess::ConnectionState state);
|
||||||
void coreProcessStateChanged(CoreProcess::ProcessState state);
|
void coreProcessStateChanged(CoreProcess::ProcessState state);
|
||||||
void coreProcessSecureSocket(bool enabled);
|
|
||||||
void versionCheckerUpdateFound(const QString &version);
|
void versionCheckerUpdateFound(const QString &version);
|
||||||
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||||
void serverConnectionConfigureClient(const QString &clientName);
|
void serverConnectionConfigureClient(const QString &clientName);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue