From 4671b9de0b77bc87dfe3dc54d21e941499d9942f Mon Sep 17 00:00:00 2001 From: Uwe Risse <dg2ycb@gmx.de> Date: Fri, 23 Jun 2023 16:39:46 +0200 Subject: [PATCH 1/2] Fix a compilation error on macOS Ventura. --- models/FrequencyList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp index 323dda126..fece1c945 100644 --- a/models/FrequencyList.cpp +++ b/models/FrequencyList.cpp @@ -1335,8 +1335,8 @@ FrequencyList_v2_101::FrequencyItems FrequencyList_v2_101::from_json_file(QFile { throw ReadFileException{tr ("No Frequencies were found")}; } - int valid_entry_count = 0; - int skipped_entry_count = 0; + int valid_entry_count [[maybe_unused]] = 0; + int skipped_entry_count [[maybe_unused]] = 0; for (auto const &item: arr) { QString mode_s, region_s; From 596f9ba10fa838400f45c1d54d3ea5a4a2eaf3b1 Mon Sep 17 00:00:00 2001 From: Uwe Risse <dg2ycb@gmx.de> Date: Fri, 23 Jun 2023 18:28:34 +0200 Subject: [PATCH 2/2] This fixes the "Unable to create shared memory segment mem_qmap." error when switching Configurations on Linux. --- widgets/mainwindow.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index e1bd8cd22..8ff9f40e7 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -470,17 +470,12 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_optimizingProgress.setMinimumDuration (15000); // only show after 15s delay //Attach or create a memory segment to be shared with QMAP. - int memSize=4096; - if(!mem_qmap.attach()) { - if(!mem_qmap.create(memSize)) { - MessageBox::information_message (this, - "Unable to create shared memory segment mem_qmap."); - } - } - ipc_qmap = (int*)mem_qmap.data(); - mem_qmap.lock(); - memset(ipc_qmap,0,memSize); //Zero all of QMAP shared memory - mem_qmap.unlock(); + int memSize=4096; + if(!mem_qmap.attach()) mem_qmap.create(memSize); + ipc_qmap = (int*)mem_qmap.data(); + mem_qmap.lock(); + memset(ipc_qmap,0,memSize); //Zero all of QMAP shared memory + mem_qmap.unlock(); // Closedown. connect (ui->actionExit, &QAction::triggered, this, &QMainWindow::close);