summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2014-11-10 12:04:56 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-05-02 08:34:00 +0000
commit4db5d3ccd17d448b59db491e2f261892f31fec74 (patch)
treecc841aaad4d878abd8d36c4ec0bd3b59381418a5 /src/widgets
parent2e5cfa1ad46ecfcfe7aea8950434bedfbbb6f43b (diff)
Fix shortcuts when using setDefaultAction
Don't remove ampersands when setting the text: they will be removed when the text is displayed. This fixes double removal of ampersands. [ChangeLog][QtWidgets][QToolButton] Fix double removal of ampersands Task-number: QTBUG-23396 Change-Id: I56bf50eb24aae32a81d614824aca0b63363587c8 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index bb3f2d74a8..e897b578c3 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -897,7 +897,7 @@ void QToolButton::setDefaultAction(QAction *action)
return;
if (!actions().contains(action))
addAction(action);
- setText(action->iconText());
+ setText(action->text());
setIcon(action->icon());
#ifndef QT_NO_TOOLTIP
setToolTip(action->toolTip());