Permalink
Browse files

When using a QComboBox to configure a setting, the settings is stored as

an int.
  • Loading branch information...
1 parent 256d073 commit 7e116247b88f5dcb13123c162b5df3c9a4adba09 @laudrup committed Jun 21, 2011
Showing with 6 additions and 10 deletions.
  1. +6 −10 creox/audioprefs.cpp
View
@@ -33,12 +33,10 @@ AudioPrefs::AudioPrefs(QWidget* parent)
QString chanName = QString::fromLatin1(*ppPortCount);
kcfg_leftInputChannel->addItem(chanName);
kcfg_rightInputChannel->addItem(chanName);
- if (chanName == Settings::leftInputChannel())
- kcfg_leftInputChannel->setCurrentIndex(idx);
- if (chanName == Settings::rightInputChannel())
- kcfg_rightInputChannel->setCurrentIndex(idx);
}
- free(ppInputPortList);
+ kcfg_leftInputChannel->setCurrentIndex(Settings::leftInputChannel());
+ kcfg_rightInputChannel->setCurrentIndex(Settings::rightInputChannel());
+ jack_free(ppInputPortList);
}
const char** const ppOutputPortList = jack_get_ports(pJackClient, 0, 0, JackPortIsOutput);
@@ -48,12 +46,10 @@ AudioPrefs::AudioPrefs(QWidget* parent)
QString chanName = QString::fromLatin1(*ppPortCount);
kcfg_leftOutputChannel->addItem(chanName);
kcfg_rightOutputChannel->addItem(chanName);
- if (chanName == Settings::leftOutputChannel())
- kcfg_leftOutputChannel->setCurrentIndex(idx);
- if (chanName == Settings::rightOutputChannel())
- kcfg_rightOutputChannel->setCurrentIndex(idx);
}
- free(ppOutputPortList);
+ kcfg_leftOutputChannel->setCurrentIndex(Settings::leftOutputChannel());
+ kcfg_rightOutputChannel->setCurrentIndex(Settings::rightOutputChannel());
+ jack_free(ppOutputPortList);
}
jack_client_close(pJackClient);
}

0 comments on commit 7e11624

Please sign in to comment.