Clean up some Apple-related includes and declarations.
Change-Id: I92db9691c2243ae72ecd4e11dd4640afaf4bf822 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
parent
46a372e1a1
commit
dc1bf3008e
@ -83,10 +83,6 @@ using namespace ABI::Windows::Networking::Sockets;
|
||||
# include <envLib.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MACX)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
|
||||
#include <private/qjni_p.h>
|
||||
#endif
|
||||
@ -1865,25 +1861,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
|
||||
#include "qnamespace.h"
|
||||
QT_END_INCLUDE_NAMESPACE
|
||||
|
||||
#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()));
|
||||
}
|
||||
#endif // defined(Q_OS_OSX)
|
||||
|
||||
QSysInfo::MacVersion QSysInfo::macVersion()
|
||||
{
|
||||
const QAppleOperatingSystemVersion version = qt_apple_os_version(); // qtcore_mac_objc.mm
|
||||
|
@ -57,10 +57,6 @@
|
||||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifdef Q_OS_MACX
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
@ -75,9 +75,6 @@
|
||||
# define old_qDebug qDebug
|
||||
# undef qDebug
|
||||
# endif
|
||||
#ifdef Q_OS_MACX
|
||||
# include <CoreServices/CoreServices.h>
|
||||
#endif // Q_OS_MACX
|
||||
|
||||
# ifdef old_qDebug
|
||||
# undef qDebug
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#ifndef QT_NO_NETWORKPROXY
|
||||
|
||||
#include <CFNetwork/CFNetwork.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <SystemConfiguration/SystemConfiguration.h>
|
||||
|
||||
|
@ -51,6 +51,10 @@
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, qt_securetransport_mutex, (QMutex::Recursive))
|
||||
|
@ -721,8 +721,8 @@ QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData
|
||||
kATSOptionFlagsDefault, &fontContainer);
|
||||
} else {
|
||||
FSRef ref;
|
||||
OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref);
|
||||
if (qt_mac_create_fsref(fileName, &ref) != noErr)
|
||||
if (FSPathMakeRef(reinterpret_cast<const UInt8 *>(fileName.toUtf8().constData()),
|
||||
&ref, 0) != noErr)
|
||||
return QStringList();
|
||||
e = ATSFontActivateFromFileReference(&ref, kATSFontContextLocal, kATSFontFormatUnspecified, 0,
|
||||
kATSOptionFlagsDefault, &fontContainer);
|
||||
|
@ -588,9 +588,6 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_filterSelected(int menuInd
|
||||
emit filterSelected(menuIndex >= 0 && menuIndex < filters.size() ? filters.at(menuIndex) : QString());
|
||||
}
|
||||
|
||||
extern OSErr qt_mac_create_fsref(const QString &, FSRef *); // qglobal.cpp
|
||||
extern void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding encoding=0, int len=-1); // qglobal.cpp
|
||||
|
||||
void QCocoaFileDialogHelper::setDirectory(const QUrl &directory)
|
||||
{
|
||||
if (mDelegate)
|
||||
|
Loading…
Reference in New Issue
Block a user