diff options
author | Arseniy-Movshev <dodoradio@outlook.com> | 2023-06-11 13:02:56 +0100 |
---|---|---|
committer | Arseniy-Movshev <dodoradio@outlook.com> | 2023-06-20 00:05:28 +0100 |
commit | 17af88e65e6cb0febcd2340771f52d128eae4fac (patch) | |
tree | 86adb1658412f788ee3b54260102688e52ab6059 /qmlplugin/hrDataLoader.cpp | |
parent | f6c090502058c63f7a51b7ba97672022657119d8 (diff) |
DataLoaders: switch to qvariant for qml compatibility
Diffstat (limited to '')
-rw-r--r-- | qmlplugin/hrDataLoader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qmlplugin/hrDataLoader.cpp b/qmlplugin/hrDataLoader.cpp index 7a39929..b1eb2ca 100644 --- a/qmlplugin/hrDataLoader.cpp +++ b/qmlplugin/hrDataLoader.cpp @@ -29,16 +29,16 @@ HrDataLoader::HrDataLoader() : QObject() } } -QList<QPointF> HrDataLoader::getTodayData() { +QVariant HrDataLoader::getTodayData() { return getDataForDate(QDate::currentDate()); } -QList<QPointF> HrDataLoader::getDataForDate(QDate date) { +QVariant HrDataLoader::getDataForDate(QDate date) { QList<QPointF> m_filedata; QFile file(fileNameForDate(date, "heartrateMonitor")); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "failed to open file"; - return m_filedata; + return QVariant::fromValue(m_filedata); } QTextStream inStream(&file); QString line; @@ -50,7 +50,7 @@ QList<QPointF> HrDataLoader::getDataForDate(QDate date) { m_filedata.append(point); } file.close(); - return m_filedata; + return QVariant::fromValue(m_filedata); } void HrDataLoader::triggerDaemonRecording() { |