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

List:       kde-commits
Subject:    kdeartwork/styles/plastik
From:       Frerich Raabe <raabe () kde ! org>
Date:       2004-06-23 16:20:12
Message-ID: 20040623162012.33B289092 () office ! kde ! org
[Download RAW message or body]

CVS commit by raabe: 

- Don't crash on FreeBSD 4.x (where libc's dlclose fails to destruct
  statics properly, which results in crashes).


  M +10 -12    plastik.cpp   1.83
  M +8 -0      plastik.h   1.28


--- kdeartwork/styles/plastik/plastik.cpp  #1.82:1.83
@@ -157,4 +157,10 @@ PlastikStyle::PlastikStyle() : KStyle( A
     hoverWidget = 0;
 
+    horizontalDots = 0;
+    verticalDots = 0;
+
+    horizontalLine = 0;
+    verticalLine = 0;
+
     QSettings settings;
     _contrast = settings.readNumEntry("/Qt/KDE/contrast", 6);
@@ -210,4 +216,8 @@ PlastikStyle::~PlastikStyle()
 {
     delete pixmapCache;
+    delete horizontalDots;
+    delete verticalDots;
+    delete horizontalLine;
+    delete verticalLine;
 }
 
@@ -1233,7 +1243,4 @@ void PlastikStyle::renderFocusRect(QPain
 {
 
-    static QBitmap *verticalDots = 0, *horizontalDots = 0;
-    static QCleanupHandler<QBitmap> qlv_cleanup_bitmap;
-
     // Create the dotline pixmaps if not already created
     if (!verticalDots )
@@ -1264,7 +1271,4 @@ void PlastikStyle::renderFocusRect(QPain
         QApplication::flushX(); 
         horizontalDots->setMask( *horizontalDots );
-
-        qlv_cleanup_bitmap.add( &verticalDots ); 
-        qlv_cleanup_bitmap.add( &horizontalDots ); 
     }
 
@@ -1520,7 +1524,4 @@ void PlastikStyle::drawKStylePrimitive(K
         // Typical Windows style listview branch element (dotted line).
 
-        static QBitmap *verticalLine = 0, *horizontalLine = 0;
-        static QCleanupHandler<QBitmap> qlv_cleanup_bitmap;
-
         // Create the dotline pixmaps if not already created
         if ( !verticalLine )
@@ -1551,7 +1552,4 @@ void PlastikStyle::drawKStylePrimitive(K
             QApplication::flushX();
             horizontalLine->setMask( *horizontalLine );
-
-            qlv_cleanup_bitmap.add( &verticalLine );
-            qlv_cleanup_bitmap.add( &horizontalLine );
         }
 

--- kdeartwork/styles/plastik/plastik.h  #1.27:1.28
@@ -359,4 +359,12 @@ private:
     };
     QIntCache<CacheEntry> *pixmapCache;
+
+    // For renderFocusRect
+    mutable QBitmap *verticalDots;
+    mutable QBitmap *horizontalDots;
+
+    // For KPE_ListViewBranch
+    mutable QBitmap *verticalLine;
+    mutable QBitmap *horizontalLine;
 };
 


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

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