[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/icons
From:       David Faure <faure () kde ! org>
Date:       2009-09-17 22:16:41
Message-ID: 1253225801.587194.20795.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1025058 by dfaure:

Remove dead KICONLOADER_CHECKS code, wasn't used anymore, just slowing things down.


 M  +0 -56     kiconloader.cpp  


--- trunk/KDE/kdelibs/kdeui/icons/kiconloader.cpp #1025057:1025058
@@ -365,43 +365,6 @@
     }
 }
 
-#define KICONLOADER_CHECKS
-#ifdef KICONLOADER_CHECKS
-// Keep a list of recently created and destroyed KIconLoader instances in order
-// to detect bugs like #68528.
-struct KIconLoaderDebug
-{
-    KIconLoaderDebug( KIconLoader* l, const QString& a )
-        : loader( l ), appname( a ), valid( true )
-        {}
-    KIconLoader* loader;
-    QString appname;
-    bool valid;
-    QString delete_bt;
-};
-
-static QList< KIconLoaderDebug > *kiconloaders;
-
-static void registerIconLoader( KIconLoader* iconloader, const QString& _appname )
-{
-    if( kiconloaders == NULL )
-        kiconloaders = new QList< KIconLoaderDebug>();
-    // check for the (very unlikely case) that new KIconLoader gets allocated
-    // at exactly same address like some previous one
-    for( QList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
-         it != kiconloaders->end();
-         )
-        {
-        if( (*it).loader == iconloader )
-            it = kiconloaders->erase( it );
-        else
-            ++it;
-        }
-    kiconloaders->append( KIconLoaderDebug( iconloader, _appname ));
-}
-
-#endif
-
 KIconLoader::KIconLoader(const QString& _appname, KStandardDirs *_dirs, QObject* parent)
     : QObject(parent)
 {
@@ -410,9 +373,6 @@
 
     connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)),
             this, SLOT(newIconLoader()));
-#ifdef KICONLOADER_CHECKS
-    registerIconLoader(this, _appname);
-#endif
     d->init( _appname, _dirs );
 }
 
@@ -424,9 +384,6 @@
 
     connect(KGlobalSettings::self(), SIGNAL(iconChanged(int)),
             this, SLOT(newIconLoader()));
-#ifdef KICONLOADER_CHECKS
-    registerIconLoader(this, componentData.componentName());
-#endif
     d->init(componentData.componentName(), componentData.dirs());
 }
 
@@ -546,19 +503,6 @@
 
 KIconLoader::~KIconLoader()
 {
-#ifdef KICONLOADER_CHECKS
-    for( QList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
-         it != kiconloaders->end();
-         ++it )
-        {
-        if( (*it).loader == this )
-            {
-            (*it).valid = false;
-            (*it).delete_bt = kBacktrace();
-            break;
-            }
-        }
-#endif
     delete d;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic