provide compat with wallpapers that implement a slot connection to urlDropped
svn path=/trunk/KDE/kdelibs/; revision=1217118
This commit is contained in:
parent
71f6f1dd18
commit
abae2d7686
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user