More Qt 4.5 fixes

This commit is contained in:
David Sansome 2010-05-25 21:41:53 +00:00
parent 9292bd3cb5
commit 8164066648
2 changed files with 6 additions and 2 deletions

View File

@ -27,10 +27,14 @@ void IconLoader::Init() {
}
QIcon IconLoader::Load(const QString &name) {
QIcon ret;
#if QT_VERSION >= 0x040600
// Try to load it from the theme initially
QIcon ret = QIcon::fromTheme(name);
ret = QIcon::fromTheme(name);
if (!ret.isNull())
return ret;
#endif
// Otherwise use our fallback theme
const QString path(":/icons/%1x%2/%3.png");

View File

@ -219,7 +219,7 @@ void SettingsDialog::showEvent(QShowEvent*) {
ui_.gst_device->setText(s.value("device").toString());
ui_.replaygain->setChecked(s.value("rgenabled", false).toBool());
ui_.replaygain_mode->setCurrentIndex(s.value("rgmode", 0).toInt());
ui_.replaygain_preamp->setValue(s.value("rgpreamp", 0.0).toFloat() * 10 + 150);
ui_.replaygain_preamp->setValue(s.value("rgpreamp", 0.0).toDouble() * 10 + 150);
ui_.replaygain_compression->setChecked(s.value("rgcompression", true).toBool());
s.endGroup();
#endif