kross: src/core/metafunction.h:89 char* to QByteArrayData*

Maximiliano Curia maxy at gnuservers.com.ar
Wed Feb 4 18:54:36 UTC 2015


Hi,

As part of the packaging efforts in Debian we are testing the installed
headers to check that they compile correctly and have all their dependencies
installed.
Testing kross we found this:
// static metaobject
staticMetaObject.d.superdata = &QObject::staticMetaObject;
staticMetaObject.d.stringdata = m_stringData.data();
staticMetaObject.d.data = m_data;
staticMetaObject.d.extradata = 0;

That seems to be the qt4 way, as stringdata is a const QByteArrayData* in qt5
(now reported in: https://bugs.kde.org/show_bug.cgi?id=343779).

Adding a reinterpret_cast<const QByteArrayData *> fixes the issue, or even
better using:
staticMetaObject.d.stringdata = m_stringData.data_ptr();
As suggested by Dmitry Shachnev in the bug report.

Now, the pending question is, has kross been completely migrated to the new
revision of meta object [1]? (was it revision 7?)

[1]: http://blog.qt.io/blog/2012/06/22/changes-to-the-meta-object-system-in-qt-5/

Happy hacking,
-- 
"The best way to predict the future is to invent it."
-- Alan Kay
Saludos /\/\ /\ >< `/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150204/0a67a319/attachment.sig>


More information about the Kde-frameworks-devel mailing list