diff --git a/src/ksanewidget_p.cpp b/src/ksanewidget_p.cpp --- a/src/ksanewidget_p.cpp +++ b/src/ksanewidget_p.cpp @@ -429,9 +429,9 @@ } } // Color Options - for (int i = 0; i < basic_layout->count(); ++i) { - if (basic_layout->itemAt(i) && basic_layout->itemAt(i)->widget()) { - tmpOption = qobject_cast(basic_layout->itemAt(i)->widget()); + for (int i = 0; i < color_lay->count(); ++i) { + if (color_lay->itemAt(i) && color_lay->itemAt(i)->widget()) { + tmpOption = qobject_cast(color_lay->itemAt(i)->widget()); if (tmpOption) { labelWidth = qMax(labelWidth, tmpOption->labelWidthHint()); } diff --git a/src/options/ksaneoptcombo.cpp b/src/options/ksaneoptcombo.cpp --- a/src/options/ksaneoptcombo.cpp +++ b/src/options/ksaneoptcombo.cpp @@ -34,6 +34,7 @@ #include #include +#include namespace KSaneIface { @@ -343,6 +344,7 @@ switch (m_optDesc->type) { case SANE_TYPE_INT: tmp = val.left(val.indexOf(QLatin1Char(' '))); // strip the unit + tmp.remove(QLocale().groupSeparator()); // strip group separator (e.g. 1.200 -> 1200) // accept float formatting of the string i = (int)(tmp.toFloat(&ok)); if (ok == false) { @@ -353,6 +355,7 @@ break; case SANE_TYPE_FIXED: tmp = val.left(val.indexOf(QLatin1Char(' '))); // strip the unit + tmp.remove(QLocale().groupSeparator()); // strip group separator (e.g. 1.200 -> 1200) f = tmp.toFloat(&ok); if (ok == false) { return false;