From 8467a23d6a7f4b52619b60462c8ba80d8a736a9e Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 30 Dec 2004 14:07:11 +0000 Subject: Remove the 'namespacing' of global and app icons in the PixmapCache as it didn't utilize the embedded pixmaps anymore. Revert of the last commit --- (limited to 'library/resource.cpp') diff --git a/library/resource.cpp b/library/resource.cpp index 43fdc60..cfa0d26 100644 --- a/library/resource.cpp +++ b/library/resource.cpp @@ -62,35 +62,10 @@ static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET"); QPixmap Resource::loadPixmap( const QString &pix ) { QPixmap pm; - - // Give the pixmaps some kind of namespace in the pixmapcache - int index = pix.find('/'); - QString appName1 = qApp->argv()[0]; - appName1 = appName1.replace(QRegExp(".*/"),""); - QString appName2 = pix.left(index); - - if ( appName2 == "" || appName2 == pix || appName2 == "icons" ) - appName2 = "Global"; - - QString appKey1 = "_QPE_" + appName1 + "_" + pix; - QString appKey2 = "_QPE_" + appName2 + "_" + pix.mid(index+1); - - if ( !QPixmapCache::find(appKey1, pm) ) { - if ( !QPixmapCache::find(appKey2, pm) ) { - QImage img; - QString f = findPixmap( pix ); - if ( !f.isEmpty() ) { - img.load(f); - if ( !img.isNull() ) { - pm.convertFromImage(img); - if ( f.contains(appName1) ) { - QPixmapCache::insert( appKey1, pm); - } else { - QPixmapCache::insert( appKey2, pm); - } - } - } - } + QString key="QPE_"+pix; + if ( !QPixmapCache::find(key,pm) ) { + pm.convertFromImage(loadImage(pix)); + QPixmapCache::insert(key,pm); } return pm; } -- cgit v0.9.0.2