rev 14046 - in trunk/packages/kdelibs/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Thu Mar 12 08:43:53 UTC 2009


Author: fabo
Date: 2009-03-12 08:43:53 +0000 (Thu, 12 Mar 2009)
New Revision: 14046

Modified:
   trunk/packages/kdelibs/debian/changelog
   trunk/packages/kdelibs/debian/patches/01_kcmdlineargs_decoding_svn934640.diff
Log:
Update the encoding fix.


Modified: trunk/packages/kdelibs/debian/changelog
===================================================================
--- trunk/packages/kdelibs/debian/changelog	2009-03-11 23:49:48 UTC (rev 14045)
+++ trunk/packages/kdelibs/debian/changelog	2009-03-12 08:43:53 UTC (rev 14046)
@@ -4,7 +4,7 @@
 
   * Add 01_kcmdlineargs_decoding_svn934640.diff patch from upstream
     to fix kcmdlineargs input decoding with Qt 4.5. (Closes: #518062)
-    It contains also a fix from svn934710: use the new bool exported by Qt
+    It contains also a fix from svn938370: use the new bool exported by Qt
     so that we can initialize the locale and make fromLocal8Bit/toLocal8Bit
     work even without a QCoreApplication.
 

Modified: trunk/packages/kdelibs/debian/patches/01_kcmdlineargs_decoding_svn934640.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/01_kcmdlineargs_decoding_svn934640.diff	2009-03-11 23:49:48 UTC (rev 14045)
+++ trunk/packages/kdelibs/debian/patches/01_kcmdlineargs_decoding_svn934640.diff	2009-03-12 08:43:53 UTC (rev 14046)
@@ -1,4 +1,4 @@
-Fixed in svn r934710:
+Fixed in svn r938370:
 Use the new bool exported by Qt so that we can initialize the locale
 (using a static initializer, as suggested by Thiago)
 and make fromLocal8Bit/toLocal8Bit work even without a QCoreApplication.
@@ -657,7 +657,7 @@
  }
 --- a/kdecore/localization/kcatalog.cpp
 +++ b/kdecore/localization/kcatalog.cpp
-@@ -30,6 +30,22 @@
+@@ -30,6 +30,24 @@
  #include <locale.h>
  #include "gettext.h"
  
@@ -670,8 +670,10 @@
 +int kInitializeLocale()
 +{
 +    setlocale(LC_ALL, "");
++#if QT_VERSION >= 0x040500
 +    extern Q_CORE_EXPORT bool qt_locale_initialized; // in Qt since 4.5.0
 +    qt_locale_initialized = true; // as recommended by Thiago
++#endif
 +    s_localeSet = true;
 +    return 1;
 +}
@@ -680,7 +682,7 @@
  // not defined on win32 :(
  #ifdef _WIN32
  # ifndef LC_MESSAGES
-@@ -50,7 +66,6 @@ public:
+@@ -50,7 +68,6 @@ public:
  
    QByteArray systemLanguage;
  
@@ -688,7 +690,7 @@
    static QByteArray currentLanguage;
  
    void setupGettextEnv ();
-@@ -62,17 +77,15 @@ QDebug operator<<(QDebug debug, const KC
+@@ -62,17 +79,15 @@ QDebug operator<<(QDebug debug, const KC
    return debug << c.d->language << " " << c.d->name << " " << c.d->localeDir;
  }
  
@@ -710,20 +712,3 @@
  
    // Find locale directory for this catalog.
    QString localeDir = catalogLocaleDir( name, language );
---- a/kdecore/tests/kcharsetstest.cpp
-+++ b/kdecore/tests/kcharsetstest.cpp
-@@ -6,6 +6,14 @@
- 
- int main()
- {
-+    // Test that toLocal8Bit works even without a QCoreApplication,
-+    // thanks to the static initializer in KCatalog.
-+    // Do NOT move this code to a QTestLib unit test ;-)
-+    QString one = QString::fromUtf8("é");
-+    QByteArray one8bit = one.toLocal8Bit();
-+    Q_ASSERT(one8bit.length() == 2);
-+
-+
-     QString input( "&lt;Hello &amp;World&gt;" );
-     QString output = KCharsets::resolveEntities( input );
-     assert( output == "<Hello &World>" );




More information about the pkg-kde-commits mailing list