From 3d2883ad0275c022986d627c6c878051bcef2c87 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Fri, 18 Oct 2024 17:29:45 -0400 Subject: [PATCH] fix: remove server config dialog custom show event Fixes Crash with Qt 6.8 --- src/gui/src/ServerConfigDialog.cpp | 12 ------------ src/gui/src/ServerConfigDialog.h | 1 - 2 files changed, 13 deletions(-) diff --git a/src/gui/src/ServerConfigDialog.cpp b/src/gui/src/ServerConfigDialog.cpp index 473156559..95e229354 100644 --- a/src/gui/src/ServerConfigDialog.cpp +++ b/src/gui/src/ServerConfigDialog.cpp @@ -41,7 +41,6 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent, ServerConfig &config, Ap m_Message(""), m_appConfig(appConfig) { - setupUi(this); // force the first tab, since qt creator sets the active tab as the last one @@ -99,7 +98,6 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent, ServerConfig &config, Ap // computers connect(&m_ScreenSetupModel, &ScreenSetupModel::screensChanged, this, &ServerConfigDialog::onChange); - #if QT_VERSION <= QT_VERSION_CHECK(6, 7, 0) // advanced connect(m_pCheckBoxSwitchDelay, &QCheckBox::stateChanged, this, [this](const int &v) { @@ -250,16 +248,6 @@ bool ServerConfigDialog::addClient(const QString &clientName) return addComputer(clientName, true); } -void ServerConfigDialog::showEvent(QShowEvent *event) -{ - QDialog::show(); - - if (!m_Message.isEmpty()) { - // TODO: ideally this massage box should pop up after the dialog is shown - QMessageBox::information(this, tr("Configure server"), m_Message); - } -} - void ServerConfigDialog::accept() { if (m_pCheckBoxUseExternalConfig->isChecked() && !QFile::exists(m_pEditConfigFile->text())) { diff --git a/src/gui/src/ServerConfigDialog.h b/src/gui/src/ServerConfigDialog.h index af195d69a..df85d9747 100644 --- a/src/gui/src/ServerConfigDialog.h +++ b/src/gui/src/ServerConfigDialog.h @@ -36,7 +36,6 @@ public: public slots: void accept() override; void reject() override; - void showEvent(QShowEvent *event) override; void message(const QString &message) { m_Message = message;