Don't rely on Q_PROPERTY if we're inheriting QDBusAbstractInterfaceBase

See bug:
https://bugreports.qt.io/browse/QTBUG-46858
This commit is contained in:
Aleix Pol 2015-06-25 04:08:00 +02:00
parent 43451d6ae1
commit 6d83827b18
2 changed files with 2 additions and 4 deletions

View file

@ -119,7 +119,7 @@ ApplicationWindow
text: i18n("Open Multimedia Remote Control")
onClicked: stack.push( {
item: "qrc:/qml/mpris.qml",
properties: { mprisInterface: MprisDbusInterfaceFactory.create(deviceView.currentDevice.id) }
properties: { mprisInterface: MprisDbusInterfaceFactory.create(deviceView.currentDevice.id()) }
} );
}
Button {

View file

@ -52,13 +52,11 @@ class KDECONNECTINTERFACES_EXPORT DeviceDbusInterface
// the signals for the properties
Q_PROPERTY(bool isPaired READ isPaired NOTIFY pairingChangedProxy)
/** @returns an id even if the interface isn't valid */
Q_PROPERTY(QString id READ id CONSTANT)
public:
DeviceDbusInterface(const QString& deviceId, QObject* parent = 0);
virtual ~DeviceDbusInterface();
QString id() const;
Q_SCRIPTABLE QString id() const;
Q_SCRIPTABLE void pluginCall(const QString &plugin, const QString &method);
Q_SIGNALS: