Skip to content

Commit

Permalink
Add version to config tab
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Jan 22, 2024
1 parent b7cd7ec commit 0dfe881
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qml/desktop/ConfigTabs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ BorderImage {

ConfigTabLabelValue {
labelText: qsTr("Product Version:")
valueText: "-"
valueText: calaosApp.appVersion
}

ConfigTabLabelValue {
Expand Down
4 changes: 4 additions & 0 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -723,10 +724,12 @@ void Application::updateNetworkInfo()
}
}
);
#endif
}

void Application::updateSystemInfo()
{
#ifdef CALAOS_DESKTOP
CalaosOsAPI::Instance()->getSystemInfo(
[this](bool success, const QJsonValue &data)
{
Expand All @@ -738,4 +741,5 @@ void Application::updateSystemInfo()
update_uptime(data["uptime"].toInt());
}
);
#endif
}
2 changes: 1 addition & 1 deletion src/CalaosConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0dfe881

Please sign in to comment.