[Differential] [Request, 18 lines] D4305: Work round the DBus type casting bug
David Edmundson
noreply at phabricator.kde.org
Fri Jan 27 09:18:45 UTC 2017
davidedmundson created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
property() works in a slightly different way to just calling Get().
It allocates the variant of the relevant type in advance in QObject code, and then calls
the DBus code to populate it.
This fails for QByteArrayList, before it reaches DBus code.
I don't know why, and I should probably investigate..but we need an ASAP fix in Solid anyway.
Calling Get directly aleviates this problem.
m_device is a QDBusInterface making use of a magic DBus feature where it
aggregates all interfaces on that object path. This code therefor has to do the same as the GetAll().
From a DBus traffic perspective this code is identical, we just avoid going through Qt properties.
This shouldn't introduce any new bugs, as we already use GetAll directly, if anything this brings it more
in line.
TEST PLAN
Commented out the checkCache so that it always loads data.
Instead of failing, it now works.
REPOSITORY
R245 Solid
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D4305
AFFECTED FILES
src/solid/devices/backends/udisks2/udisksdevicebackend.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: davidedmundson
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170127/3ab3ddf5/attachment.html>
More information about the Kde-frameworks-devel
mailing list