[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/generic/wallpapers/image
From: Jonathan Michael Thomas <echidnaman () kubuntu ! org>
Date: 2010-07-28 17:22:12
Message-ID: 20100728172212.6131FAC7A9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1156185 by jmthomas:
-Fix a memory leak in both Slideshow and SingleImage mode by parenting our QActions
-Prevent these QActions from ever being thrown on the heap in SingleImage mode, since \
they are only used in Slideshow. Brings RAM savings of 500 bytes in SingleImage mode \
according to valgrind.
M +4 -4 image.cpp
--- trunk/KDE/kdebase/workspace/plasma/generic/wallpapers/image/image.cpp \
#1156184:1156185 @@ -52,10 +52,6 @@
connect(this, SIGNAL(renderCompleted(QImage)), this, \
SLOT(updateBackground(QImage)));
connect(this, SIGNAL(urlDropped(KUrl)), this, SLOT(setWallpaper(KUrl)));
connect(&m_timer, SIGNAL(timeout()), this, SLOT(nextSlide()));
- m_nextWallpaperAction = new QAction(KIcon("user-desktop"), i18n("Next Wallpaper \
Image"), NULL);
- connect(m_nextWallpaperAction, SIGNAL(triggered(bool)), this, \
SLOT(nextSlide()));
- m_openImageAction = new QAction(KIcon("document-open"), i18n("Open Wallpaper \
Image"), NULL);
- connect(m_openImageAction, SIGNAL(triggered(bool)), this, SLOT(openSlide()));
}
Image::~Image()
@@ -94,6 +90,10 @@
setSingleImage();
setContextualActions(QList<QAction*>());
} else {
+ m_nextWallpaperAction = new QAction(KIcon("user-desktop"), i18n("Next \
Wallpaper Image"), this); + connect(m_nextWallpaperAction, \
SIGNAL(triggered(bool)), this, SLOT(nextSlide())); + m_openImageAction = new \
QAction(KIcon("document-open"), i18n("Open Wallpaper Image"), this); + \
connect(m_openImageAction, SIGNAL(triggered(bool)), this, SLOT(openSlide())); \
QTimer::singleShot(200, this, SLOT(startSlideshow())); QList<QAction*> actions;
actions.push_back(m_nextWallpaperAction);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic