[scribus-dev] Locale-dependent uses of QString::toDouble that needs fixing
Andreas Vox
vox at steercom.de
Fri May 8 22:32:55 CEST 2009
Hi Team,
suspicious uses of toDouble can be found in these files:
fileloader.cpp (readParagraphStyle())
gtaction.cpp (colors)
guidemanagercore.cpp (GuidemanagerIO)
importai.cpp (processGradientData())
importps.cpp
oodrawimp.cpp
pdfoptionsio.cpp
prefscontext.cpp (PrefsContext::getDouble())
prefsmanager.cpp
pslib.cpp (!!)
desaxe/saxiohelper.cpp
scpreview.cpp
scribus12format.cpp
scribus13format.cpp
scribus134format.cpp
scribusview.cpp (PasteItem())
scribusxml.cpp
stencilreader.cpp
stylereader.cpp
stylestack.cpp
svgplugin.cpp
undostate.cpp (this uses QString::arg() and QString::toDouble()
consistently, so it should work if the locale isnt changed)
These need all to be checked before 1.3.5 release IMHO.
Since the default behaviour of toDouble() is to fall back to the C locale if
a string cant be interpreted, it probably only affects cases where a
floating point number like "3.141" can be interpreted as an integer number
with a thousender separator.
As can be seen when importing the #6464 file in a French locale, the results
can be quite bizarre.
/Andreas
More information about the scribus-dev
mailing list