summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-02 21:32:51 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-04-02 21:32:51 +0000
commit1cc1f4ee77e2778a0cdde199689980fc3b8167fc (patch)
tree21a7769119cde4c9659ca43f3a5a099826a78cae /rbutil/rbutilqt/base
parent9fedc8187f746960ea4608f7bb9e5e9b2667fd39 (diff)
System Info: display OS X version number and architecture too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25442 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/system.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index 7797157493..80e787515c 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -63,6 +63,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include <SystemConfiguration/SystemConfiguration.h>
+#include <CoreServices/CoreServices.h>
#endif
#include "utils.h"
@@ -180,6 +181,34 @@ QString System::osVersionString(void)
result = QString("CPU: %1<br/>System: %2<br/>Release: %3<br/>Version: %4")
.arg(u.machine).arg(u.sysname).arg(u.release).arg(u.version);
+#if defined(Q_OS_MACX)
+ SInt32 major;
+ SInt32 minor;
+ SInt32 bugfix;
+ OSErr error;
+ error = Gestalt(gestaltSystemVersionMajor, &major);
+ error = Gestalt(gestaltSystemVersionMinor, &minor);
+ error = Gestalt(gestaltSystemVersionBugFix, &bugfix);
+
+ result += QString("<br/>OS X %1.%2.%3 ").arg(major).arg(minor).arg(bugfix);
+ // 1: 86k, 2: ppc, 10: i386
+ SInt32 arch;
+ error = Gestalt(gestaltSysArchitecture, &arch);
+ switch(arch) {
+ case 1:
+ result.append("(86k)");
+ break;
+ case 2:
+ result.append("(ppc)");
+ break;
+ case 10:
+ result.append("(x86)");
+ break;
+ default:
+ result.append("(unknown)");
+ break;
+ }
+#endif
#endif
result += QString("<br/>Qt version %1").arg(qVersion());
return result;