diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-12 19:43:03 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-19 23:00:10 +0100 |
commit | c2e8db58413207315474232697f12ddceb8310e7 (patch) | |
tree | 9d8ba54fea5b10171cd3f4f16992e1832ff3434e /src/widgets/widgets/qwidgetlinecontrol.cpp | |
parent | d1fb20943d556db63c43d9bca9ebe2c9df6c11a3 (diff) |
Remove QAccessibleEvent child parameter.
This makes the api cleaner and generally the child should not be there.
It is only sometimes more convenient not to create a QAccessibleInterface
instance, so the functionallity is kept.
Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol.cpp')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 8806999355..7d97f6d295 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -769,15 +769,15 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite #ifndef QT_NO_ACCESSIBILITY if (changed) { if (oldText.isEmpty()) { - QAccessibleTextInsertEvent event(0, txt, parent()); + QAccessibleTextInsertEvent event(parent(), 0, txt); event.setCursorPosition(m_cursor); QAccessible::updateAccessibility(&event); } else if (txt.isEmpty()) { - QAccessibleTextRemoveEvent event(0, oldText, parent()); + QAccessibleTextRemoveEvent event(parent(), 0, oldText); event.setCursorPosition(m_cursor); QAccessible::updateAccessibility(&event); } else { - QAccessibleTextUpdateEvent event(0, oldText, txt, parent()); + QAccessibleTextUpdateEvent event(parent(), 0, oldText, txt); event.setCursorPosition(m_cursor); QAccessible::updateAccessibility(&event); } @@ -828,7 +828,7 @@ void QWidgetLineControl::internalInsert(const QString &s) if (m_maskData) { QString ms = maskString(m_cursor, s); #ifndef QT_NO_ACCESSIBILITY - QAccessibleTextInsertEvent insertEvent(m_cursor, ms, parent()); + QAccessibleTextInsertEvent insertEvent(parent(), m_cursor, ms); QAccessible::updateAccessibility(&insertEvent); #endif for (int i = 0; i < (int) ms.length(); ++i) { @@ -840,14 +840,14 @@ void QWidgetLineControl::internalInsert(const QString &s) m_cursor = nextMaskBlank(m_cursor); m_textDirty = true; #ifndef QT_NO_ACCESSIBILITY - QAccessibleTextCursorEvent event(m_cursor, parent()); + QAccessibleTextCursorEvent event(parent(), m_cursor); QAccessible::updateAccessibility(&event); #endif } else { int remaining = m_maxLength - m_text.length(); if (remaining != 0) { #ifndef QT_NO_ACCESSIBILITY - QAccessibleTextInsertEvent insertEvent(m_cursor, s, parent()); + QAccessibleTextInsertEvent insertEvent(parent(), m_cursor, s); QAccessible::updateAccessibility(&insertEvent); #endif m_text.insert(m_cursor, s.left(remaining)); @@ -878,7 +878,7 @@ void QWidgetLineControl::internalDelete(bool wasBackspace) addCommand(Command((CommandType)((m_maskData ? 2 : 0) + (wasBackspace ? Remove : Delete)), m_cursor, m_text.at(m_cursor), -1, -1)); #ifndef QT_NO_ACCESSIBILITY - QAccessibleTextRemoveEvent event(m_cursor, m_text.at(m_cursor), parent()); + QAccessibleTextRemoveEvent event(parent(), m_cursor, m_text.at(m_cursor)); QAccessible::updateAccessibility(&event); #endif if (m_maskData) { @@ -919,7 +919,7 @@ void QWidgetLineControl::removeSelectedText() addCommand (Command(RemoveSelection, i, m_text.at(i), -1, -1)); } #ifndef QT_NO_ACCESSIBILITY - QAccessibleTextRemoveEvent event(m_selstart, m_text.mid(m_selstart, m_selend - m_selstart), parent()); + QAccessibleTextRemoveEvent event(parent(), m_selstart, m_text.mid(m_selstart, m_selend - m_selstart)); QAccessible::updateAccessibility(&event); #endif if (m_maskData) { @@ -1402,7 +1402,7 @@ void QWidgetLineControl::emitCursorPositionChanged() #ifndef QT_NO_ACCESSIBILITY // otherwise we send a selection update which includes the cursor if (!hasSelectedText()) { - QAccessibleTextCursorEvent event(m_cursor, parent()); + QAccessibleTextCursorEvent event(parent(), m_cursor); QAccessible::updateAccessibility(&event); } #endif |