forked from qt-creator/qt-creator
ActionContainer: Avoid usind sender()
Change-Id: Ic83179de74943a20de6abf516aa43a5cf034de65 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -369,11 +369,10 @@ void ActionContainerPrivate::clear()
|
|||||||
scheduleUpdate();
|
scheduleUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionContainerPrivate::itemDestroyed()
|
void ActionContainerPrivate::itemDestroyed(QObject *sender)
|
||||||
{
|
{
|
||||||
QObject *obj = sender();
|
|
||||||
for (Group &group : m_groups) {
|
for (Group &group : m_groups) {
|
||||||
if (group.items.removeAll(obj) > 0)
|
if (group.items.removeAll(sender) > 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void scheduleUpdate();
|
void scheduleUpdate();
|
||||||
void update();
|
void update();
|
||||||
void itemDestroyed();
|
void itemDestroyed(QObject *sender);
|
||||||
|
|
||||||
QList<Group>::const_iterator findGroup(Utils::Id groupId) const;
|
QList<Group>::const_iterator findGroup(Utils::Id groupId) const;
|
||||||
QAction *insertLocation(QList<Group>::const_iterator group) const;
|
QAction *insertLocation(QList<Group>::const_iterator group) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user