macOS: Clean up some more Objective-C usage in QNSView implementation
- Format selectors consistently
- Use proper style for init methods
Follow-up to ba871065e0
Change-Id: I5742e248b83d5955b1d110038dd1b4d79d701fbb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
83a1203c3b
commit
bbe9bda106
@ -92,10 +92,9 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
|||||||
|
|
||||||
- (instancetype)initWithView:(QNSView *)theView
|
- (instancetype)initWithView:(QNSView *)theView
|
||||||
{
|
{
|
||||||
self = [super init];
|
if ((self = [super init]))
|
||||||
if (self) {
|
|
||||||
view = theView;
|
view = theView;
|
||||||
}
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +156,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
|||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
if (self = [super initWithFrame:NSZeroRect]) {
|
if ((self = [super initWithFrame:NSZeroRect])) {
|
||||||
m_buttons = Qt::NoButton;
|
m_buttons = Qt::NoButton;
|
||||||
m_acceptedMouseDowns = Qt::NoButton;
|
m_acceptedMouseDowns = Qt::NoButton;
|
||||||
m_frameStrutButtons = Qt::NoButton;
|
m_frameStrutButtons = Qt::NoButton;
|
||||||
@ -200,10 +199,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
|||||||
|
|
||||||
- (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow
|
- (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow
|
||||||
{
|
{
|
||||||
self = [self init];
|
if ((self = [self init])) {
|
||||||
if (!self)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
m_platformWindow = platformWindow;
|
m_platformWindow = platformWindow;
|
||||||
m_sendKeyEvent = false;
|
m_sendKeyEvent = false;
|
||||||
m_dontOverrideCtrlLMB = qt_mac_resolveOption(false, platformWindow->window(), "_q_platform_MacDontOverrideCtrlLMB", "QT_MAC_DONT_OVERRIDE_CTRL_LMB");
|
m_dontOverrideCtrlLMB = qt_mac_resolveOption(false, platformWindow->window(), "_q_platform_MacDontOverrideCtrlLMB", "QT_MAC_DONT_OVERRIDE_CTRL_LMB");
|
||||||
@ -230,6 +226,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
|||||||
selector:@selector(textInputContextKeyboardSelectionDidChangeNotification:)
|
selector:@selector(textInputContextKeyboardSelectionDidChangeNotification:)
|
||||||
name:NSTextInputContextKeyboardSelectionDidChangeNotification
|
name:NSTextInputContextKeyboardSelectionDidChangeNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user