use the API, luke!

This commit is contained in:
Aaron Seigo 2011-04-30 10:15:00 +02:00
parent eb871eca6a
commit 5f0daaec50

View File

@ -548,7 +548,7 @@ void WallpaperPrivate::newRenderCompleted(WallpaperRenderThread *currentRenderer
int resizeMethod, const QColor &color) int resizeMethod, const QColor &color)
{ {
q->disconnect(currentRenderer, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)), q->disconnect(currentRenderer, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)),
q, SLOT(newRenderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor))); q, SLOT(newRenderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)));
if (!s_renderQueue.isEmpty()) { if (!s_renderQueue.isEmpty()) {
while (!s_renderQueue.isEmpty()) { while (!s_renderQueue.isEmpty()) {
@ -566,11 +566,7 @@ void WallpaperPrivate::newRenderCompleted(WallpaperRenderThread *currentRenderer
break; break;
} }
} else { } else {
for (int i = 0; i < s_renderers.size(); i++) { s_renderers.removeAll(currentRenderer);
if (s_renderers[i] == currentRenderer){
s_renderers.removeAt(i);
}
}
currentRenderer->deleteLater(); currentRenderer->deleteLater();
currentRenderer = 0; currentRenderer = 0;
} }