refactor: remove unneeded setscheme from actiongroup
This commit is contained in:
@@ -60,14 +60,6 @@ void ActionGroup::init(bool hasHeader)
|
||||
connect(myHeader.get(), &TaskHeader::activated, this, &ActionGroup::showHide);
|
||||
}
|
||||
|
||||
void ActionGroup::setScheme(ActionPanelScheme *scheme)
|
||||
{
|
||||
myScheme = scheme;
|
||||
myHeader->setScheme(scheme);
|
||||
myGroup->setScheme(scheme);
|
||||
update();
|
||||
}
|
||||
|
||||
QBoxLayout* ActionGroup::groupLayout()
|
||||
{
|
||||
return myGroup->groupLayout();
|
||||
|
||||
@@ -74,14 +74,6 @@ public:
|
||||
*/
|
||||
QBoxLayout* groupLayout();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sets the scheme for the panel and all its child groups.
|
||||
*
|
||||
* By default, `ActionPanelScheme::defaultScheme()` is used.
|
||||
*/
|
||||
void setScheme(ActionPanelScheme *scheme);
|
||||
|
||||
/**
|
||||
* @brief Checks if the group can collapse or expand.
|
||||
*/
|
||||
|
||||
@@ -34,13 +34,6 @@ void ActionPanel::setScheme(ActionPanelScheme *scheme)
|
||||
myScheme = scheme;
|
||||
setStyleSheet(myScheme->actionStyle);
|
||||
|
||||
// Set scheme for children
|
||||
for (QObject *obj : children()) {
|
||||
if (auto *group = qobject_cast<ActionGroup*>(obj)) {
|
||||
group->setScheme(scheme);
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user