summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-18 22:01:12 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-19 19:10:59 +0200
commitdcb4b5e7d2b916e1b6c2fbc13464955c7393299b (patch)
treebb4d3d332e137f2662dbfc03962ca9758654686a /src/plugins/platforms/cocoa
parent42573d9496dc44847ad995e2b79fe5e197ce1a05 (diff)
macOS: Tweak method argument names in QNSView complex text implementation
Pick-to: 6.2 Change-Id: I6a7ec683ffe9c18a89326b3e53b4a907cb9a9512 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qnsview_complextext.mm38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm
index 4b00a8a54f..35455a2812 100644
--- a/src/plugins/platforms/cocoa/qnsview_complextext.mm
+++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm
@@ -43,18 +43,18 @@
// ------------- Text insertion -------------
-- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
+- (void)insertText:(id)text replacementRange:(NSRange)replacementRange
{
- qCDebug(lcQpaKeys).nospace() << "Inserting \"" << aString << "\""
+ qCDebug(lcQpaKeys).nospace() << "Inserting \"" << text << "\""
<< ", replacing range " << replacementRange;
- if (m_sendKeyEvent && m_composingText.isEmpty() && [aString isEqualToString:m_inputSource]) {
+ if (m_sendKeyEvent && m_composingText.isEmpty() && [text isEqualToString:m_inputSource]) {
// don't send input method events for simple text input (let handleKeyEvent send key events instead)
return;
}
- const bool isAttributedString = [aString isKindOfClass:NSAttributedString.class];
- QString commitString = QString::fromNSString(isAttributedString ? [aString string] : aString);
+ const bool isAttributedString = [text isKindOfClass:NSAttributedString.class];
+ QString commitString = QString::fromNSString(isAttributedString ? [text string] : text);
QObject *focusObject = m_platformWindow->window()->focusObject();
if (queryInputMethod(focusObject)) {
@@ -78,14 +78,14 @@
// ------------- Text composition -------------
-- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
+- (void)setMarkedText:(id)text selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
{
- qCDebug(lcQpaKeys).nospace() << "Marking \"" << aString << "\""
+ qCDebug(lcQpaKeys).nospace() << "Marking \"" << text << "\""
<< " with selected range " << selectedRange
<< ", replacing range " << replacementRange;
- const bool isAttributedString = [aString isKindOfClass:NSAttributedString.class];
- QString preeditString = QString::fromNSString(isAttributedString ? [aString string] : aString);
+ const bool isAttributedString = [text isKindOfClass:NSAttributedString.class];
+ QString preeditString = QString::fromNSString(isAttributedString ? [text string] : text);
QList<QInputMethodEvent::Attribute> attrs;
attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selectedRange.location + selectedRange.length, 1, QVariant());
@@ -97,7 +97,7 @@
while (index < composingLength) {
NSRange effectiveRange;
NSRange range = NSMakeRange(index, composingLength-index);
- NSDictionary *attributes = [aString attributesAtIndex:index
+ NSDictionary *attributes = [text attributesAtIndex:index
longestEffectiveRange:&effectiveRange
inRange:range];
NSNumber *underlineStyle = [attributes objectForKey:NSUnderlineStyleAttributeName];
@@ -210,10 +210,10 @@
// ------------- Key binding command handling -------------
-- (void)doCommandBySelector:(SEL)aSelector
+- (void)doCommandBySelector:(SEL)selector
{
- qCDebug(lcQpaKeys) << "Trying to perform command" << aSelector;
- [self tryToPerform:aSelector with:self];
+ qCDebug(lcQpaKeys) << "Trying to perform command" << selector;
+ [self tryToPerform:selector with:self];
}
// ------------- Various text properties -------------
@@ -229,7 +229,7 @@
}
}
-- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)range actualRange:(NSRangePointer)actualRange
{
Q_UNUSED(actualRange);
@@ -239,7 +239,7 @@
if (selectedText.isEmpty())
return nil;
- NSString *substring = QStringView(selectedText).mid(aRange.location, aRange.length).toNSString();
+ NSString *substring = QStringView(selectedText).mid(range.location, range.length).toNSString();
return [[[NSAttributedString alloc] initWithString:substring] autorelease];
} else {
@@ -247,9 +247,9 @@
}
}
-- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
+- (NSRect)firstRectForCharacterRange:(NSRange)range actualRange:(NSRangePointer)actualRange
{
- Q_UNUSED(aRange);
+ Q_UNUSED(range);
Q_UNUSED(actualRange);
QWindow *window = m_platformWindow->window();
@@ -262,10 +262,10 @@
}
}
-- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint
+- (NSUInteger)characterIndexForPoint:(NSPoint)point
{
// We don't support cursor movements using mouse while composing.
- Q_UNUSED(aPoint);
+ Q_UNUSED(point);
return NSNotFound;
}