a better name, so that upon reading it is clear that there is a signal called renderCompleted as well as a slot (by changing the name of the (private) slot to something other than renderCompleted)
svn path=/trunk/KDE/kdelibs/; revision=1206548
This commit is contained in:
parent
aac15c8e68
commit
1217cd2c19
@ -54,9 +54,9 @@ public:
|
|||||||
|
|
||||||
bool findInCache(const QString &key, unsigned int lastModified = 0);
|
bool findInCache(const QString &key, unsigned int lastModified = 0);
|
||||||
|
|
||||||
void renderCompleted(WallpaperRenderThread *renderer,int token, const QImage &image,
|
void newRenderCompleted(WallpaperRenderThread *renderer,int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
int resizeMethod, const QColor &color);
|
int resizeMethod, const QColor &color);
|
||||||
void setupScriptSupport();
|
void setupScriptSupport();
|
||||||
|
|
||||||
static QList<WallpaperRenderThread *> s_renderers;
|
static QList<WallpaperRenderThread *> s_renderers;
|
||||||
|
@ -440,7 +440,7 @@ void Wallpaper::render(const QString &sourceImagePath, const QSize &size,
|
|||||||
WallpaperPrivate::s_renderers.append(renderThread);
|
WallpaperPrivate::s_renderers.append(renderThread);
|
||||||
d->renderToken = renderThread->render(sourceImagePath, size, resizeMethod, color);
|
d->renderToken = renderThread->render(sourceImagePath, size, resizeMethod, color);
|
||||||
connect(renderThread, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)),
|
connect(renderThread, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)),
|
||||||
this, SLOT(renderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)), Qt::UniqueConnection);
|
this, SLOT(newRenderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)), Qt::UniqueConnection);
|
||||||
} else {
|
} else {
|
||||||
WallpaperPrivate::RenderRequest request;
|
WallpaperPrivate::RenderRequest request;
|
||||||
request.parent = this;
|
request.parent = this;
|
||||||
@ -510,12 +510,12 @@ QString WallpaperPrivate::cachePath(const QString &key) const
|
|||||||
return KGlobal::dirs()->locateLocal("cache", "plasma-wallpapers/" + key + ".png");
|
return KGlobal::dirs()->locateLocal("cache", "plasma-wallpapers/" + key + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WallpaperPrivate::renderCompleted(WallpaperRenderThread *currentRenderer, int token, const QImage &image,
|
void WallpaperPrivate::newRenderCompleted(WallpaperRenderThread *currentRenderer, int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
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(renderCompleted(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()) {
|
||||||
@ -528,7 +528,7 @@ void WallpaperPrivate::renderCompleted(WallpaperRenderThread *currentRenderer, i
|
|||||||
currentRenderer->wait();
|
currentRenderer->wait();
|
||||||
request.parent.data()->d->renderToken = currentRenderer->render(request.file, request.size, request.resizeMethod, request.color);
|
request.parent.data()->d->renderToken = currentRenderer->render(request.file, request.size, request.resizeMethod, request.color);
|
||||||
QObject::connect(currentRenderer, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)),
|
QObject::connect(currentRenderer, SIGNAL(done(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)),
|
||||||
request.parent.data(), SLOT(renderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)), Qt::UniqueConnection);
|
request.parent.data(), SLOT(newRenderCompleted(WallpaperRenderThread*,int,QImage,QString,QSize,int,QColor)), Qt::UniqueConnection);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -508,9 +508,9 @@ class PLASMA_EXPORT Wallpaper : public QObject
|
|||||||
void setPreviewDuringConfiguration(const bool preview);
|
void setPreviewDuringConfiguration(const bool preview);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_PRIVATE_SLOT(d, void renderCompleted(WallpaperRenderThread *renderer, int token, const QImage &image,
|
Q_PRIVATE_SLOT(d, void newRenderCompleted(WallpaperRenderThread *renderer, int token, const QImage &image,
|
||||||
const QString &sourceImagePath, const QSize &size,
|
const QString &sourceImagePath, const QSize &size,
|
||||||
int resizeMethod, const QColor &color))
|
int resizeMethod, const QColor &color))
|
||||||
Q_PRIVATE_SLOT(d, void initScript())
|
Q_PRIVATE_SLOT(d, void initScript())
|
||||||
|
|
||||||
friend class WallpaperPackage;
|
friend class WallpaperPackage;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user