Fix a couple of spelling mistakes, try out PrecompiledHeaders

This commit is contained in:
Mark Watkins 2018-06-13 01:06:37 +10:00
parent 66b8a39f53
commit 0d76c5eb9c
4 changed files with 77 additions and 18 deletions

View File

@ -28,7 +28,7 @@
<enum>QTabWidget::Triangular</enum> <enum>QTabWidget::Triangular</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="aboutTab"> <widget class="QWidget" name="aboutTab">
<attribute name="title"> <attribute name="title">
@ -162,8 +162,8 @@ p, li { white-space: pre-wrap; }
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Support SleepyHead Development&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Support SleepyHead Development&lt;/span&gt;&lt;/p&gt;
&lt;hr /&gt; &lt;hr /&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;All software, regardless of it's software licensing costs time, money and resources to create and maintain, especially complex applications like SleepyHead.&lt;br /&gt;&lt;br /&gt;The SleepyHead project was created early in 2011 by myself (&lt;a href=&quot;http://jedimark.net&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Jedimark&lt;/span&gt;&lt;/a&gt;), and has grown over the years into a seriously complex cross platform desktop application. It is the compound result of an insane amount of hard work and many, many all nighter hacking sessions, and time spent distracted from family responsibilties.&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;All software, regardless of its software licensing costs time, money and resources to create and maintain, especially complex applications like SleepyHead.&lt;br /&gt;&lt;br /&gt;The SleepyHead project was created early in 2011 by myself (&lt;a href=&quot;http://jedimark.net&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Jedimark&lt;/span&gt;&lt;/a&gt;), and has grown over the years into a seriously complex cross platform desktop application. It is the compound result of an insane amount of hard work and many, many all nighter hacking sessions, and time spent distracted from family responsibilties.&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;There is a lot of ongoing work trying to keep SleepyHead up to date with ever changing CPAP machine variants as well as the continuously improving understanding of the undocumented data formats. I know I haven't always kept up, but I really do try my best.&lt;br /&gt;&lt;br /&gt;I'd like to offer a huge thankyou for those who have given donations and support along the way... you truly helped to make SleepyHead what it is today.&lt;br /&gt;&lt;br /&gt;If SleepyHead has benefited you and have the means to do so, please consider showing your apreciation by supportting continuing development of this software project.&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;There is a lot of ongoing work trying to keep SleepyHead up to date with ever changing CPAP machine variants as well as the continuously improving understanding of the undocumented data formats. I know I haven't always kept up, but I really do try my best.&lt;br /&gt;&lt;br /&gt;I'd like to offer a huge thankyou for those who have given donations and support along the way... you truly helped to make SleepyHead what it is today.&lt;br /&gt;&lt;br /&gt;If SleepyHead has benefited you and have the means to do so, please consider showing your appreciation by supporting the continued development of this software project.&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;hr /&gt; &lt;hr /&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://sleepyhead.jedimark.net/donate.php&quot;&gt;&lt;span style=&quot; font-size:11pt; font-weight:600; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;Donate via Paypal&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://sleepyhead.jedimark.net/donate.php&quot;&gt;&lt;span style=&quot; font-size:11pt; font-weight:600; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;Donate via Paypal&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;

52
sleepyhead/pch.h Normal file
View File

@ -0,0 +1,52 @@
#if defined __cplusplus
/* Add C++ includes here */
#include <iostream>
#include <QMap>
#include <QList>
#include <QVector>
#include <QHash>
#include <QFile>
#include <QDataStream>
#include <QObject>
#include <QApplication>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QBoxLayout>
#include <QPushButton>
#include <QLabel>
#include <QWidget>
#include <QDialog>
#include <QProgressBar>
#include <QDir>
#include <QString>
#include <QModelIndex>
#include <QStandardItemModel>
#include <QSortFilterProxyModel>
#include <QMenu>
#include <QDateEdit>
#include <QDebug>
#include <QRunnable>
#include <QThreadPool>
#include <QMutex>
#include <QTime>
#include <QUrl>
#include <QPrinter>
#include <QHelpEngine>
#include <QTabWidget>
#include <QAction>
#include <QColor>
#include <QTextBrowser>
#include <QLineEdit>
#include <QCheckBox>
#include <QPixmap>
#include <QImage>
#include <QApplication>
#include <QMainWindow>
#include <QLine>
#include <QLineF>
#include <QRect>
#include <QLineF>
#endif

View File

