The way options are stored in a list by append and retrieve by named index
(enum list) is kind of risky. Errors can easily occur, some are obvious
(crash), others may be more silent.
optionWidgets.append( ui.stylesCombo );
#else
ui.stylesCombo->hide();
optionWidgets.append( ui.stylesCombo );
#else
ui.stylesCombo->hide();
+ optionWidgets.append( NULL );
#endif
ui.skins_zone->setEnabled( ui.skins->isChecked() );
#endif
ui.skins_zone->setEnabled( ui.skins->isChecked() );
config_PutPsz( p_intf, "intf", "skins2" );
if( qobject_cast<QRadioButton *>(optionWidgets[qtRB])->isChecked() )
config_PutPsz( p_intf, "intf", "qt" );
config_PutPsz( p_intf, "intf", "skins2" );
if( qobject_cast<QRadioButton *>(optionWidgets[qtRB])->isChecked() )
config_PutPsz( p_intf, "intf", "qt" );
- getSettings()->setValue( "MainWindow/QtStyle",
- qobject_cast<QComboBox *>(optionWidgets[styleCB])->currentText() );
+ if( qobject_cast<QComboBox *>(optionWidgets[styleCB]) )
+ getSettings()->setValue( "MainWindow/QtStyle",
+ qobject_cast<QComboBox *>(optionWidgets[styleCB])->currentText() );