mirror of https://github.com/qt/qtbase.git
Platforms: cocoa - ensure namespacing of all symbols
A few symbols have been emitted that are prone to clashing with client code. We should either namespace them or use hidden visibility Task-number: QTBUG-138543 Pick-to: 6.10 Change-Id: I66863d5e869ddd161be97a8523e1c0ca0663f56e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
b4cbe20d6d
commit
8b68a2b45e
|
@ -16,7 +16,7 @@
|
|||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(lcAccessibilityTable, "qt.accessibility.table")
|
||||
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityTable, "qt.accessibility.table")
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ QT_END_NAMESPACE
|
|||
|
||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanelContentsWrapper);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
struct InputMethodQueryResult : public QHash<int, QVariant>
|
||||
|
@ -223,5 +225,7 @@ QDebug operator<<(QDebug, SEL);
|
|||
|
||||
#endif // __OBJC__
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QCOCOAHELPERS_H
|
||||
|
||||
|
|
|
@ -469,6 +469,8 @@ QT_END_NAMESPACE
|
|||
|
||||
@end // QNSPanelContentsWrapper
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
InputMethodQueryResult queryInputMethod(QObject *object, Qt::InputMethodQueries queries)
|
||||
|
@ -509,3 +511,5 @@ QDebug operator<<(QDebug debug, SEL selector)
|
|||
debug << NSStringFromSelector(selector);
|
||||
return debug;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#ifndef QT_NO_GESTURES
|
||||
|
||||
Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
Q_STATIC_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
|
||||
|
||||
@implementation QNSView (Gestures)
|
||||
|
||||
|
|
|
@ -271,6 +271,8 @@ static bool sendAsShortcut(const KeyEvent &keyEvent, QWindow *window)
|
|||
|
||||
@end
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
KeyEvent::KeyEvent(NSEvent *nsevent)
|
||||
|
@ -355,3 +357,5 @@ QDebug operator<<(QDebug debug, const KeyEvent &e)
|
|||
<< ")";
|
||||
return debug;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include <QtGui/qpointingdevice.h>
|
||||
#include <QtCore/private/qflatmap_p.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
||||
|
||||
using QCocoaTabletDeviceMap = QFlatMap<qint64, const QPointingDevice*>;
|
||||
Q_GLOBAL_STATIC(QCocoaTabletDeviceMap, devicesInProximity)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
// This file is included from qnsview.mm, and only used to organize the code
|
||||
|
||||
Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
Q_STATIC_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
|
||||
|
||||
@implementation QNSView (Touch)
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
|||
|
||||
typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QCocoaNSWindow *qnswindow_cast(NSWindow *window);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#else
|
||||
class QCocoaNSWindow;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events");
|
||||
Q_STATIC_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events");
|
||||
|
||||
static bool isMouseEvent(NSEvent *ev)
|
||||
{
|
||||
|
@ -60,6 +60,7 @@ static bool isMouseEvent(NSEvent *ev)
|
|||
@end
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
NSWindow<QNSWindowProtocol> *qnswindow_cast(NSWindow *window)
|
||||
{
|
||||
if ([window conformsToProtocol:@protocol(QNSWindowProtocol)])
|
||||
|
@ -67,6 +68,7 @@ NSWindow<QNSWindowProtocol> *qnswindow_cast(NSWindow *window)
|
|||
else
|
||||
return nil;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@implementation QNSWindow
|
||||
#define QNSWINDOW_PROTOCOL_IMPLMENTATION 1
|
||||
|
|
Loading…
Reference in New Issue