Add GUI/NonGUI mode to info page

This commit is contained in:
Lord-Grey
2023-12-23 16:03:53 +01:00
parent 1b4df36c49
commit 49cfca7b5e
2 changed files with 7 additions and 0 deletions

View File

@@ -10,6 +10,8 @@
#include <QTimer>
#include <QHostInfo>
#include <QMultiMap>
#include <QCoreApplication>
#include <QApplication>
// hyperion includes
#include <leddevice/LedDeviceWrapper.h>
@@ -389,6 +391,10 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command,
hyperion["rootPath"] = _instanceManager->getRootPath();
hyperion["readOnlyMode"] = _hyperion->getReadOnlyMode();
bool isGuiMode{ true };
QCoreApplication* app = QCoreApplication::instance();
hyperion["isGuiMode"] = qobject_cast<QApplication*>(app) ? true : false;
info["hyperion"] = hyperion;
// send the result