Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effect widgets cleanup #10868

Merged
merged 2 commits into from
Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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