Changeset View
Changeset View
Standalone View
Standalone View
src/scriptengines/qml/plasmoid/wallpaperinterface.cpp
Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Line(s) | |||||
254 | void WallpaperInterface::executeAction(const QString &name) | 254 | void WallpaperInterface::executeAction(const QString &name) | ||
255 | { | 255 | { | ||
256 | if (m_qmlObject->rootObject()) { | 256 | if (m_qmlObject->rootObject()) { | ||
257 | const QByteArray actionName("action_" + name.toUtf8()); | 257 | const QByteArray actionName("action_" + name.toUtf8()); | ||
258 | QMetaObject::invokeMethod(m_qmlObject->rootObject(), actionName.constData(), Qt::DirectConnection); | 258 | QMetaObject::invokeMethod(m_qmlObject->rootObject(), actionName.constData(), Qt::DirectConnection); | ||
259 | } | 259 | } | ||
260 | } | 260 | } | ||
261 | 261 | | |||
262 | QVariant WallpaperInterface::createUiReadyInhibitor() | ||||
263 | { | ||||
264 | return m_containmentInterface->createUiReadyInhibitor(); | ||||
265 | } | ||||
266 | | ||||
262 | WallpaperInterface * WallpaperInterface::qmlAttachedProperties(QObject* object) | 267 | WallpaperInterface * WallpaperInterface::qmlAttachedProperties(QObject* object) | ||
263 | { | 268 | { | ||
264 | //at the moment of the attached object creation, the root item is the only one that hasn't a parent | 269 | //at the moment of the attached object creation, the root item is the only one that hasn't a parent | ||
265 | //only way to avoid creation of this attached for everybody but the root item | 270 | //only way to avoid creation of this attached for everybody but the root item | ||
266 | return object->parent() ? nullptr : s_rootObjects.value(QtQml::qmlEngine(object)); | 271 | return object->parent() ? nullptr : s_rootObjects.value(QtQml::qmlEngine(object)); | ||
267 | } | 272 | } | ||
268 | 273 | | |||
269 | #include "moc_wallpaperinterface.cpp" | 274 | #include "moc_wallpaperinterface.cpp" |