[Development] 6 conflicting symbols between QtQuick 1 and 2
Thiago Macieira
thiago.macieira at intel.com
Tue Apr 23 17:48:41 CEST 2013
On terça-feira, 23 de abril de 2013 13.04.22, Harri Porten wrote:
> I have not checked the respective use cases of the functions but I guess
> that they are internal to Qt despite being exported? Anyone sees a problem
> with renaming the functions of v1 or v2 to make their names unique? If
> not, we'll prepare a patch and present it.
All of those functions are declared in public headers.
qmlAttachedPropertiesObject is documented in QtQml:
http://qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlAttachedPropertiesObject
and it's used in QtQuick1 documentation:
http://qt-project.org/doc/qt-4.8/qml-extending.html#attached-properties
(the documentation for QtQuick1 5.0 is not online)
qmlContext and qmlEngine are not documented but they are used in QtQml
documentation:
http://qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlRegisterSingletonType-2
Also add to your list:
qmlRegisterTypeNotAvailable (it's AUTOTEST_EXPORT in QtQuick1)
To make matters worse, the following *documented* functions are duplicated:
qmlRegisterRevision
qmlRegisterInterface
qmlRegisterType
qmlRegisterUncreatableType
And the following are also duplicated, but not documented:
qmlRegisterCustomType
qmlRegisterExtendedType
They are inline and non-exported, so the impact is minimised. On all modern
platforms, the use of those functions inside one Qt library will not affect
other libraries, even though it's a violation of the C++ standard.
However, it does make it impossible to use both QtQuick1 and QtQml inside the
same library or application, or to use two third-party or user libraries, one
for each QML iteration. The only way to use both QML1 and QML2 in one
application or library is to use a plugin and make the decision application-
wide (you can't load the two plugins at the same time).
I'm going to wait for other people to suggest solutions to this. Mine, for the
moment, is a hammer...
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130423/8c5e8056/attachment.sig>
More information about the Development
mailing list