Wrap RunLoopModeTracker into Objective-C namespace

RunLoopModeTracker as one of Qt Cocoa classes was not wrapped
in namespace which limited its use in Objective-C single symbol space.

Change-Id: Ida2c62c6f543a3bf5107f28c78d27435bcb3470d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Pavol Markovic 2017-02-07 21:12:21 +13:00
parent 4e9f7807fb
commit dd4465f57c
2 changed files with 6 additions and 8 deletions

View File

@ -44,7 +44,6 @@
#include <QtCore/qthread.h>
#include <QtCore/private/qcoreapplication_p.h>
#include <QtCore/private/qcore_unix_p.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtCore/private/qthread_p.h>
#include <limits>
@ -59,11 +58,13 @@
QT_USE_NAMESPACE
@interface RunLoopModeTracker : NSObject {
@interface QT_MANGLE_NAMESPACE(RunLoopModeTracker) : NSObject {
QStack<CFStringRef> m_runLoopModes;
}
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(RunLoopModeTracker);
@implementation RunLoopModeTracker
- (id) init

View File

@ -90,14 +90,11 @@
#include <QtCore/qabstracteventdispatcher.h>
#include <QtCore/private/qtimerinfo_unix_p.h>
#include <QtCore/private/qcfsocketnotifier_p.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtCore/qdebug.h>
#include <CoreFoundation/CoreFoundation.h>
#ifdef __OBJC__
@class RunLoopModeTracker;
#else
typedef struct objc_object RunLoopModeTracker;
#endif
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker));
QT_BEGIN_NAMESPACE
@ -253,7 +250,7 @@ private:
RunLoopSource<> m_postedEventsRunLoopSource;
RunLoopObserver<> m_runLoopActivityObserver;
RunLoopModeTracker *m_runLoopModeTracker;
QT_MANGLE_NAMESPACE(RunLoopModeTracker) *m_runLoopModeTracker;
QTimerInfoList m_timerInfoList;
CFRunLoopTimerRef m_runLoopTimer;