summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_tools_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add qstrntod as qstrtod overload, which takes a len parameterTobias Koenig2016-02-031-0/+1
| | | | | | | | | | Add qstrntod as an overload for qstrtod, which takes a len parameter, so one can pass character arrays which are not null-terminated. Change-Id: I8c1c6c3627043c1d6ec6eb712efa3abc9e5e9e00 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QLocale: Accept trailing junk in qstrtod()Ulf Hermann2016-01-051-1/+7
| | | | | | | | | | | qstrtod() used to accept trailing junk until libdouble-conversion was introduced and we need this behavior in order to implement EcmaScript's parseFloat() correctly. The QString and QByteArray methods should not accept trailing junk, though. Task-number: QTBUG-50131 Change-Id: Ide922da0d65b2576be2c9f47f6053057eff77994 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add flags to omit/reject padding in scientific notation exponentsUlf Hermann2015-11-231-1/+2
| | | | | | | | | | | | | | The EcmaScript format for printing doubles in exponent form differs from Qt's format only in this aspect. EcmaScript explicitly prohibits leading zeroes in exponents. It is thus worthwhile to add those flags in order to be able to generate and parse doubles in compliance with EcmaScript. [ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption allow generating and parsing doubles in EcmaScript compliant format. Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Interpret precision == -128 as "shortest" double conversionUlf Hermann2015-11-231-2/+2
| | | | | | | | | | | | Also use this for converting doubles with QVariant. We generally want exact results there, rather than adding rounding errors whenever we convert. [ChangeLog][QtCore][QLocale] Added special value for double conversion precision to get shortest accurate representation. Change-Id: I905b8a103f39adf31d24b6ce2c8a283cf271b597 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Replace qdtoa and qstrtod implementation by a 3rdparty libraryUlf Hermann2015-11-021-2/+4
| | | | | | | | | | | | | | | | | This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885. You can choose between system, qt, and no libdouble-conversion support. If you choose "no", snprintf_l and sscanf_l will be used. By default, system double conversion is used if the system provides a double-conversion library. Otherwise the bundled libdouble-conversion is built. sscanf_l and snprintf_l are not used by default as the planned "shortest" conversion mode to produce the shortest possible string will give less precise results when implemented with snprintf_l. Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Provide a simpler and safer version of qdtoa()Ulf Hermann2015-10-201-0/+1
| | | | | | | | | | The new version returns a QString instead of a char * that has to be manually free()'d by the user. Also, it does away with most of the parameters so that we can replace the implementation with something saner without mapping all those modes between the implementations. Change-Id: I42ff95648e7955b9e74eb0f459a1fdedc1ad7efb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QLocalePrivate: merge removeGroupSeparators into numberToCLocaleThiago Macieira2014-02-141-3/+0
| | | | | | | | This version will parse the string only once and will not do any memmove. This is more efficient. Change-Id: I59026ad0fa61cc3f16146bdcd622fc54cbd8a321 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocalePrivate: move the stringToXxx to QLocaleDataThiago Macieira2014-02-141-1/+1
| | | | | | | | | Along with some more helper functions. There are two more functions used in QIntValidator Change-Id: I469ef40426cbb73ab515454bd5ecb12d944f5c0a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove use of 'register' from Qt.Stephen Kelly2013-06-171-2/+2
| | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove ARMFPA support and Q_DOUBLE_FORMAT detectionBradley T. Hughes2012-03-011-4/+0
| | | | | | | | | | | | | | | | | Remove the -armfpa option the config.tests/unix/doubleformat* detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT has been removed as well. Rationale: ARM FPA with GCC does not work with EABI. Qt currently does not support compiling without EABI, making ARM FPA an impossibility. It is unknown whether other compilers provide ARM FPA support with EABI. Support for ARM FPA can be re-added in the future should the need arise, but since ARM VFP is available for ARMv5 and up, we should encourage implementors to instead use soft-floats or VFP. Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-101-1/+1
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+122
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12