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/quickcontrols2/qquickiconlabel.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/quickcontrols2/qquickiconlabel.cpp')
-rw-r--r-- | src/quickcontrols2/qquickiconlabel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quickcontrols2/qquickiconlabel.cpp b/src/quickcontrols2/qquickiconlabel.cpp index 06d74d43..266d30d7 100644 --- a/src/quickcontrols2/qquickiconlabel.cpp +++ b/src/quickcontrols2/qquickiconlabel.cpp @@ -37,6 +37,7 @@ #include "qquickiconlabel_p.h" #include "qquickiconlabel_p_p.h" #include "qquickiconimage_p.h" +#include "qquickmnemoniclabel_p.h" #include <QtGui/private/qguiapplication_p.h> #include <QtQuick/private/qquickitem_p.h> @@ -147,7 +148,7 @@ bool QQuickIconLabelPrivate::createLabel() if (label) return false; - label = new QQuickText(q); + label = new QQuickMnemonicLabel(q); watchChanges(label); beginClass(label); label->setObjectName(QStringLiteral("label")); |