Skip to content

Commit

Permalink
Merge pull request #10868 from ronso0/effect-widgets-cleanup
Browse files Browse the repository at this point in the history
Effect widgets cleanup
  • Loading branch information
daschuer authored Sep 4, 2022
2 parents 1f6ae94 + b207a7f commit d232119
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/widget/weffectchainpresetbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
WEffectChainPresetButton::WEffectChainPresetButton(QWidget* parent, EffectsManager* pEffectsManager)
: QPushButton(parent),
WBaseWidget(this),
m_iChainNumber(0),
m_pEffectsManager(pEffectsManager),
m_pChainPresetManager(pEffectsManager->getChainPresetManager()),
m_pMenu(make_parented<QMenu>(new QMenu(this))) {
Expand All @@ -22,9 +21,13 @@ WEffectChainPresetButton::WEffectChainPresetButton(QWidget* parent, EffectsManag
}

void WEffectChainPresetButton::setup(const QDomNode& node, const SkinContext& context) {
m_iChainNumber = EffectWidgetUtils::getEffectUnitNumberFromNode(node, context);
m_pChain = EffectWidgetUtils::getEffectChainFromNode(
node, context, m_pEffectsManager);
VERIFY_OR_DEBUG_ASSERT(m_pChain) {
SKIN_WARNING(node, context)
<< "EffectChainPresetButton node could not attach to effect chain";
return;
}
connect(m_pChain.get(),
&EffectChain::chainPresetChanged,
this,
Expand Down
1 change: 0 additions & 1 deletion src/widget/weffectchainpresetbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class WEffectChainPresetButton : public QPushButton, public WBaseWidget {

private:
bool event(QEvent* pEvent);
int m_iChainNumber;
EffectChainPointer m_pChain;

EffectsManager* m_pEffectsManager;
Expand Down
3 changes: 0 additions & 3 deletions src/widget/weffectselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
WEffectSelector::WEffectSelector(QWidget* pParent, EffectsManager* pEffectsManager)
: QComboBox(pParent),
WBaseWidget(this),
m_iEffectSlotIndex(-1),
m_pEffectsManager(pEffectsManager),
m_pVisibleEffectsList(pEffectsManager->getVisibleEffectsList()) {
// Prevent this widget from getting focused by Tab/Shift+Tab
Expand All @@ -28,8 +27,6 @@ void WEffectSelector::setup(const QDomNode& node, const SkinContext& context) {
node, context, m_pEffectsManager);
m_pEffectSlot = EffectWidgetUtils::getEffectSlotFromNode(
node, context, pChainSlot);
m_iEffectSlotIndex = EffectWidgetUtils::getEffectSlotIndexFromNode(
node, context);

if (m_pEffectSlot != nullptr) {
connect(m_pVisibleEffectsList.data(),
Expand Down
1 change: 0 additions & 1 deletion src/widget/weffectselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class WEffectSelector : public QComboBox, public WBaseWidget {
bool event(QEvent* pEvent) override;

private:
int m_iEffectSlotIndex;
EffectsManager* m_pEffectsManager;
VisibleEffectsListPointer m_pVisibleEffectsList;
EffectSlotPointer m_pEffectSlot;
Expand Down

0 comments on commit d232119

Please sign in to comment.