From 0dfe8819ed8ce0d948df890fd0d9d0e86dbbfcd5 Mon Sep 17 00:00:00 2001 From: Raoul Hecky Date: Mon, 22 Jan 2024 15:32:06 +0100 Subject: [PATCH] Add version to config tab --- qml/desktop/ConfigTabs.qml | 2 +- src/Application.cpp | 4 ++++ src/CalaosConnection.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qml/desktop/ConfigTabs.qml b/qml/desktop/ConfigTabs.qml index 81ae830..a4218b8 100644 --- a/qml/desktop/ConfigTabs.qml +++ b/qml/desktop/ConfigTabs.qml @@ -58,7 +58,7 @@ BorderImage { ConfigTabLabelValue { labelText: qsTr("Product Version:") - valueText: "-" + valueText: calaosApp.appVersion } ConfigTabLabelValue { diff --git a/src/Application.cpp b/src/Application.cpp index f145bdb..1bb61ef 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -695,6 +695,7 @@ void Application::pushNotificationReceived(const QString &uuid) void Application::updateNetworkInfo() { +#ifdef CALAOS_DESKTOP CalaosOsAPI::Instance()->getNetworkInterfaces( [this](bool success, const QJsonValue &data) { @@ -723,10 +724,12 @@ void Application::updateNetworkInfo() } } ); +#endif } void Application::updateSystemInfo() { +#ifdef CALAOS_DESKTOP CalaosOsAPI::Instance()->getSystemInfo( [this](bool success, const QJsonValue &data) { @@ -738,4 +741,5 @@ void Application::updateSystemInfo() update_uptime(data["uptime"].toInt()); } ); +#endif } diff --git a/src/CalaosConnection.cpp b/src/CalaosConnection.cpp index c7c66fa..941d096 100644 --- a/src/CalaosConnection.cpp +++ b/src/CalaosConnection.cpp @@ -662,7 +662,7 @@ void CalaosConnection::startJsonPolling() request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false); pollReply = accessManager->post(request, jdoc.toJson()); - connect(pollReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(requestError(QNetworkReply::NetworkError))); + connect(pollReply, &QNetworkReply::errorOccurred, this, &CalaosConnection::requestError); connect(pollReply, &QNetworkReply::finished, this, [=]() { pollReply->deleteLater();