From 13ba9aba48a7cddbc0133bd2dc42e63529941f8a Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Mon, 30 Mar 2020 16:37:43 -0400 Subject: [PATCH 01/11] Bad: lastpath is undef for not-Linux --- oscar/mainwindow.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp index 53e8a30e..8b8f3cbc 100644 --- a/oscar/mainwindow.cpp +++ b/oscar/mainwindow.cpp @@ -829,9 +829,18 @@ void ImportDialogScan::cancelbutton() QList MainWindow::detectCPAPCards() { - const int timeout = 20000; + const int timeout = 20000; // twenty seconds QList detectedCards; + importScanCancelled = false; +#if defined (Q_OS_LINUX) + QString lastpath = (*p_profile)[STR_PREF_LastCPAPPath].toString(); + if (detectedCards.size() == 0) { + qDebug() << "Skipping card detection on Linux"; + return detectedCards; + } +#endif + QListloaders = GetLoaders(MT_CPAP); QTime time; @@ -860,18 +869,19 @@ QList MainWindow::detectCPAPCards() progress.setValue(0); progress.setMaximum(timeout); progress.setVisible(true); - importScanCancelled = false; +// importScanCancelled = false; popup.show(); QApplication::processEvents(); - QString lastpath = (*p_profile)[STR_PREF_LastCPAPPath].toString(); +// QString lastpath = (*p_profile)[STR_PREF_LastCPAPPath].toString(); do { // Rescan in case card inserted QStringList AutoScannerPaths = getDriveList(); - //AutoScannerPaths.push_back(lastpath); +// AutoScannerPaths.push_back(lastpath); + qDebug() << "Drive list size:" << AutoScannerPaths.size(); - if (!AutoScannerPaths.contains(lastpath)) { - AutoScannerPaths.append(lastpath); + if ( (lastpath.size()>0) && ( ! AutoScannerPaths.contains(lastpath))) { + AutoScannerPaths.insert(0, lastpath); } Q_FOREACH(const QString &path, AutoScannerPaths) { @@ -887,10 +897,12 @@ QList MainWindow::detectCPAPCards() } int el=time.elapsed(); progress.setValue(el); - if (el > timeout) break; - if (!popup.isVisible()) break; + if (el > timeout) + break; + if ( ! popup.isVisible()) + break; // needs a slight delay here - for (int i=0; i<5; ++i) { + for (int i=0; i<20; ++i) { QThread::msleep(50); QApplication::processEvents(); } From 44a38b27b21d70b1051020e27ccc66f643113e33 Mon Sep 17 00:00:00 2001 From: Jeff Norman Date: Fri, 29 May 2020 11:00:13 -0400 Subject: [PATCH 02/11] Fixed some typos in README --- README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 999b4680..a3011b4b 100644 --- a/README +++ b/README @@ -19,10 +19,10 @@ All systems need a C++ compiler and linker and the QT platform download. Windows Building: See Building/Windows/BUILD-WIN.md ----------------- -MacOS Building: See Building/Windows/BUILD-mac.md +MacOS Building: See Building/MacOS/BUILD-mac.md --------------- -Linux Building: See Building/Windows/BUILD-Linux-md +Linux Building: See Building/Linux/BUILD-Linux.md --------------- Software Licensing Information @@ -30,9 +30,9 @@ Software Licensing Information OSCAR is released under the GNU GPL v3 License. Please see below for a note on giving correct attribution in redistribution of derivatives. -It is built using Qt SDK (Open Source Edition), available from http://qt.io. +It is built using Qt SDK (Open Source Edition), available from https://qt.io. -Redistribution of derivatives ( a note added by Mark Watins ) +Redistribution of derivatives ( a note added by Mark Watkins ) ----------------------------- Mark Watkins created this software to help lessen the exploitation of others. Seeing his work being used to exploit others is incredibly un-motivational, and incredibly disrespectful of all the work he put into this project. From 88289deec41ff615d3342b5c8779b9f1d16cc1c8 Mon Sep 17 00:00:00 2001 From: Guy Scharf Date: Wed, 10 Jun 2020 14:34:18 -0700 Subject: [PATCH 03/11] Clean up Statistics page HTML Now passes HTML 4.01 Transitional validator with no errors Also fix table alignment regression introduced in last commit Adjust column widths differently for Monthly vs Standard tables --- oscar/statistics.cpp | 218 ++++++++++++++++++++++--------------------- 1 file changed, 113 insertions(+), 105 deletions(-) diff --git a/oscar/statistics.cpp b/oscar/statistics.cpp index a1c2b63b..aa6c0ea9 100644 --- a/oscar/statistics.cpp +++ b/oscar/statistics.cpp @@ -39,7 +39,7 @@ QString resizeHTMLPixmap(QPixmap &pixmap, int width, int height) { QBuffer buffer(&byteArray); // use buffer to store pixmap into byteArray buffer.open(QIODevice::WriteOnly); pixmap.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation).save(&buffer, "PNG"); - return QString(""); + return QString("logo"); } QString formatTime(float time) @@ -624,44 +624,46 @@ QString Statistics::getUserInfo () { return ""; QString address = p_profile->user->address(); - address.replace("\n", "
"); + address.replace("\n", "
"); QString userinfo = ""; if (!p_profile->user->firstName().isEmpty()) { - userinfo = tr("Name: %1, %2").arg(p_profile->user->lastName()).arg(p_profile->user->firstName()) + "
"; + userinfo = tr("Name: %1, %2").arg(p_profile->user->lastName()).arg(p_profile->user->firstName()) + "
"; if (!p_profile->user->DOB().isNull()) { - userinfo += tr("DOB: %1").arg(p_profile->user->DOB().toString(MedDateFormat)) + "
"; + userinfo += tr("DOB: %1").arg(p_profile->user->DOB().toString(MedDateFormat)) + "
"; } if (!p_profile->user->phone().isEmpty()) { - userinfo += tr("Phone: %1").arg(p_profile->user->phone()) + "
"; + userinfo += tr("Phone: %1").arg(p_profile->user->phone()) + "
"; } if (!p_profile->user->email().isEmpty()) { - userinfo += tr("Email: %1").arg(p_profile->user->email()) + "

"; + userinfo += tr("Email: %1").arg(p_profile->user->email()) + "

"; } if (!p_profile->user->address().isEmpty()) { - userinfo += tr("Address:")+"
"+address; + userinfo += tr("Address:")+"
"+address; } } - while (userinfo.length() > 0 && userinfo.endsWith("
")) // Strip trailing newlines + while (userinfo.length() > 0 && userinfo.endsWith("
")) // Strip trailing newlines userinfo = userinfo.mid(0, userinfo.length()-5); return userinfo; } -const QString table_width = "width=100%"; +const QString table_width = "width='100%'"; // Create the page header in HTML. Includes everything from through QString Statistics::generateHeader(bool onScreen) { - QString html = QString("")+ - "" - "" + "" "