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

Sune Vuorela pusling-guest at alioth.debian.org
Sat Oct 10 20:04:16 UTC 2009


Author: pusling-guest
Date: 2009-10-10 20:04:15 +0000 (Sat, 10 Oct 2009)
New Revision: 16117

Added:
   trunk/packages/kdelibs/debian/patches/01_r1032787_khtml_show_hide_fix.diff
   trunk/packages/kdelibs/debian/patches/02_r1032185_threading_issues_in_klocale.diff
Modified:
   trunk/packages/kdelibs/debian/changelog
   trunk/packages/kdelibs/debian/patches/series
Log:
* Add patch from upstream to fix handling of deletion in khtml.
* Add patch from upstream to fix a threading issue in klocale.

Modified: trunk/packages/kdelibs/debian/changelog
===================================================================
--- trunk/packages/kdelibs/debian/changelog	2009-10-10 19:57:28 UTC (rev 16116)
+++ trunk/packages/kdelibs/debian/changelog	2009-10-10 20:04:15 UTC (rev 16117)
@@ -3,8 +3,10 @@
   +++ Changes by Sune Vuorela:
 
   * Fix default monospace font name. Thanks Andrea Iacovitti. Closes: #549308.
+  * Add patch from upstream to fix handling of deletion in khtml.
+  * Add patch from upstream to fix a threading issue in klocale.
 
- -- Sune Vuorela <debian at pusling.com>  Wed, 07 Oct 2009 00:09:33 +0200
+ -- Sune Vuorela <debian at pusling.com>  Sat, 10 Oct 2009 21:58:43 +0200
 
 kde4libs (4:4.3.2-1) unstable; urgency=low
 

Added: trunk/packages/kdelibs/debian/patches/01_r1032787_khtml_show_hide_fix.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/01_r1032787_khtml_show_hide_fix.diff	                        (rev 0)
+++ trunk/packages/kdelibs/debian/patches/01_r1032787_khtml_show_hide_fix.diff	2009-10-10 20:04:15 UTC (rev 16117)
@@ -0,0 +1,14 @@
+Taken from svn. will be part of 4.3.3
+
+--- a/khtml/khtml_part.cpp
++++ b/khtml/khtml_part.cpp
+@@ -609,8 +609,7 @@ KHTMLPart::~KHTMLPart()
+ 
+   if ( d->m_view )
+   {
+-    d->m_view->hide();
+-    d->m_view->viewport()->hide();
++    widget()->hide();
+     d->m_view->m_part = 0;
+   }
+ 

