From 0bae409d577e1efddacec5be7b0c97329eff854f Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 9 Nov 2024 00:55:32 +0100 Subject: [PATCH] fix: server config dialog show event. Fixes issue 2067 on github. Was initially suggested by sithlord48. --- .../arch_bug_when_configuring_server.bugfix | 1 + src/gui/src/ServerConfigDialog.cpp | 13 ------------- src/gui/src/ServerConfigDialog.h | 1 - 3 files changed, 1 insertion(+), 14 deletions(-) create mode 100644 doc/newsfragments/arch_bug_when_configuring_server.bugfix diff --git a/doc/newsfragments/arch_bug_when_configuring_server.bugfix b/doc/newsfragments/arch_bug_when_configuring_server.bugfix new file mode 100644 index 00000000..65060e11 --- /dev/null +++ b/doc/newsfragments/arch_bug_when_configuring_server.bugfix @@ -0,0 +1 @@ +Fixed a segmentation fault that would occur when configuring servers on certain platforms. This solution was proposed by sithlord48 and they used it to fix the issue for deskflow. diff --git a/src/gui/src/ServerConfigDialog.cpp b/src/gui/src/ServerConfigDialog.cpp index ec81702d..5783e435 100644 --- a/src/gui/src/ServerConfigDialog.cpp +++ b/src/gui/src/ServerConfigDialog.cpp @@ -74,19 +74,6 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config, co model().screen(serverConfig().numColumns() / 2, serverConfig().numRows() / 2) = Screen(defaultScreenName); } -void ServerConfigDialog::showEvent(QShowEvent* event) -{ - (void) event; - - QDialog::show(); - - if (!m_Message.isEmpty()) - { - // TODO: ideally this message box should pop up after the dialog is shown - QMessageBox::information(this, tr("Configure server"), m_Message); - } -} - void ServerConfigDialog::accept() { serverConfig().haveHeartbeat(ui_->m_pCheckBoxHeartbeat->isChecked()); diff --git a/src/gui/src/ServerConfigDialog.h b/src/gui/src/ServerConfigDialog.h index 6b306f6e..aacf2ef5 100644 --- a/src/gui/src/ServerConfigDialog.h +++ b/src/gui/src/ServerConfigDialog.h @@ -39,7 +39,6 @@ class ServerConfigDialog : public QDialog public slots: void accept() override; - void showEvent(QShowEvent* event) override; void message(const QString& message) { m_Message = message; } protected slots: -- 2.49.0