Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 17th, 2010 | Syntax: Diff | Size: 3.80 KB | Hits: 24 | Expires: Never
Copy text to clipboard
  1. From 79aadd0c44b4f3027d0551faf9c2e678aa0b6b2b Mon Sep 17 00:00:00 2001
  2. From: Denis Dzyubenko <denis.dzyubenko@nokia.com>
  3. Date: Wed, 17 Mar 2010 21:34:25 +0100
  4. Subject: [PATCH] tmp
  5.  
  6. ---
  7.  src/corelib/tools/qlocale.cpp |   28 ++++++++++++++++++++++++++++
  8.  1 files changed, 28 insertions(+), 0 deletions(-)
  9.  
  10. diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
  11. index 4f8d68c..587e802 100644
  12. --- a/src/corelib/tools/qlocale.cpp
  13. +++ b/src/corelib/tools/qlocale.cpp
  14. @@@@ -4059,6 +4059,10 @@ QString QLocalePrivate::doubleToString(double d,
  15.                                         int width,
  16.                                         unsigned flags) const
  17.  {
  18. +#ifndef QT_NO_SYSTEMLOCALE
  19. +    if (isUninitializedSystemLocale())
  20. +        QLocalePrivate::updateSystemPrivate();
  21. +#endif
  22.      if (precision == -1)
  23.          precision = 6;
  24.      if (width == -1)
  25. @@@@ -4209,6 +4213,10 @@ QString QLocalePrivate::longLongToString(qlonglong l, int precision,
  26.                                              int base, int width,
  27.                                              unsigned flags) const
  28.  {
  29. +#ifndef QT_NO_SYSTEMLOCALE
  30. +    if (isUninitializedSystemLocale())
  31. +        QLocalePrivate::updateSystemPrivate();
  32. +#endif
  33.      bool precision_not_specified = false;
  34.      if (precision == -1) {
  35.          precision_not_specified = true;
  36. @@@@ -4294,6 +4302,10 @@ QString QLocalePrivate::unsLongLongToString(qulonglong l, int precision,
  37.                                              int base, int width,
  38.                                              unsigned flags) const
  39.  {
  40. +#ifndef QT_NO_SYSTEMLOCALE
  41. +    if (isUninitializedSystemLocale())
  42. +        QLocalePrivate::updateSystemPrivate();
  43. +#endif
  44.      bool precision_not_specified = false;
  45.      if (precision == -1) {
  46.          precision_not_specified = true;
  47. @@@@ -4496,6 +4508,10 @@ bool QLocalePrivate::numberToCLocale(const QString &num,
  48.  bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByteArray *buff,
  49.                                      int decDigits) const
  50.  {
  51. +#ifndef QT_NO_SYSTEMLOCALE
  52. +    if (isUninitializedSystemLocale())
  53. +        QLocalePrivate::updateSystemPrivate();
  54. +#endif
  55.      buff->clear();
  56.      buff->reserve(str.length());
  57.  
  58. @@@@ -4589,6 +4605,10 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
  59.  double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
  60.                                          GroupSeparatorMode group_sep_mode) const
  61.  {
  62. +#ifndef QT_NO_SYSTEMLOCALE
  63. +    if (isUninitializedSystemLocale())
  64. +        QLocalePrivate::updateSystemPrivate();
  65. +#endif
  66.      CharBuff buff;
  67.      if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
  68.                           group_sep_mode, &buff)) {
  69. @@@@ -4602,6 +4622,10 @@ double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
  70.  qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
  71.                                             bool *ok, GroupSeparatorMode group_sep_mode) const
  72.  {
  73. +#ifndef QT_NO_SYSTEMLOCALE
  74. +    if (isUninitializedSystemLocale())
  75. +        QLocalePrivate::updateSystemPrivate();
  76. +#endif
  77.      CharBuff buff;
  78.      if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
  79.                           group_sep_mode, &buff)) {
  80. @@@@ -4616,6 +4640,10 @@ qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
  81.  qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base,
  82.                                                 bool *ok, GroupSeparatorMode group_sep_mode) const
  83.  {
  84. +#ifndef QT_NO_SYSTEMLOCALE
  85. +    if (isUninitializedSystemLocale())
  86. +        QLocalePrivate::updateSystemPrivate();
  87. +#endif
  88.      CharBuff buff;
  89.      if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
  90.                           group_sep_mode, &buff)) {
  91. --
  92. 1.6.2.1.307.g91408