summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qaction.cpp')
-rw-r--r--src/widgets/kernel/qaction.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 718ecffcc9..88b29e9147 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -279,12 +279,8 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
group the action will be automatically inserted into the group.
*/
QAction::QAction(QObject* parent)
- : QObject(*(new QActionPrivate), parent)
+ : QAction(*new QActionPrivate, parent)
{
- Q_D(QAction);
- d->group = qobject_cast<QActionGroup *>(parent);
- if (d->group)
- d->group->addAction(this);
}
@@ -302,13 +298,10 @@ QAction::QAction(QObject* parent)
*/
QAction::QAction(const QString &text, QObject* parent)
- : QObject(*(new QActionPrivate), parent)
+ : QAction(parent)
{
Q_D(QAction);
d->text = text;
- d->group = qobject_cast<QActionGroup *>(parent);
- if (d->group)
- d->group->addAction(this);
}
/*!
@@ -324,14 +317,10 @@ QAction::QAction(const QString &text, QObject* parent)
setToolTip().
*/
QAction::QAction(const QIcon &icon, const QString &text, QObject* parent)
- : QObject(*(new QActionPrivate), parent)
+ : QAction(text, parent)
{
Q_D(QAction);
d->icon = icon;
- d->text = text;
- d->group = qobject_cast<QActionGroup *>(parent);
- if (d->group)
- d->group->addAction(this);
}
/*!