From db594af8e675e969e2612b6f38f4d810e1e29f12 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 24 Jan 2016 07:18:32 +1000 Subject: [PATCH] Show revision in mainwindow titlebar, remove accidental conditional PRS1 F3 check --- sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp | 6 +++--- sleepyhead/mainwindow.cpp | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp index dbceaeb0..0215c742 100644 --- a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp @@ -1114,7 +1114,8 @@ bool PRS1Import::ParseF0Events() int size = event->m_data.size(); - if (event->fileVersion == 3) size -= 2; + bool FV3 = (event->fileVersion == 3); + if (FV3) size -= 2; unsigned char * buffer = (unsigned char *)event->m_data.data(); CPAPMode mode = (CPAPMode) session->settings[CPAP_Mode].toInt(); @@ -1150,7 +1151,6 @@ bool PRS1Import::ParseF0Events() case 0x00: // Unknown 00 - if (event->family == 3) if (!Code[0]) { if (!(Code[0] = session->AddEventList(PRS1_00, EVL_Event))) { return false; } } @@ -1208,7 +1208,7 @@ bool PRS1Import::ParseF0Events() break; case 0x03: // BIPAP Pressure - if (event->fileVersion == 3) { + if (FV3) { if (!PRESSURE) { PRESSURE = session->AddEventList(CPAP_Pressure, EVL_Event, 0.1F); diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 228ccd5c..c2f8a0f7 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -143,16 +143,12 @@ MainWindow::MainWindow(QWidget *parent) : connect(logger, SIGNAL(outputLog(QString)), this, SLOT(logMessage(QString))); } - QString version = VersionString; + QString version = VersionString + "-" + QString(GIT_REVISION) + "-" + getGraphicsEngine(); -#ifdef TEST_BUILD - version += QString(STR_TestBuild); -#else +#ifndef TEST_BUILD ui->warningLabel->hide(); #endif - version += " "+getGraphicsEngine(); - if (QString(GIT_BRANCH) != "master") { version += " [" + QString(GIT_BRANCH)+" branch]"; }