From 66cdefa4b38de0b4f7c510db630bfece74a1f19d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 17 Aug 2020 11:47:56 +1200 Subject: [PATCH] Add a new "About.platform" property --- interface/src/AboutUtil.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/src/AboutUtil.h b/interface/src/AboutUtil.h index b4a318cf63..a602528154 100644 --- a/interface/src/AboutUtil.h +++ b/interface/src/AboutUtil.h @@ -26,11 +26,14 @@ * @hifi-client-entity * @hifi-avatar * + * @property {string} platform - The name of the Interface platform running, e,g., "Vircadia" for the Vircadia. + * Read-only. * @property {string} buildDate - The build date of Interface that is currently running. Read-only. * @property {string} buildVersion - The build version of Interface that is currently running. Read-only. * @property {string} qtVersion - The Qt version used in Interface that is currently running. Read-only. * - * @example Report build information for the version of Interface currently running. + * @example Report information on the version of Interface currently running. + * print("Interface platform: " + About.platform); * print("Interface build date: " + About.buildDate); * print("Interface version: " + About.buildVersion); * print("Qt version: " + About.qtVersion); @@ -48,6 +51,8 @@ * * @deprecated This API is deprecated and will be removed. Use the {@link About} API instead. * + * @property {string} platform - The name of the Interface platform running, e,g., "Vircadia" for the Vircadia. + * Read-only. * @property {string} buildDate - The build date of Interface that is currently running. Read-only. * @property {string} buildVersion - The build version of Interface that is currently running. Read-only. * @property {string} qtVersion - The Qt version used in Interface that is currently running. Read-only. @@ -58,6 +63,7 @@ class AboutUtil : public QObject { Q_OBJECT + Q_PROPERTY(QString platform READ getPlatformName CONSTANT) Q_PROPERTY(QString buildDate READ getBuildDate CONSTANT) Q_PROPERTY(QString buildVersion READ getBuildVersion CONSTANT) Q_PROPERTY(QString qtVersion READ getQtVersion CONSTANT) @@ -65,6 +71,7 @@ public: static AboutUtil* getInstance(); ~AboutUtil() {} + QString getPlatformName() const { return "Vircadia"; } QString getBuildDate() const; QString getBuildVersion() const; QString getQtVersion() const;