diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
commit | 388fe97f2a54089544dff0ed3af6ca70bf604716 (patch) | |
tree | 163b47974c625849726804337bd667c942dfbc77 /src/widgets/widgets | |
parent | a0c4b6f34546bdd22167a76a0540d37e9a37c0cf (diff) | |
parent | 591116490cf313808e8ba05ddd066656a1d1a566 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qmainwindow.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qmdiarea.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qmenubar.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 4 |
5 files changed, 18 insertions, 8 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 02aa703289..09b7687d8e 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1369,6 +1369,12 @@ void QLineEdit::setReadOnly(bool enable) QEvent event(QEvent::ReadOnlyChange); QCoreApplication::sendEvent(this, &event); update(); +#ifndef QT_NO_ACCESSIBILITY + QAccessible::State changedState; + changedState.readOnly = true; + QAccessibleStateChangeEvent ev(this, changedState); + QAccessible::updateAccessibility(&ev); +#endif } } diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index fae3aebba4..9c4c46f2d6 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -596,7 +596,7 @@ QStatusBar *QMainWindow::statusBar() const /*! Sets the status bar for the main window to \a statusbar. - Setting the status bar to 0 will remove it from the main window. + Setting the status bar to \nullptr will remove it from the main window. Note that QMainWindow takes ownership of the \a statusbar pointer and deletes it at the appropriate time. @@ -1464,8 +1464,8 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event) #if QT_CONFIG(menu) /*! Returns a popup menu containing checkable entries for the toolbars and - dock widgets present in the main window. If there are no toolbars and - dock widgets present, this function returns a null pointer. + dock widgets present in the main window. If there are no toolbars and + dock widgets present, this function returns \nullptr. By default, this function is called by the main window when the user activates a context menu, typically by right-clicking on a toolbar or a dock diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index 0ce561860e..fe3d1663a8 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -2000,9 +2000,9 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla Removes \a widget from the MDI area. The \a widget must be either a QMdiSubWindow or a widget that is the internal widget of a subwindow. Note \a widget is never actually deleted by QMdiArea. - If a QMdiSubWindow is passed in its parent is set to 0 and it is - removed, but if an internal widget is passed in the child widget - is set to 0 but the QMdiSubWindow is not removed. + If a QMdiSubWindow is passed in, its parent is set to \nullptr and it is + removed; but if an internal widget is passed in, the child widget + is set to \nullptr and the QMdiSubWindow is \e not removed. \sa addSubWindow() */ diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index e7984078de..a53d7841f4 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -897,8 +897,8 @@ QAction *QMenuBar::insertMenu(QAction *before, QMenu *menu) } /*! - Returns the QAction that is currently highlighted. A null pointer - will be returned if no action is currently selected. + Returns the QAction that is currently highlighted, if any, + else \nullptr. */ QAction *QMenuBar::activeAction() const { diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 209156b901..f85c7cdc6d 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1985,6 +1985,8 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + int oldCursorPos = cursor.position(); + cursor.beginEditBlock(); if (isGettingInput) { cursor.removeSelectedText(); @@ -2089,6 +2091,8 @@ void QWidgetTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) if (cursor.d) cursor.d->setX(); + if (oldCursorPos != cursor.position()) + emit q->cursorPositionChanged(); if (oldPreeditCursor != preeditCursor) emit q->microFocusChanged(); } |