diff options
Diffstat (limited to 'src/widget/wpushbutton.cpp')
-rw-r--r-- | src/widget/wpushbutton.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 52678c4677..2d927a41cf 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -70,26 +70,26 @@ void WPushButton::setup(QDomNode node, const SkinContext& context) { while (!state.isNull()) { if (state.isElement() && state.nodeName() == "State") { // support for variables in State elements - SkinContext* stateContext = new SkinContext(context); - stateContext->updateVariables(state); + SkinContext stateContext(context); + stateContext.updateVariables(state); - int iState = stateContext->selectInt(state, "Number"); + int iState = stateContext.selectInt(state, "Number"); if (iState < m_iNoStates) { QString pixmapPath; PixmapSource pixmapSource; - pixmapSource = stateContext->getPixmapSource(stateContext->selectNode(state, "Unpressed")); + pixmapSource = stateContext.getPixmapSource(stateContext.selectNode(state, "Unpressed")); if (!pixmapSource.isEmpty()) { setPixmap(iState, false, pixmapSource); } - pixmapSource = stateContext->getPixmapSource(stateContext->selectNode(state, "Pressed")); + pixmapSource = stateContext.getPixmapSource(stateContext.selectNode(state, "Pressed")); if (!pixmapSource.isEmpty()) { setPixmap(iState, true, pixmapSource); } - m_text.replace(iState, stateContext->selectString(state, "Text")); - QString alignment = stateContext->selectString(state, "Alignment"); + m_text.replace(iState, stateContext.selectString(state, "Text")); + QString alignment = stateContext.selectString(state, "Alignment"); if (alignment == "left") { m_align.replace(iState, Qt::AlignLeft); } else if (alignment == "right") { |