changeset 1846:37ffea1e50ec

Add platform name query
author Chris Cannam
date Wed, 22 Apr 2020 13:07:22 +0100
parents 6f626cfdba51
children 9762a7f084a0
files plugin/Provider.h
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/Provider.h	Mon Apr 20 18:45:47 2020 +0100
+++ b/plugin/Provider.h	Wed Apr 22 13:07:22 2020 +0100
@@ -57,6 +57,23 @@
         return false;
     }
 
+    static QString thisPlatformName() {
+#ifdef Q_OS_WIN32
+        return QObject::tr("Windows");
+#endif
+#ifdef Q_OS_MAC
+        return QObject::tr("Mac");
+#endif
+#ifdef Q_OS_LINUX
+        if (sizeof(void *) == 8) {
+            return QObject::tr("64-bit Linux");
+        } else {
+            return QObject::tr("32-bit Linux");
+        }
+#endif
+        return "(unknown)";
+    }
+
     bool operator==(const Provider &other) {
         return
             other.infoUrl == infoUrl &&