diff options
author | Richard Dale <richard.dale@codethink.co.uk> | 2013-07-04 09:56:52 +0100 |
---|---|---|
committer | Richard Dale <richard.dale@codethink.co.uk> | 2013-07-04 09:56:52 +0100 |
commit | acf9e50d52c4d09a1aed9490bb2f3c5de7dce9bb (patch) | |
tree | 5b05df5a9e67f397bc7629f0921bc30c64bcc03e /src/controls/qquickmenuitem.cpp | |
parent | a7e874ddf3496766903fc88e52fb61573c3d3f74 (diff) | |
parent | aa4ddfd8443f07badc0899d835027e46c6e0dfd8 (diff) | |
download | qtquickcontrols-acf9e50d52c4d09a1aed9490bb2f3c5de7dce9bb.tar.gz |
Merge v5.1.0 releasebaserock/morph
Diffstat (limited to 'src/controls/qquickmenuitem.cpp')
-rw-r--r-- | src/controls/qquickmenuitem.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp index 4ac7c7ff..ed03b336 100644 --- a/src/controls/qquickmenuitem.cpp +++ b/src/controls/qquickmenuitem.cpp @@ -329,14 +329,14 @@ void QQuickMenuText::updateIcon() Emitted when either the menu item or its bound action have been activated. - \sa trigger(), Action::triggered(), Action::toggled() + \sa trigger(), Action::triggered, Action::toggled */ /*! \qmlmethod MenuItem::trigger() Manually trigger a menu item. Will also trigger the item's bound action. - \sa triggered(), Action::trigger() + \sa triggered, Action::trigger() */ /*! @@ -360,7 +360,7 @@ void QQuickMenuText::updateIcon() If the menu item is checkable, this property reflects its checked state. Defaults to \c false. - \sa checkable, Action::toggled() + \sa checkable, Action::toggled */ /*! \qmlproperty ExclusiveGroup MenuItem::exclusiveGroup @@ -378,9 +378,9 @@ void QQuickMenuText::updateIcon() /*! \qmlsignal MenuItem::toggled(checked) Emitted whenever a menu item's \c checked property changes. - This usually happens at the same time as \l triggered(). + This usually happens at the same time as \l triggered. - \sa checked, triggered(), Action::triggered(), Action::toggled() + \sa checked, triggered, Action::triggered, Action::toggled */ /*! @@ -401,6 +401,7 @@ QQuickMenuItem::QQuickMenuItem(QObject *parent) { connect(this, SIGNAL(__textChanged()), this, SIGNAL(textChanged())); + connect(action(), SIGNAL(shortcutChanged(QString)), this, SLOT(updateShortcut())); connect(action(), SIGNAL(triggered()), this, SIGNAL(triggered())); connect(action(), SIGNAL(toggled(bool)), this, SLOT(updateChecked())); if (platformItem()) @@ -502,7 +503,7 @@ void QQuickMenuItem::setBoundAction(QQuickAction *a) QString QQuickMenuItem::text() const { QString ownText = QQuickMenuText::text(); - if (!ownText.isEmpty()) + if (!ownText.isNull()) return ownText; return m_boundAction ? m_boundAction->text() : QString(); } |