[Development] 6 conflicting symbols between QtQuick 1 and 2

Chris Adams chris.adams at qinetic.com.au
Wed Apr 24 02:24:18 CEST 2013


qmlEngine() and qmlContext() are documented via qdoc comments in
qqmlengine.cpp and should show up in the related functions section of the
generated documentation.  As you've noticed, however, for some reason the
documentation does not show up in the generated documentation.  I don't
know why.  Perhaps Jerome knows.  qmlInfo() should be documented also - if
it isn't, we need to fix that.

Anyway, I agree with Lars: the QtQuick1 ones could be renamed.

I really don't think people should be using QtQuick1 and QtQuick2 in the
same application, at all, but I guess that's a bit beside the point.  This
is definitely something we overlooked when doing the QtQuick1-in-Qt5 stuff.

Cheers,
Chris.

On Wed, Apr 24, 2013 at 1:48 AM, Thiago Macieira
<thiago.macieira at intel.com>wrote:

> 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
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130424/730c2994/attachment.html>


More information about the Development mailing list