From d6d6780cdc41f538dd64826a68532bb392a2fbdd Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 23 Jun 2014 01:14:46 +1000 Subject: [PATCH] Windows build fix --- sleepyhead/SleepLib/loader_plugins/icon_loader.cpp | 2 +- sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp | 4 ---- sleepyhead/SleepLib/machine_loader.cpp | 4 ---- sleepyhead/logger.cpp | 2 +- sleepyhead/main.cpp | 2 +- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp index 42ff4645..e7290f07 100644 --- a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp @@ -502,7 +502,7 @@ bool FPIconLoader::OpenFLW(Machine *mach, QString filename, Profile *profile) do { sit--; s1 = sit.value(); - qint64 z = qAbs(sit.key() - ts); + qint64 z = qAbs(qint64(sit.key()) - qint64(ts)); if (z < 3600) { if ((k < 0) || (k > z)) { k = z; diff --git a/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp b/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp index 49fb5805..d143b930 100644 --- a/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/resmed_loader.cpp @@ -1251,10 +1251,6 @@ int ResmedLoader::Open(QString path, Profile *profile) for (it = strsess.begin(); it != end; ++it) { STRRecord & R = it.value(); - if (R.date == QDate(2013,6,20)) { - int i=5; - } - if (ignoreold && (R.maskon < ignoreolder)) { m->skipSaveTask(); continue; diff --git a/sleepyhead/SleepLib/machine_loader.cpp b/sleepyhead/SleepLib/machine_loader.cpp index 7371afbf..3141b2f8 100644 --- a/sleepyhead/SleepLib/machine_loader.cpp +++ b/sleepyhead/SleepLib/machine_loader.cpp @@ -135,10 +135,6 @@ void MachineLoader::runTasks(bool threaded) while (!m_tasklist.isEmpty()) { if (threadpool->tryStart(m_tasklist.at(0))) { m_tasklist.pop_front(); - if (m_tasklist.isEmpty()) { - int i=5; - } - float f = float(m_currenttask) / float(m_totaltasks) * 100.0; qprogress->setValue(f); m_currenttask++; diff --git a/sleepyhead/logger.cpp b/sleepyhead/logger.cpp index 263dbbe1..d8280c54 100644 --- a/sleepyhead/logger.cpp +++ b/sleepyhead/logger.cpp @@ -116,7 +116,7 @@ void LogThread::run() running = true; do { strlock.lock(); - int r = receivers(SIGNAL(outputLog(QString()))); + //int r = receivers(SIGNAL(outputLog(QString()))); while (!buffer.isEmpty()) { QString msg = buffer.takeFirst(); fprintf(stderr, "%s\n", msg.toLocal8Bit().data()); diff --git a/sleepyhead/main.cpp b/sleepyhead/main.cpp index e04325d5..3503b629 100644 --- a/sleepyhead/main.cpp +++ b/sleepyhead/main.cpp @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) #if defined(Q_OS_WIN) bool angle_supported = getGraphicsEngine().contains(CSTR_GFX_ANGLE, Qt::CaseInsensitive) && (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA); if (bad_graphics) { - bad_graphics = !angle_supported + bad_graphics = !angle_supported; } #endif