Added: trunk/packages/kdelibs/debian/patches/02_r1032185_threading_issues_in_klocale.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/02_r1032185_threading_issues_in_klocale.diff	                        (rev 0)
+++ trunk/packages/kdelibs/debian/patches/02_r1032185_threading_issues_in_klocale.diff	2009-10-10 20:04:15 UTC (rev 16117)
@@ -0,0 +1,252 @@
+Taken from svn. will be part of 4.3.3.
+
+--- /dev/null
++++ b/kdecore/localization/klocale_p.h
+@@ -0,0 +1,10 @@
++#ifndef KLOCALE_P_H
++#define KLOCALE_P_H
++
++class QMutex;
++
++// Used by both KLocale and KLocalizedString, since they call each other.
++QMutex* kLocaleMutex();
++
++#endif /* KLOCALE_P_H */
++
+--- a/kdecore/localization/klocalizedstring.cpp
++++ b/kdecore/localization/klocalizedstring.cpp
+@@ -24,6 +24,7 @@
+ #include <kglobal.h>
+ #include <kdebug.h>
+ #include <klocale.h>
++#include <klocale_p.h>
+ #include <kcomponentdata.h>
+ #include <klibrary.h>
+ #include <kstandarddirs.h>
+@@ -126,8 +127,6 @@ class KLocalizedStringPrivateStatics
+ 
+     QHash<QString, KuitSemantics*> formatters;
+ 
+-    QMutex mutex;
+-
+     KLocalizedStringPrivateStatics () :
+         theFence("|/|"),
+         startInterp("$["),
+@@ -144,9 +143,7 @@ class KLocalizedStringPrivateStatics
+ 
+         translits(),
+ 
+-        formatters(),
+-
+-        mutex(QMutex::Recursive)
++        formatters()
+     {}
+ 
+     ~KLocalizedStringPrivateStatics ()
+@@ -216,7 +213,7 @@ QString KLocalizedString::toString (cons
+ QString KLocalizedStringPrivate::toString (const KLocale *locale) const
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     // Assure the message has been supplied.
+     if (msg.isEmpty())
+@@ -474,7 +471,7 @@ QString KLocalizedStringPrivate::postFor
+                                              const QString &ctxt) const
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     QString final = text;
+ 
+@@ -499,7 +496,7 @@ QString KLocalizedStringPrivate::substit
+                                                        bool &fallback) const
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     if (s->ktrs == NULL)
+         // Scripting engine not available.
+@@ -564,7 +561,7 @@ int KLocalizedStringPrivate::resolveInte
+     // fallback is set to true if Transcript evaluation requested so.
+ 
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     result.clear();
+     fallback = false;
+@@ -716,7 +713,7 @@ int KLocalizedStringPrivate::resolveInte
+ QVariant KLocalizedStringPrivate::segmentToValue (const QString &seg) const
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     // Return invalid variant if segment is either not a proper
+     // value reference, or the reference is out of bounds.
+@@ -751,7 +748,7 @@ QString KLocalizedStringPrivate::postTra
+                                                  const QString &final) const
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     if (s->ktrs == NULL)
+         // Scripting engine not available.
+@@ -945,7 +942,7 @@ extern "C"
+ void KLocalizedStringPrivate::loadTranscript ()
+ {
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    QMutexLocker lock(kLocaleMutex());
+ 
+     s->loadTranscriptCalled = true;
+     s->ktrs = NULL; // null indicates that Transcript is not available
+@@ -979,7 +976,8 @@ void KLocalizedStringPrivate::notifyCata
+         return;
+     }
+     KLocalizedStringPrivateStatics *s = staticsKLSP;
+-    QMutexLocker lock(&s->mutex);
++    // Very important: do not the mutex here.
++    //QMutexLocker lock(kLocaleMutex());
+ 
+     // Find script modules for all included language/catalogs that have them,
+     // and remember their paths.
+--- a/kdecore/localization/klocale.cpp
++++ b/kdecore/localization/klocale.cpp
+@@ -22,6 +22,7 @@
+ */
+ 
+ #include "klocale.h"
++#include "klocale_p.h"
+ 
+ #include <config.h>
+ 
+@@ -242,7 +243,6 @@ public:
+   // Handling of translation catalogs
+   QStringList languageList;
+ 
+-  QMutex* mutex;
+   QList<KCatalogName> catalogNames; // list of all catalogs (regardless of language)
+   QList<KCatalog> catalogs; // list of all found catalogs, one instance per catalog name and language
+   int numberOfSysCatalogs; // number of catalogs that each app draws from
+@@ -276,7 +276,6 @@ public:
+ KLocalePrivate::KLocalePrivate(const QString& catalog, KConfig *config, const QString &language_, const QString &country_)
+     : language(language_),
+       country(country_),
+-      mutex(new QMutex(QMutex::Recursive)),
+       useTranscript(false),
+       codecForEncoding(0),
+       languages(0), calendar(0),
+@@ -311,7 +310,7 @@ KLocale::KLocale(const QString& catalog,
+ void KLocalePrivate::initMainCatalogs()
+ {
+   KLocaleStaticData *s = staticData;
+-  QMutexLocker lock(mutex);
++  QMutexLocker lock(kLocaleMutex());
+ 
+   if (!s->maincatalog.isEmpty()) {
+       // If setMainCatalog was called, then we use that (e.g. korgac calls setMainCatalog("korganizer") to use korganizer.po)
+@@ -541,7 +540,7 @@ bool KLocale::setLanguage(const QString 
+ 
+ bool KLocalePrivate::setLanguage(const QString & _language, KConfig *config)
+ {
+-  QMutexLocker lock(mutex);
++  QMutexLocker lock(kLocaleMutex());
+   languageList.removeAll( _language );
+   languageList.prepend( _language ); // let us consider this language to be the most important one
+ 
+@@ -563,7 +562,7 @@ bool KLocale::setLanguage(const QStringL
+ 
+ bool KLocalePrivate::setLanguage(const QStringList & languages)
+ {
+-  QMutexLocker lock(mutex);
++  QMutexLocker lock(kLocaleMutex());
+   // This list might contain
+   // 1) some empty strings that we have to eliminate
+   // 2) duplicate entries like in de:fr:de, where we have to keep the first occurrence of a language in order
+@@ -685,7 +684,7 @@ QString KLocale::country() const
+ 
+ void KLocale::insertCatalog( const QString & catalog )
+ {
+-  QMutexLocker lock(d->mutex);
++  QMutexLocker lock(kLocaleMutex());
+     int pos = d->catalogNames.indexOf(KCatalogName(catalog));
+     if (pos != -1) {
+         ++d->catalogNames[pos].loadCount;
+@@ -736,7 +735,7 @@ void KLocalePrivate::updateCatalogs( )
+ 
+ void KLocale::removeCatalog(const QString &catalog)
+ {
+-    QMutexLocker lock(d->mutex);
++    QMutexLocker lock(kLocaleMutex());
+     int pos = d->catalogNames.indexOf(KCatalogName(catalog));
+     if (pos == -1)
+         return;
+@@ -749,7 +748,7 @@ void KLocale::removeCatalog(const QStrin
+ 
+ void KLocale::setActiveCatalog(const QString &catalog)
+ {
+-    QMutexLocker lock(d->mutex);
++    QMutexLocker lock(kLocaleMutex());
+     int pos = d->catalogNames.indexOf(KCatalogName(catalog));
+     if (pos == -1)
+         return;
+@@ -759,7 +758,6 @@ void KLocale::setActiveCatalog(const QSt
+ 
+ KLocale::~KLocale()
+ {
+-    delete d->mutex;
+     delete d->calendar;
+     delete d->languages;
+     delete d;
+@@ -788,7 +786,7 @@ void KLocalePrivate::translate_priv(cons
+                 << "Fix the program" << endl;
+   }
+ 
+-  QMutexLocker locker(mutex);
++  QMutexLocker locker(kLocaleMutex());
+   // determine the fallback string
+   QString fallback;
+   if ( msgid_plural == NULL )
+@@ -1370,7 +1368,7 @@ QString KLocale::formatByteSize( double 
+     //Kibi-byte             KiB             2^10    1,024 bytes
+ 
+     if (d->byteSizeFmt.size() == 0) {
+-        QMutexLocker lock(d->mutex);
++        QMutexLocker lock(kLocaleMutex());
+         // Pretranslated format strings for byte sizes.
+         #define CACHEBYTEFMT(x) { \
+             QString s; \
+@@ -2568,7 +2566,6 @@ KLocale::KLocale(const KLocale & rhs) : 
+ {
+   d->languages = 0; // Don't copy languages
+   d->calendar = 0; // Don't copy the calendar
+-  d->mutex = 0; // Don't copy the mutex
+ }
+ 
+ KLocale & KLocale::operator=(const KLocale & rhs)
+@@ -2583,8 +2580,7 @@ KLocale & KLocale::operator=(const KLoca
+ 
+ void KLocale::copyCatalogsTo(KLocale *locale)
+ {
+-    QMutexLocker lock(d->mutex);
+-    QMutexLocker lockOther(locale->d->mutex);
++    QMutexLocker lock(kLocaleMutex());
+     locale->d->catalogNames = d->catalogNames;
+     locale->d->updateCatalogs();
+ }
+@@ -2656,3 +2652,9 @@ KLocale::DigitSet KLocale::dateTimeDigit
+ {
+     return d->dateTimeDigitSet;
+ }
++
++Q_GLOBAL_STATIC_WITH_ARGS(QMutex, s_kLocaleMutex, (QMutex::Recursive))
++QMutex* kLocaleMutex()
++{
++    return s_kLocaleMutex();
++}

Modified: trunk/packages/kdelibs/debian/patches/series
===================================================================
--- trunk/packages/kdelibs/debian/patches/series	2009-10-10 19:57:28 UTC (rev 16116)
+++ trunk/packages/kdelibs/debian/patches/series	2009-10-10 20:04:15 UTC (rev 16117)
@@ -1,3 +1,5 @@
+01_r1032787_khtml_show_hide_fix.diff
+02_r1032185_threading_issues_in_klocale.diff
 08_add_debian_build_type.diff
 11_default_kde4_xdg_menu_prefix.diff
 13_qt4_designer_plugins_path.diff




More information about the pkg-kde-commits mailing list