From bed3cf154a972b9de591050c20e9e035f7de2314 Mon Sep 17 00:00:00 2001 From: "Dipl.-Ing. Raoul Rubien, BSc" Date: Sat, 3 Jan 2026 09:30:14 +0100 Subject: [PATCH] Fixes 11 Compiler Warnings (#10753) * fixes: wxTimerEvent not supposed to be created by user code [-Wdeprecated-declarations] * use wxTimerEvent instead of wxCommandEvent. --------- Co-authored-by: SoftFever --- src/slic3r/GUI/CalibrationPanel.cpp | 6 +++--- src/slic3r/GUI/MultiMachineManagerPage.cpp | 2 +- src/slic3r/GUI/MultiMachinePage.cpp | 6 +++--- src/slic3r/GUI/MultiTaskManagerPage.cpp | 2 +- src/slic3r/GUI/SendMultiMachinePage.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/slic3r/GUI/CalibrationPanel.cpp b/src/slic3r/GUI/CalibrationPanel.cpp index 055cbe905d..12162615aa 100644 --- a/src/slic3r/GUI/CalibrationPanel.cpp +++ b/src/slic3r/GUI/CalibrationPanel.cpp @@ -269,7 +269,7 @@ void SelectMObjectPopup::Popup(wxWindow* WXUNUSED(focus)) } } - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxTimerEvent(*m_refresh_timer)); PopupWindow::Popup(); } @@ -505,7 +505,7 @@ void CalibrationPanel::init_timer() m_refresh_timer = new wxTimer(); m_refresh_timer->SetOwner(this); m_refresh_timer->Start(REFRESH_INTERVAL); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxCommandEvent(wxEVT_TIMER)); } void CalibrationPanel::on_timer(wxTimerEvent& event) { @@ -634,7 +634,7 @@ bool CalibrationPanel::Show(bool show) { m_refresh_timer->Stop(); m_refresh_timer->SetOwner(this); m_refresh_timer->Start(REFRESH_INTERVAL); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxCommandEvent(wxEVT_TIMER)); DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); if (dev) { diff --git a/src/slic3r/GUI/MultiMachineManagerPage.cpp b/src/slic3r/GUI/MultiMachineManagerPage.cpp index 3956f89072..5b0ca791b7 100644 --- a/src/slic3r/GUI/MultiMachineManagerPage.cpp +++ b/src/slic3r/GUI/MultiMachineManagerPage.cpp @@ -653,7 +653,7 @@ void MultiMachineManagerPage::start_timer() m_flipping_timer->SetOwner(this); m_flipping_timer->Start(1000); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxTimerEvent(*m_flipping_timer)); } void MultiMachineManagerPage::update_page_number() diff --git a/src/slic3r/GUI/MultiMachinePage.cpp b/src/slic3r/GUI/MultiMachinePage.cpp index f7cb05a80e..b9b71ad670 100644 --- a/src/slic3r/GUI/MultiMachinePage.cpp +++ b/src/slic3r/GUI/MultiMachinePage.cpp @@ -61,7 +61,7 @@ bool MultiMachinePage::Show(bool show) m_refresh_timer->Stop(); m_refresh_timer->SetOwner(this); m_refresh_timer->Start(2000); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxTimerEvent(*m_refresh_timer)); } else { m_refresh_timer->Stop(); @@ -96,7 +96,7 @@ void MultiMachinePage::init_timer() m_refresh_timer = new wxTimer(); //m_refresh_timer->SetOwner(this); //m_refresh_timer->Start(8000); - //wxPostEvent(this, wxTimerEvent()); + //wxPostEvent(this, wxTimerEvent(*m_refresh_timer)); } void MultiMachinePage::on_timer(wxTimerEvent& event) @@ -482,7 +482,7 @@ bool MultiMachinePickPage::Show(bool show) //m_refresh_timer->Stop(); //m_refresh_timer->SetOwner(this); //m_refresh_timer->Start(4000); - //wxPostEvent(this, wxTimerEvent()); + //wxPostEvent(this, wxTimerEvent(*m_refresh_timer)); } else { //m_refresh_timer->Stop(); diff --git a/src/slic3r/GUI/MultiTaskManagerPage.cpp b/src/slic3r/GUI/MultiTaskManagerPage.cpp index 37321063f8..0b0b422eb4 100644 --- a/src/slic3r/GUI/MultiTaskManagerPage.cpp +++ b/src/slic3r/GUI/MultiTaskManagerPage.cpp @@ -1402,7 +1402,7 @@ void CloudTaskManagerPage::start_timer() m_flipping_timer->SetOwner(this); m_flipping_timer->Start(1000); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxTimerEvent(*m_flipping_timer)); } void CloudTaskManagerPage::on_timer(wxTimerEvent& event) diff --git a/src/slic3r/GUI/SendMultiMachinePage.cpp b/src/slic3r/GUI/SendMultiMachinePage.cpp index 1060dc253c..3578e4047c 100644 --- a/src/slic3r/GUI/SendMultiMachinePage.cpp +++ b/src/slic3r/GUI/SendMultiMachinePage.cpp @@ -801,7 +801,7 @@ bool SendMultiMachinePage::Show(bool show) m_refresh_timer->Stop(); m_refresh_timer->SetOwner(this); m_refresh_timer->Start(4000); - wxPostEvent(this, wxTimerEvent()); + wxPostEvent(this, wxTimerEvent(*m_refresh_timer)); } else { m_refresh_timer->Stop();