provide compat with wallpapers that implement a slot connection to urlDropped

svn path=/trunk/KDE/kdelibs/; revision=1217118
This commit is contained in:
Aaron J. Seigo 2011-01-25 20:51:53 +00:00
parent 71f6f1dd18
commit abae2d7686
2 changed files with 12 additions and 3 deletions

View File

@ -135,13 +135,22 @@ Wallpaper::~Wallpaper()
void Wallpaper::addUrls(const KUrl::List &urls)
{
if (d->script) {
d->script->addUrls(urls);
d->script->setUrls(urls);
} else {
// provide compatibility with urlDropped
foreach (const KUrl &url, urls) {
emit urlDropped(url);
}
}
}
void Wallpaper::setUrls(const KUrl::List &urls)
{
QMetaObject::invokeMethod(this, "addUrls", Q_ARG(KUrl::List,urls));
if (d->script) {
d->script->setUrls(urls);
} else {
QMetaObject::invokeMethod(this, "addUrls", Q_ARG(KUrl::List, urls));
}
}
KPluginInfo::List Wallpaper::listWallpaperInfo(const QString &formFactor)

View File

@ -396,7 +396,7 @@ class PLASMA_EXPORT Wallpaper : public QObject
* @arg url the URL of the dropped file
* @since 4.4
*/
void urlDropped(const KUrl &url);
PLASMA_EXPORT_DEPRECATED void urlDropped(const KUrl &url);
/**
* @internal