From 1a7473d328474c2f7af5d16db18c5d1afe25cc62 Mon Sep 17 00:00:00 2001 From: Bob Kenny Date: Mon, 4 Jan 2016 01:32:37 -0500 Subject: [PATCH 1/3] Corrected try/catch to be references --- sleepyhead/SleepLib/loader_plugins/icon_loader.cpp | 2 +- sleepyhead/SleepLib/profiles.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp index b6b8dee1..2487cca8 100644 --- a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp @@ -134,7 +134,7 @@ int FPIconLoader::Open(QString path) if (m) { c+=OpenMachine(m, npath); } - } catch (OneTypePerDay e) { + } catch (OneTypePerDay& e) { Q_UNUSED(e) p_profile->DelMachine(m); MachList.erase(MachList.find(info.serial)); diff --git a/sleepyhead/SleepLib/profiles.cpp b/sleepyhead/SleepLib/profiles.cpp index d37457aa..5e037052 100644 --- a/sleepyhead/SleepLib/profiles.cpp +++ b/sleepyhead/SleepLib/profiles.cpp @@ -581,7 +581,7 @@ void Profile::LoadMachineData() } else { try { m->Load(); - } catch (OldDBVersion e) { + } catch (OldDBVersion& e) { Q_UNUSED(e) DataFormatError(m); } From edd7ef95dde41036735ebb8e9b74a92092aea8b6 Mon Sep 17 00:00:00 2001 From: Bob Kenny Date: Mon, 4 Jan 2016 01:48:40 -0500 Subject: [PATCH 2/3] Corrected logic in on_aboutToQuit(). processEvents() should occur before msleep(), so that the Notify gets displayed properly. msleep() before process events did not cause the Notify to occur in opensuse Linux. Instead, an empty Notify appeared. --- sleepyhead/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 5d958f22..4a1bd824 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -490,8 +490,8 @@ void loadChannels() void MainWindow::on_aboutToQuit() { Notify(QObject::tr("Don't forget to place your datacard back in your CPAP machine"), QObject::tr("SleepyHead Reminder")); - QThread::msleep(1000); QApplication::processEvents(); + QThread::msleep(1000); } void MainWindow::closeEvent(QCloseEvent * event) From 9f0544bab2501c242cb2c4043f7982ae53ea8bf1 Mon Sep 17 00:00:00 2001 From: Bob Kenny Date: Mon, 4 Jan 2016 23:18:14 -0500 Subject: [PATCH 3/3] Fixed gLineChart:CloneInto() --- sleepyhead/Graphs/gLineChart.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleepyhead/Graphs/gLineChart.h b/sleepyhead/Graphs/gLineChart.h index 4895bda1..92849e13 100644 --- a/sleepyhead/Graphs/gLineChart.h +++ b/sleepyhead/Graphs/gLineChart.h @@ -139,8 +139,8 @@ class gLineChart: public Layer layer->m_report_empty = m_report_empty; layer->m_square_plot = m_square_plot; layer->m_disable_accel = m_disable_accel; - layer->subtract_offset = layer->subtract_offset; - layer->m_codes = layer->m_codes; + layer->subtract_offset = subtract_offset; + layer->m_codes = m_codes; layer->m_threshold = m_threshold; layer->m_square = m_square; layer->m_enabled = m_enabled;