[Development] 答复: 答复: QtQuick1 and 2

魏越闽 weiyuemin at 7fgame.com
Sat May 11 14:41:36 CEST 2013


Hi,
I patched https://codereview.qt-project.org/#change,55658 just now.
Now I have both patches, but still got the same error. 
I've already put the code into two .cpp files, as I wrote in https://bugreports.qt-project.org/browse/QTBUG-31064
It will crash even though the QQuickView and QDeclarativeView don't have a parent-child relationship.

I'm on Windows XP, using msvc2010

What I do:
1). Update the code using 
    git pull
    git submodule sync
    git submodule update --recursive
2). git fetch https://codereview.qt-project.org/p/qt/qtquick1 refs/changes/21/55521/6 && git checkout FETCH_HEAD
3). Jom\jom module-qtquick1
4). Jom\jom module-qtquick1-install_subtargets
5). git fetch https://codereview.qt-project.org/p/qt/qtdeclarative refs/changes/58/55658/1 && git checkout FETCH_HEAD
6). Jom\jom module-qtdeclarative
7). Jom\jom module-qtdeclarative-install_subtargets
At this time I tried and got the same error. Then I repeated 3). and 4). Still the same error.


Am I doing some operations wrong?

Thank you !

------------------------------------------------------------------
Wei Yuemin
7FGame


-----邮件原件-----
发件人: Olivier Goffart [mailto:olivier at woboq.com] 
发送时间: 2013年5月11日 19:51
收件人: development at qt-project.org
抄送: 魏越闽; Harri Porten
主题: Re: [Development] 答复: QtQuick1 and 2

On Saturday 11 May 2013 11:41:03 魏越闽 wrote:
> Hi,
> My test result:
> https://bugreports.qt-project.org/browse/QTBUG-31064?focusedCommentId=
> 202419 
> &page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
> #comme
> nt-202419


You need to have both
https://codereview.qt-project.org/#change,55521
and
https://codereview.qt-project.org/#change,55658

With those two patches, you should be able to have an application with both
QtQuick1 and QtQuick2

Howerver, you still cannot include QtQuick1 and QtQuick2 headers in the same translation unit.
In other words, code using QtQuick1's QtDeclarative, and code using QtQuick2's QtQml needs to be in different .cpp files.

Supporting this while still maintaining source compatibility would be possible with some more work. But I personally don't think it is something worth supporting. (We would need to use using some macro programming to remove the using namespace declaration and hide some macros) 

--
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org



More information about the Development mailing list