From a48849649e9d534449f6feb685dbb708f354d270 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 28 May 2013 16:50:49 +0200 Subject: MenuItem: Connect to own action's 'shortcutChanged' signal Otherwise, we won't be setting the shortcut on the platform item. Task-number: QTBUG-31368 Change-Id: I333b903719d6e95a411f4f423c0e9b8ce15e640e Reviewed-by: J-P Nurmi --- src/controls/qquickmenuitem.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/controls/qquickmenuitem.cpp') diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp index 4ac7c7ff..de215df1 100644 --- a/src/controls/qquickmenuitem.cpp +++ b/src/controls/qquickmenuitem.cpp @@ -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()) -- cgit v1.2.1 From cbd4b0f4e83cd458bd0f1ecbb53f1d789dfe9ff7 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Mon, 3 Jun 2013 10:43:33 +0200 Subject: Doc: Fixes warnings Fixes issues including: - Misspelled links - Links to signal with arguments - \table in SplitView.qml - Links to current file Change-Id: I2cbadf661a641f19ed55f6854922b2b69966bc9c Reviewed-by: Jerome Pasion --- src/controls/qquickmenuitem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/controls/qquickmenuitem.cpp') diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp index de215df1..622fdd2d 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 */ /*! -- cgit v1.2.1 From eeb3c959334d1e6b4ea9f7538b603a711f8a8262 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 3 Jun 2013 14:05:26 +0200 Subject: Buttons: Allow overriding of visual properties when 'action' is set Those properties are, text, tooltip, iconName, and iconSource. Also, properly capitalized gallery's tooltips. Change-Id: I1995a85565edd7aaa420279821d7c1a31ef18253 Reviewed-by: J-P Nurmi Reviewed-by: Jens Bache-Wiig --- src/controls/qquickmenuitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls/qquickmenuitem.cpp') diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp index 622fdd2d..ed03b336 100644 --- a/src/controls/qquickmenuitem.cpp +++ b/src/controls/qquickmenuitem.cpp @@ -503,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(); } -- cgit v1.2.1