Make system detection compile on Mac

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-14 13:29:13 -07:00
parent 1ec5e6ffc4
commit 5e345fba0a
2 changed files with 8 additions and 16 deletions

View file

@ -168,6 +168,9 @@ win32 {
LIBS += -lwsock32
DEFINES -= UNICODE
}
mac {
LIBS += -framework CoreServices
}
#
# misc

View file

@ -6,6 +6,11 @@
#include <sys/utsname.h>
#endif
#ifdef __APPLE__
#include <MacTypes.h>
#include <CoreServices/CoreServices.h>
#endif
// main part: processor type
#if defined(Q_PROCESSOR_ALPHA)
# define ARCH_PROCESSOR "alpha"
@ -80,22 +85,6 @@
#if defined(Q_OS_OSX)
Q_CORE_EXPORT OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref)
{
return FSPathMakeRef(reinterpret_cast<const UInt8 *>(file.toUtf8().constData()), fsref, 0);
}
Q_CORE_EXPORT void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding encoding=0, int len=-1)
{
Q_UNUSED(encoding);
Q_UNUSED(len);
CFStringGetPascalString(QCFString(s), str, 256, CFStringGetSystemEncoding());
}
Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
return QCFString(CFStringCreateWithPascalString(0, pstr, CFStringGetSystemEncoding()));
}
SubsurfaceSysInfo::MacVersion SubsurfaceSysInfo::macVersion()
{
#if defined(Q_OS_OSX)