Bug 265477 - Paintop presets are not portable due to locale problems
Summary: Paintop presets are not portable due to locale problems
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-05 01:11 UTC by LukasT
Modified: 2011-06-07 19:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LukasT 2011-02-05 01:11:35 UTC
Version:           svn trunk (using KDE 4.5.5) 
OS:                Linux

If you create paintop preset in Argentina locale,
it is not readable in e.g. in Slovak locale.

Problem is that in Argentina locale we save as
...diameter="69,95" and that is converted to 0.0 in locale
where the limiter is "."

Check e.g. KisMaskGenerator::fromXML.

Here is the locale problem described:
http://doc.qt.nokia.com/latest/qstring.html#toDouble

Reproducible: Always


Actual Results:  
Loading of the presets does not have to work.

Expected Results:  
Saving/loading works.

OS: Linux (i686) release 2.6.35.10-74.fc14.i686
Compiler: gcc
Comment 1 Sven Langkamp 2011-02-05 01:13:49 UTC
Not just preset, but potentially all case where we save doubles are probably affected.
Comment 2 Sven Langkamp 2011-02-05 15:08:51 UTC
Git commit 7c24214352c8c48c183a4935258e8e2aece628f1 by Sven Langkamp.
Committed on 05/02/11 at 15:05.
Pushed by langkamp into branch 'master'.

save doubles as non-localised string
CCBUG:265477

M  +4    -4    krita/image/kis_base_mask_generator.cpp     
M  +4    -4    krita/plugins/paintops/libbrush/kis_auto_brush.cpp     

http://commits.kde.org/calligra/7c24214352c8c48c183a4935258e8e2aece628f1
Comment 3 LukasT 2011-02-05 17:12:17 UTC
Git commit aff8cf3111d5c7142b9ab21451817f1e8724b8cd by Luk���� Tvrd��.
Committed on 05/02/11 at 17:08.
Pushed by lukast into branch 'master'.

Fix loading of the 2.3 presets with various locale

CCBUG:265477

M  +28   -8    krita/image/kis_base_mask_generator.cpp     
M  +24   -4    krita/plugins/paintops/libbrush/kis_auto_brush_factory.cpp     

http://commits.kde.org/calligra/aff8cf3111d5c7142b9ab21451817f1e8724b8cd
Comment 4 Sven Langkamp 2011-03-11 17:06:21 UTC
Git commit fa50d22bed224e0225955978dfa0af2b49ecbd22 by Sven Langkamp.
Committed on 11/03/2011 at 16:56.
Pushed by langkamp into branch 'master'.

fix another locale problem in presets
CCBUG:265477

M  +1    -1    krita/plugins/paintops/libbrush/kis_gbr_brush.cpp     
M  +7    -2    krita/plugins/paintops/libbrush/kis_gbr_brush_factory.cpp     

http://commits.kde.org/calligra/fa50d22bed224e0225955978dfa0af2b49ecbd22
Comment 5 Sven Langkamp 2011-06-07 19:31:24 UTC
No new cases showed up so it should be fixed.