diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-04-21 20:43:33 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-08-27 20:22:29 +0200 |
commit | 2436e259ced39657f22176537603da44ff4e2512 (patch) | |
tree | 001b836ef64a242bf12693d0a384e2f5da244862 /tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp | |
parent | accc833e556ba54038d1cc7e261a936492145240 (diff) |
Deprecate QApplication::setActiveWindow() and mark as internal
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index ff5d3ab083..cc8de88171 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -33,6 +33,8 @@ #include "../../../shared/platforminputcontext.h" #include <private/qinputmethod_p.h> +#include <QtWidgets/private/qapplication_p.h> + Q_LOGGING_CATEGORY(lcTests, "qt.widgets.tests") //Used in copyAvailable @@ -2537,7 +2539,7 @@ void tst_QTextEdit::inputMethodEvent() // test that input method gets chance to commit preedit when removing focus ed->setText(""); - QApplication::setActiveWindow(ed); + QApplicationPrivate::setActiveWindow(ed); QTRY_VERIFY(QApplication::focusWindow()); QCOMPARE(qApp->focusObject(), ed); |