diff --git a/kdelibs-4.2.1-encoding-qt45.patch b/kdelibs-4.2.1-encoding-qt45.patch deleted file mode 100644 index bc00e1b..0000000 --- a/kdelibs-4.2.1-encoding-qt45.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- kdelibs-4.2.1/kdecore/localization/kcatalog.cpp (Revision 938369) -+++ kdelibs-4.2.1/kdecore/localization/kcatalog.cpp (Revision 938370) -@@ -30,6 +30,24 @@ - #include - #include "gettext.h" - -+ -+static bool s_localeSet = false; -+ -+// Initialize the locale very early during application startup -+// This is necessary for e.g. toLocal8Bit() to work, even before -+// a Q[Core]Application exists (David) -+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; -+} -+Q_CONSTRUCTOR_FUNCTION(kInitializeLocale) -+ - // not defined on win32 :( - #ifdef _WIN32 - # ifndef LC_MESSAGES -@@ -50,7 +68,6 @@ - - QByteArray systemLanguage; - -- static int localeSet; - static QByteArray currentLanguage; - - void setupGettextEnv (); -@@ -62,17 +79,15 @@ - return debug << c.d->language << " " << c.d->name << " " << c.d->localeDir; - } - --int KCatalogPrivate::localeSet = 0; - QByteArray KCatalogPrivate::currentLanguage; - - KCatalog::KCatalog(const QString & name, const QString & language ) - : d( new KCatalogPrivate ) - { -- // Set locales only once. -- if (! KCatalogPrivate::localeSet) { -- setlocale(LC_ALL, ""); -- KCatalogPrivate::localeSet = 1; -- } -+ // Set locales if the static initializer didn't work -+ if (!s_localeSet) { -+ kInitializeLocale(); -+ } - - // Find locale directory for this catalog. - QString localeDir = catalogLocaleDir( name, language ); diff --git a/kdelibs.spec b/kdelibs.spec index 8f0e0a8..cf05a6b 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -86,7 +86,6 @@ Patch25: kdelibs-4.2.0-gcc44-misc.patch # upstream # 4.2 branch -Patch101: kdelibs-4.2.1-encoding-qt45.patch # 4.3 branch Patch200: kdelibs-4.1.96-AllowExternalPaths.patch @@ -226,7 +225,6 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage # upstream patches # 4.2 -%patch101 -p1 -b .encoding-qt45 # 4.3 %patch200 -p1 -b .AllowExternalPaths