>
> Step 1: mySharedPtr.data() ==> MyShared* P;
>> Step 2: make sure the QML engine doesn't assume ownership:
>> QDeclarativeEngine::**setObjectOwnership
>> Step 3: hand over P to QML: setProperty or setContextProperty
>>
>
> Yep, those steps seem to be the current requirement. If my patches get in
On 29.05.2012 10:55, Rene Jensen wrote:
>>> Question: How can we expose objects governed by QSharedPointer to
>>> QML
>>> safely? I *can* guarantee the lifecycle beyond the life of my
>>> QDeclarativeEngine.
>> If you can guarantee that, then use mySharedPtr.data() as others
>> have
>> said.
>
>
>>
>> Question: How can we expose objects governed by QSharedPointer to QML
>> safely? I *can* guarantee the lifecycle beyond the life of my
>> QDeclarativeEngine.
>
> If you can guarantee that, then use mySharedPtr.data() as others have said.
Just a quick thought, would that suggesion be leading
First of all, I just want to say thanks for the quite unexpected
amount of replies to my mail. They will take a little time to absorb,
but I still feel I have relevant comments on some of the issues - once
the "heatwave" in Denmark has passed (apparently my brain fries at
temperatures above 22 C)
Den 25. mai 2012 02:35, skrev ext christopher.ad...@nokia.com:
> Hi,
>
>>> In QtQuick 2.0 (ie, Qt 5.0), we are thinking about using property var
>>> more often in the implementation (eg, of qobject-derived-type
>>> properties) to avoid some of those edge-cases, and providing more
>>> consistent (an
Hi,
> > In QtQuick 2.0 (ie, Qt 5.0), we are thinking about using property var
> > more often in the implementation (eg, of qobject-derived-type
> > properties) to avoid some of those edge-cases, and providing more
> > consistent (and useful) referencing semantics.
>
> Can you say what 'var' is an
Hi Rene,
Thanks for the email. I think you raise some valid points. Some work on
addressing them is already underway.
On Wednesday, May 23, 2012 12:25:42 Rene Jensen wrote:
> Disclaimer 3: Discussing QML seems very poisonous these days, but I
> still feel the need for a thread that focus on the
On Thursday, May 24, 2012 02:41:31 christopher.ad...@nokia.com wrote:
> In QtQuick 2.0 (ie, Qt 5.0), we are thinking about using property var more
> often in the implementation (eg, of qobject-derived-type properties) to
> avoid some of those edge-cases, and providing more consistent (and useful)
>
On quinta-feira, 24 de maio de 2012 16.33.53, Olivier Goffart wrote:
> > I've long wanted to make QSharedPointer on QObject-derivatives participate
> > in the whole-tree ownership, somehow. I introduced QSharedPointer in 4.4
> > and I did some work in 4.5 to make that work.
> >
> > My original solu
Hi Rene,
On Wed, May 23, 2012 at 1:25 PM, Rene Jensen wrote:
>
> DOCUMENTATION...
>
> The truth is that initially in ten out of ten cases I resorted to
> guessing about the type and ownership of a value when I cross a
> boundary. Since I have thoroughly cross examined the docs, it must
> mean tha
On Wednesday 23 May 2012 13:43:22 Thiago Macieira wrote:
> On quarta-feira, 23 de maio de 2012 14.16.12, Alberto Mardegan wrote:
> > On 05/23/2012 01:25 PM, Rene Jensen wrote:
> > > Question: How can we expose objects governed by QSharedPointer to QML
> > > safely? I can guarantee the lifecycle bey
On quinta-feira, 24 de maio de 2012 16.26.19, Olivier Goffart wrote:
> > Then you would also be able to make the "delete" operator work
> > consistently with reference-counted QObjects, by overriding it and make
> > it just decrement the count (and delete the object if the count is 0).
>
> No. That
On Thursday 24 May 2012 11:46:05 Alberto Mardegan wrote:
> On 05/23/2012 02:43 PM, Thiago Macieira wrote:
> > My original solution was to have a parent only deref its children's shared
> > pointer counter, deleting it only if it became zero. That means that if
> > you
> > had a QSharedPointer to an
On 05/23/2012 02:43 PM, Thiago Macieira wrote:
> My original solution was to have a parent only deref its children's shared
> pointer counter, deleting it only if it became zero. That means that if you
> had a QSharedPointer to an object in the middle of the hierarchy, that object
> would be orp
Hi Rene,
I certainly agree that constructive discussion about the QML language and ways
that it could be improved are important. You raise a lot of important points,
some of which will be addressed in Qt5.0, some of which we still need to
consider how to fix, and what priority they should be,
ct.org
[mailto:development-bounces+aschmidt=dekaresearch@qt-project.org] On Behalf
Of marius.storm-ol...@nokia.com
Sent: Wednesday, May 23, 2012 09:52
To: development@qt-project.org; thiago.macie...@intel.com
Subject: Re: [Development] On QML, ownership, QObject-trees and QSharedPointer
W00t should
W00t should have a backlog which covers the conversation, if it was done on our
public channels :-)
--
Sent from my Nokia N9On 5/23/12 13:44 ext Thiago Macieira wrote:
On quarta-feira, 23 de maio de 2012 14.16.12, Alberto Mardegan wrote:
> On 05/23/2012 01:25 PM, Rene Jensen wrote:
> > Question:
On quarta-feira, 23 de maio de 2012 14.16.12, Alberto Mardegan wrote:
> On 05/23/2012 01:25 PM, Rene Jensen wrote:
> > Question: How can we expose objects governed by QSharedPointer to QML
> > safely? I can guarantee the lifecycle beyond the life of my
> > QDeclarativeEngine.
>
> As neither of us k
Hi Rene,
I don't have real answers for your questions, but just a piece of
advice: KISS.
On 05/23/2012 01:25 PM, Rene Jensen wrote:
> Question: How can we expose objects governed by QSharedPointer to QML
> safely? I *can* guarantee the lifecycle beyond the life of my
> QDeclarativeEngine.
As ne
Hello qtpies.
Disclaimer 1: I have read incessantly in the Quick documents, searched
the net and also extensively used QML. Please don't LMGTFY or RTFM me
instinctively ;-)
Disclaimer 2: I started a topic at QtCentre
(http://www.qtcentre.org/threads/49059-QSharedPointer-QWeakPointer-in-QML),
hopin
20 matches
Mail list logo