diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-06-14 16:40:50 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-11-02 13:12:28 +0000 |
commit | 7ae55889805bc1d62c0268938eeca20bec9b773c (patch) | |
tree | eda6308c079d08ba2cc6f8e4ca514c3982bf9adf /src/imports/controls/qtquickcontrols2plugin.cpp | |
parent | 287411a3923f5fc1cf10aff7eeec66d834810790 (diff) |
Visualize mnemonics
Unfortunately this comes a bit late in the 5.10 cycle, but this should
be released together with the rest of the mnemonics stuff going out in
5.10, because it affects the value of AbstractButton/Menu(Bar)Item::text.
As the removed TODO comments and altered tests indicate, previously the
ampersand was blatantly stripped out. It would be worse to change it
later once people have already started using mnemonics and rely on the
behavior in custom styles.
The necessary modifications to QQuickText were added in qtdeclarative
commit 65ef4ba.
Task-number: QTBUG-61422
Change-Id: Iaa73da8c012e9a6019743cf98f5bdc02527064e5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/qtquickcontrols2plugin.cpp')
-rw-r--r-- | src/imports/controls/qtquickcontrols2plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp index 5f019a4e..4ac5b7e0 100644 --- a/src/imports/controls/qtquickcontrols2plugin.cpp +++ b/src/imports/controls/qtquickcontrols2plugin.cpp @@ -40,6 +40,7 @@ #include <QtQuickControls2/private/qquickcolor_p.h> #include <QtQuickControls2/private/qquickcolorimage_p.h> #include <QtQuickControls2/private/qquickiconimage_p.h> +#include <QtQuickControls2/private/qquickmnemoniclabel_p.h> #include <QtQuickControls2/private/qquickpaddedrectangle_p.h> #include <QtQuickControls2/private/qquickplaceholdertext_p.h> #include <QtQuickControls2/private/qquickiconlabel_p.h> @@ -200,6 +201,7 @@ void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *ur qmlRegisterSingletonType<QQuickColor>(import, 2, 3, "Color", colorSingleton); qmlRegisterType<QQuickIconLabel>(import, 2, 3, "IconLabel"); qmlRegisterType<QQuickCheckLabel>(import, 2, 3, "CheckLabel"); + qmlRegisterType<QQuickMnemonicLabel>(import, 2, 3, "MnemonicLabel"); qmlRegisterRevision<QQuickText, 6>(import, 2, 3); } |