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

List:       kde-commits
Subject:    branches/KDE/4.5/kdelibs/kdeui/util
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-09-10 17:57:41
Message-ID: 20100910180145.3671BAC884 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1173887 by aseigo:

backport of private pointer deletion
BUG:250402


 M  +8 -2      kimagecache.cpp  
 M  +5 -0      kimagecache.h  


--- branches/KDE/4.5/kdelibs/kdeui/util/kimagecache.cpp #1173886:1173887
@@ -36,8 +36,9 @@
     Q_OBJECT
 
     public:
-    Private()
-        : timestamp(::time(0))
+    Private(QObject *parent = 0)
+        : QObject(parent)
+        ,timestamp(::time(0))
         , enablePixmapCaching(true)
     {
         QObject::connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()),
@@ -71,6 +72,11 @@
     d->pixmapCache.setMaxCost(defaultCacheSize);
 }
 
+KImageCache::~KImageCache()
+{
+    delete d;
+}
+
 bool KImageCache::insertImage(const QString &key, const QImage &image)
 {
     QBuffer buffer;
--- branches/KDE/4.5/kdelibs/kdeui/util/kimagecache.h #1173886:1173887
@@ -76,6 +76,11 @@
                 unsigned expectedItemSize = 0);
 
     /**
+     * Deconstructor
+     */
+    ~KImageCache();
+
+    /**
      * Inserts the pixmap given by @p pixmap to the cache, accessible with
      * @p key. The pixmap must be converted to a QImage in order to be stored
      * into shared memory. In order to prevent unnecessary conversions from
[prev in list] [next in list] [prev in thread] [next in thread] 

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