mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
18861df1f3
commit
1cc12738f4
2 changed files with 26 additions and 2 deletions
|
@ -50,7 +50,15 @@ WallpaperQml::WallpaperQml(QObject *parent, const QVariantList &args)
|
||||||
kdeclarative.setupBindings();
|
kdeclarative.setupBindings();
|
||||||
|
|
||||||
m_component = new QDeclarativeComponent(m_engine);
|
m_component = new QDeclarativeComponent(m_engine);
|
||||||
connect(m_component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), SLOT(componentStatusChanged(QDeclarativeComponent::Status)));
|
connect(
|
||||||
|
#if QT_VERSION < 0x041300
|
||||||
|
m_component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
|
||||||
|
this, SLOT(componentStatusChanged(QDeclarativeComponent::Status))
|
||||||
|
#else
|
||||||
|
m_component, SIGNAL(statusChanged(QDeclarativeComponent::ComponentStatus)),
|
||||||
|
this, SLOT(componentStatusChanged(QDeclarativeComponent::ComponentStatus))
|
||||||
|
#endif
|
||||||
|
);
|
||||||
connect(this, SIGNAL(renderHintsChanged()), SLOT(resizeWallpaper()));
|
connect(this, SIGNAL(renderHintsChanged()), SLOT(resizeWallpaper()));
|
||||||
connect(m_scene, SIGNAL(changed(QList<QRectF>)), SLOT(shouldRepaint(QList<QRectF>)));
|
connect(m_scene, SIGNAL(changed(QList<QRectF>)), SLOT(shouldRepaint(QList<QRectF>)));
|
||||||
}
|
}
|
||||||
|
@ -83,7 +91,11 @@ void WallpaperQml::setPackageName(const QString& packageName)
|
||||||
kWarning() << "couldn't load the package named" << packageName;
|
kWarning() << "couldn't load the package named" << packageName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x041300
|
||||||
void WallpaperQml::componentStatusChanged(QDeclarativeComponent::Status s)
|
void WallpaperQml::componentStatusChanged(QDeclarativeComponent::Status s)
|
||||||
|
#else
|
||||||
|
void WallpaperQml::componentStatusChanged(QDeclarativeComponent::ComponentStatus s)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (s==QDeclarativeComponent::Ready) {
|
if (s==QDeclarativeComponent::Ready) {
|
||||||
if (m_item) {
|
if (m_item) {
|
||||||
|
@ -100,7 +112,15 @@ void WallpaperQml::componentStatusChanged(QDeclarativeComponent::Status s)
|
||||||
} else if (s==QDeclarativeComponent::Error) {
|
} else if (s==QDeclarativeComponent::Error) {
|
||||||
delete m_component;
|
delete m_component;
|
||||||
m_component = new QDeclarativeComponent(m_engine);
|
m_component = new QDeclarativeComponent(m_engine);
|
||||||
connect(m_component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), SLOT(componentStatusChanged(QDeclarativeComponent::Status)));
|
connect(
|
||||||
|
#if QT_VERSION < 0x041300
|
||||||
|
m_component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
|
||||||
|
this, SLOT(componentStatusChanged(QDeclarativeComponent::Status))
|
||||||
|
#else
|
||||||
|
m_component, SIGNAL(statusChanged(QDeclarativeComponent::ComponentStatus)),
|
||||||
|
this, SLOT(componentStatusChanged(QDeclarativeComponent::ComponentStatus))
|
||||||
|
#endif
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (!m_component->errors().isEmpty())
|
if (!m_component->errors().isEmpty())
|
||||||
kDebug() << "wallpaper errors:" << m_component->errors();
|
kDebug() << "wallpaper errors:" << m_component->errors();
|
||||||
|
|
|
@ -40,7 +40,11 @@ class WallpaperQml : public Plasma::Wallpaper
|
||||||
private slots:
|
private slots:
|
||||||
void resizeWallpaper();
|
void resizeWallpaper();
|
||||||
void shouldRepaint(const QList< QRectF >& rects);
|
void shouldRepaint(const QList< QRectF >& rects);
|
||||||
|
#if QT_VERSION < 0x041300
|
||||||
void componentStatusChanged(QDeclarativeComponent::Status s);
|
void componentStatusChanged(QDeclarativeComponent::Status s);
|
||||||
|
#else
|
||||||
|
void componentStatusChanged(QDeclarativeComponent::ComponentStatus s);
|
||||||
|
#endif
|
||||||
void setPackageName(const QString& name);
|
void setPackageName(const QString& name);
|
||||||
void changeWallpaper(const QModelIndex& idx);
|
void changeWallpaper(const QModelIndex& idx);
|
||||||
void setBackgroundColor(const QColor& color);
|
void setBackgroundColor(const QColor& color);
|
||||||
|
|
Loading…
Add table
Reference in a new issue