From aa93173086922484a63e1ce575b63183130a55db Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Fri, 23 May 2008 08:56:56 +0000 Subject: [PATCH] Casting from ints to widgets and then dereferencing them is bad, mmm-kay? svn path=/trunk/KDE/kdebase/workspace/; revision=811498 --- clients/plastik/config/config.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clients/plastik/config/config.cpp b/clients/plastik/config/config.cpp index 496a206d1f..c1bf0a2b7b 100644 --- a/clients/plastik/config/config.cpp +++ b/clients/plastik/config/config.cpp @@ -89,8 +89,13 @@ void PlastikConfig::save(KConfigGroup&) { KConfigGroup cg(m_config, "General"); - QRadioButton *button = (QRadioButton*)m_dialog->titleAlign->selected(); - if (button) cg.writeEntry("TitleAlignment", QString(button->objectName())); + QList buttons = m_dialog->titleAlign->findChildren(); + for(QList::ConstIterator it = buttons.begin(); it != buttons.end(); ++it) + { + if((*it)->isChecked()) + cg.writeEntry("TitleAlignment", QString((*it)->objectName())); + } + cg.writeEntry("AnimateButtons", m_dialog->animateButtons->isChecked() ); cg.writeEntry("CloseOnMenuDoubleClick", m_dialog->menuClose->isChecked() ); cg.writeEntry("TitleShadow", m_dialog->titleShadow->isChecked() );