diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-10-16 18:17:31 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-11-23 21:15:11 +0000 |
commit | c8b4e0ae14ce34f24e6900de52b781588f8988e3 (patch) | |
tree | 38d7317dbd7070de77abfc1376e4ed17bedee46d /src/qml/jsruntime/qv4runtime.cpp | |
parent | 242067390f3bd891b162164a2d01a3a982c64fa2 (diff) |
Remove libdouble-conversion
We can use facilities in qtbase to convert doubles to strings now.
This also makes the fix to QTBUG-47070 obsolete.
Change-Id: I2f813164ff788b96281c3ffd37d8d2c65665de80
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index a988313f5f..2d0eac079f 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -43,6 +43,7 @@ #include "qv4dateobject_p.h" #include "qv4lookup_p.h" #include "qv4function_p.h" +#include "qv4numberobject_p.h" #include "private/qlocale_tools_p.h" #include "qv4scopedvalue_p.h" #include <private/qqmlcontextwrapper_p.h> @@ -60,8 +61,6 @@ #include <wtf/MathExtras.h> -#include "../../3rdparty/double-conversion/double-conversion.h" - #ifdef QV4_COUNT_RUNTIME_FUNCTIONS # include <QtCore/QBuffer> # include <QtCore/QDebug> @@ -226,10 +225,8 @@ void RuntimeHelpers::numberToString(QString *result, double num, int radix) } if (radix == 10) { - char str[100]; - double_conversion::StringBuilder builder(str, sizeof(str)); - double_conversion::DoubleToStringConverter::EcmaScriptConverter().ToShortest(num, &builder); - *result = QString::fromLatin1(builder.Finalize()); + const NumberLocale *locale = NumberLocale::instance(); + *result = locale->toString(num, 'g', locale->defaultDoublePrecision); return; } |