From 76a0a6cb8d895a57a7ac5f3703b327bab5e4288d Mon Sep 17 00:00:00 2001
From: Mark Watkins
Date: Wed, 14 May 2014 16:49:37 +1000
Subject: [PATCH] Removed seperate UpdateNotes. just keeping ReleaseNotes from
now on
---
sleepyhead/Resources.qrc | 1 -
sleepyhead/UpdaterWindow.cpp | 9 ++++---
sleepyhead/docs/release_notes.html | 23 +++++++++++++++---
sleepyhead/docs/update_notes.html | 23 ------------------
sleepyhead/main.cpp | 38 ++++--------------------------
5 files changed, 30 insertions(+), 64 deletions(-)
delete mode 100644 sleepyhead/docs/update_notes.html
diff --git a/sleepyhead/Resources.qrc b/sleepyhead/Resources.qrc
index fe019594..87ab1038 100644
--- a/sleepyhead/Resources.qrc
+++ b/sleepyhead/Resources.qrc
@@ -39,7 +39,6 @@
docs/script.js
icons/nographs.png
icons/sheep.png
- docs/update_notes.html
docs/sheep.png
icons/Bob Strikes Back.png
icons/Jedimark.png
diff --git a/sleepyhead/UpdaterWindow.cpp b/sleepyhead/UpdaterWindow.cpp
index c4295423..67a0b37f 100644
--- a/sleepyhead/UpdaterWindow.cpp
+++ b/sleepyhead/UpdaterWindow.cpp
@@ -209,9 +209,6 @@ int compareVersion(QString version)
short minor = parts[1].toInt(&ok);
if (!ok) return -1;
- short patch = parts[2].toInt(&ok);
- if (!ok) return -1;
-
if (major > major_version) {
return 1;
} else if (major < major_version) {
@@ -224,6 +221,10 @@ int compareVersion(QString version)
return -1;
}
+ QStringList patchver = parts[2].split("-");
+ short patch = patchver[0].toInt(&ok);
+ if (!ok) return -1;
+
// Still here.. check patch version
if (patch > patch_number) {
return 1;
@@ -231,6 +232,8 @@ int compareVersion(QString version)
return -1;
}
+ // patchver[1] = tag..
+
// Versions match
return 0;
}
diff --git a/sleepyhead/docs/release_notes.html b/sleepyhead/docs/release_notes.html
index a96f7577..5c5b33f6 100644
--- a/sleepyhead/docs/release_notes.html
+++ b/sleepyhead/docs/release_notes.html
@@ -4,10 +4,22 @@
Release Notes
Greetings!
-A long time in the making, but better late than never, here is a new and hopefully improved SleepyHead build.
-
-New features & bugs fixes in this Update:
+Here is a new and hopefully improved SleepyHead build.
+This build features rework to the graphing code which should hopefully increase compatability a little, at the cost of a little performance.
+New features & bugs fixes in v0.9.6
+
+Switched from OpenGL to Qt QPainter backend
+Switched to Qt's pixmap caching engine
+Fix ResMed session grouping bug that caused session double-ups
+Fix EDF importer glitch on windows builds that led to faulty graph displays
+Fixed CPAP card autoscanner on Windows platform
+Added timeout dialog to CPAP card autoscanner
+Microsoft compiler fixes
+Fisher & Paykel Icon timestamp fix
+
+
+New features & bugs fixes since v0.9.5
Added ability to pin graphs to keep them on screen
Fixed tranlation loading on Mac
@@ -18,6 +30,11 @@
Added user information to Statistics page
Datacard autodetection ability
Philips Respironics 60 series fixes
+
+
+
+New features & bugs fixes since v0.9.3
+
Retina display fixes for Mac platform
Introduced yAxis Scaling modes
Cleaned up mouse handling underneath
diff --git a/sleepyhead/docs/update_notes.html b/sleepyhead/docs/update_notes.html
deleted file mode 100644
index 93d082a5..00000000
--- a/sleepyhead/docs/update_notes.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
SleepyHead BETA
-Update Notes for v0.9.6
-
-
-Changes in this version
-
-Switched from OpenGL to Qt QPainter backend
-Switched to Qt's pixmap caching engine
-Fix ResMed session grouping bug that caused session double-ups
-Fix EDF importer glitch on windows builds that led to faulty graph displays
-Fixed CPAP card autoscanner on Windows platform
-Added timeout dialog to CPAP card autoscanner
-Microsoft compiler fixes
-
-
-Sleep Well!
-
-Mark Watkins (JediMark)
-
-
diff --git a/sleepyhead/main.cpp b/sleepyhead/main.cpp
index a6f9075e..5a5cf48f 100644
--- a/sleepyhead/main.cpp
+++ b/sleepyhead/main.cpp
@@ -129,30 +129,6 @@ void release_notes()
relnotes.exec();
}
-void build_notes()
-{
- QDialog relnotes;
- relnotes.setWindowTitle(STR_TR_SleepyHead + " " + QObject::tr("SleepyHead Update Notes"));
- QVBoxLayout layout(&relnotes);
- QWebView web(&relnotes);
- relnotes.setWindowTitle(STR_TR_SleepyHead + " v" + FullVersionString + QObject::tr(" Update"));
- // Language???
-
- web.load(QUrl("qrc:/docs/update_notes.html"));
- //web.page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOn);
-
- relnotes.setLayout(&layout);
- layout.insertWidget(0, &web, 1);
- QPushButton okbtn(QObject::tr("&Ok, get on with it.."), &relnotes);
- relnotes.connect(&okbtn, SIGNAL(clicked()), SLOT(accept()));
- layout.insertWidget(1, &okbtn, 1);
- layout.setMargin(0);
- QApplication::processEvents(); // MW: Needed on Mac, as the html has to finish loading
-
- relnotes.setFixedSize(500, 400);
- relnotes.exec();
-}
-
void sDelay(int s)
{
// QThread::msleep() is exposed in Qt5
@@ -163,6 +139,8 @@ void sDelay(int s)
#endif
}
+int compareVersion(QString version);
+
int main(int argc, char *argv[])
{
#ifdef Q_WS_X11
@@ -326,17 +304,9 @@ retry_directory:
release_notes();
} else {
if (PREF.contains(STR_PREF_VersionString)) {
- QString V = PREF[STR_PREF_VersionString].toString();
- if (FullVersionString > V) {
- QString V2 = V.section("-", 0, 0);
-
- if (VersionString > V2) {
- release_notes();
- //QMessageBox::warning(0,"New Version Warning","This is a new version of SleepyHead. If you experience a crash right after clicking Ok, you will need to manually delete the "+AppRoot+" folder (it's located in your Documents folder) and reimport your data. After this things should work normally.",QMessageBox::Ok);
- } else {
- build_notes();
- }
+ if (compareVersion(PREF[STR_PREF_VersionString].toString()) < 0) {
+ release_notes();
check_updates = false;
}