Fix color-options layout & KSaneOptCombo::setValue()
AcceptedPublic

Authored by antonarnold on Thu, Nov 28, 12:42 PM.

Details

Reviewers
sars
Group Reviewers
KDE Applications
Summary

BUG: 414601
BUG: 414602

This diff contains bugfixes that I fixed while developing the scan area+option ordering enhancements but are not related directly to them.

The items in the color layout where not updated correctly.
Remove the group separator before trying to write a value to a combo-box option.

Diff Detail

Repository
R382 KSane Library
Lint
Lint Skipped
Unit
Unit Tests Skipped
antonarnold requested review of this revision.Thu, Nov 28, 12:42 PM
antonarnold created this revision.
aacid added a subscriber: aacid.Thu, Nov 28, 6:20 PM

Can we get a better description?

Like Fix when bla and bla happens

sars accepted this revision.Fri, Nov 29, 11:00 AM
sars retitled this revision from Smaller bugfixes for libksane to Fix color-options layout & KSaneOptCombo::setValue().
sars edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Fri, Nov 29, 11:00 AM
sars added a comment.Fri, Nov 29, 11:02 AM

BTW should this also be done to to other options setting numbers?

In D25588#569248, @sars wrote:

BTW should this also be done to to other options setting numbers?

I think the combo box is the only inherited class that has this problem. It is caused by applying i18n on the unit but not considering it in the read path but not in the set path.
Just found the information in the Qt documentation in QString::toFloat(): The string conversion will always happen in the 'C' locale. For locale dependent conversion use QLocale::toFloat()
I guess this would ultimately be the best solution since the current bugfix probably won't support decimals (which I did not encounter in the DPI settings).