@ -689,7 +689,7 @@ bool PreferencesDialog::Save()
needs_reload = true; needs_reload = true;
} }
if (ui->gfxEngineCombo->currentIndex() != currentGFXEngine()) { if ((unsigned int)ui->gfxEngineCombo->currentIndex() != currentGFXEngine()) {
setCurrentGFXEngine(ui->gfxEngineCombo->currentIndex()); setCurrentGFXEngine(ui->gfxEngineCombo->currentIndex());
needs_restart = true; needs_restart = true;
} }
@ -752,7 +752,7 @@ bool PreferencesDialog::Save()
} else { recalc_events = false; } } else { recalc_events = false; }
} else if (needs_restart) { } else if (needs_restart) {
if (QMessageBox::question(this, tr("Restart Required"), if (QMessageBox::question(this, tr("Restart Required"),
tr("One or more of the changes you have made will require this application to be restarted,\nin order for these changes to come into effect.\n\nWould you like do this now?"), tr("One or more of the changes you have made will require this application to be restarted, in order for these changes to come into effect.\n\nWould you like do this now?"),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) { QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) {
return false; return false;
} }

View File

@ -15,7 +15,10 @@ DEFINES += QT_DEPRECATED_WARNINGS
#SleepyHead requires OpenGL 2.0 support to run smoothly #SleepyHead requires OpenGL 2.0 support to run smoothly
#On platforms where it's not available, it can still be built to work #On platforms where it's not available, it can still be built to work
#provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL) #provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL)
#contains(DEFINES, BrokenGL) { contains(DEFINES, BrokenGL) {
message("BrokgenGL has been disabled to test the Dynamic GFX Engine selection")
DEFINES-=BrokenGL
}
# message("Building with QWidget gGraphView") # message("Building with QWidget gGraphView")
# DEFINES += BROKEN_OPENGL_BUILD # DEFINES += BROKEN_OPENGL_BUILD
#} else:contains(DEFINES, NoGL) { #} else:contains(DEFINES, NoGL) {
@ -26,7 +29,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
# message("Building with QGLWidget gGraphView") # message("Building with QGLWidget gGraphView")
#} #}
DEFINES -= BrokenGL
QT += opengl QT += opengl
DEFINES += LOCK_RESMED_SESSIONS DEFINES += LOCK_RESMED_SESSIONS
@ -37,13 +39,14 @@ CONFIG += rtti
# Remove this crap because it sucks # Remove this crap because it sucks
CONFIG-=debug_and_release CONFIG-=debug_and_release
#static { contains(DEFINES, STATIC) {
# CONFIG += static static {
# QTPLUGIN += qsvg qgif qpng CONFIG += static
QTPLUGIN += qsvg qgif qpng
# DEFINES += STATIC // Equivalent to "#define STATIC" in source code message("Static build.")
# message("Static build.") }
#} }
TARGET = SleepyHead TARGET = SleepyHead
unix:!macx:!haiku { unix:!macx:!haiku {
@ -52,7 +55,6 @@ unix:!macx:!haiku {
TEMPLATE = app TEMPLATE = app
gitinfotarget.target = git_info.h gitinfotarget.target = git_info.h
gitinfotarget.depends = FORCE gitinfotarget.depends = FORCE
@ -96,18 +98,18 @@ haiku {
} }
CONFIG(release, debug|release) { CONFIG(release, debug|release) {
contains(RELEASE, 1) { contains(DEFINES, UPX_PACK_EXE) {
win32:QMAKE_POST_LINK += upx -k --best --overlay=strip --strip-relocs=0 --compress-icons=2 $(DESTDIR_TARGET) DEFINES-=UPX_PACK_EXE
win32:QMAKE_POST_LINK += upx -k --best --overlay=strip --strip-relocs=0 $(DESTDIR_TARGET)
} }
} }
win32 { win32 {
DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this
# RC_FILE += win_icon.rc
LIBS += -lsetupapi LIBS += -lsetupapi
QMAKE_TARGET_PRODUCT = SleepyHead QMAKE_TARGET_PRODUCT = SleepyHead
QMAKE_TARGET_COMPANY = Jedimark QMAKE_TARGET_COMPANY = Jedimark
QMAKE_TARGET_COPYRIGHT = Copyright (c)2018 Mark Watkins QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins
QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review" QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review"
VERSION = 1.1.0.0 VERSION = 1.1.0.0
@ -124,6 +126,11 @@ win32 {
# MingW needs this # MingW needs this
LIBS += -lz LIBS += -lz
} }
CONFIG += precompile_header
PRECOMPILED_HEADER = pch.h
HEADERS += pch.h
} }
TRANSLATIONS = $$files($$PWD/../Translations/*.ts) TRANSLATIONS = $$files($$PWD/../Translations/*.ts)