refactor: MainWindow, Do not use auto connection for the computer name label

This commit is contained in:
sithlord48
2024-12-18 19:33:05 -05:00
committed by Nick Bolton
parent 4ee7d7b20f
commit be5025b225
3 changed files with 5 additions and 10 deletions

View File

@ -293,6 +293,7 @@ void MainWindow::connectSlots()
connect(ui->lineClientIp, &QLineEdit::textChanged, &m_CoreProcess, &deskflow::gui::CoreProcess::setAddress);
connect(ui->btnConfigureServer, &QPushButton::clicked, this, [this] { showConfigureServer(""); });
connect(ui->lblComputerName, &QLabel::linkActivated, this, &MainWindow::openSettings);
}
void MainWindow::onAppAboutToQuit()
@ -468,11 +469,6 @@ void MainWindow::resetCore()
m_CoreProcess.restart();
}
void MainWindow::on_m_pLabelComputerName_linkActivated(const QString &)
{
m_actionSettings->trigger();
}
void MainWindow::on_m_pLabelFingerprint_linkActivated(const QString &)
{
QMessageBox::information(this, "TLS fingerprint", TlsFingerprint::local().readFirst());
@ -1012,9 +1008,9 @@ void MainWindow::secureSocket(bool secureSocket)
void MainWindow::updateScreenName()
{
ui->m_pLabelComputerName->setText(QString("This computer's name: %1 "
R"((<a href="#" style="color: %2">change</a>))")
.arg(m_AppConfig.screenName(), kColorSecondary));
ui->lblComputerName->setText(QString("This computer's name: %1 "
R"((<a href="#" style="color: %2">change</a>))")
.arg(m_AppConfig.screenName(), kColorSecondary));
m_ServerConfig.updateServerName();
}

View File

@ -134,7 +134,6 @@ private slots:
//
// Auto-connect slots
//
void on_m_pLabelComputerName_linkActivated(const QString &link);
void on_m_pLabelFingerprint_linkActivated(const QString &link);
void on_m_pRadioGroupServer_clicked(bool);
void on_m_pRadioGroupClient_clicked(bool);

View File

@ -33,7 +33,7 @@
<item>
<layout class="QHBoxLayout" name="m_layoutName">
<item>
<widget class="QLabel" name="m_pLabelComputerName">
<widget class="QLabel" name="lblComputerName">
<property name="text">
<string notr="true">This computer's name:</string>
</property>