Re: [Development] Can the hidden QML properties please be documented?

2013-12-02 Thread Smith Martin
For a QML type in a .qml file, qdoc reports an error if it sees a QML property 
it thinks should be in the public API for that QML type and there is no 
\qmlproperty comment immediately preceding that property in the .qml file.

But for a QML type that is represented by a C++ class, qdoc doesn't know which 
C++ properties are meant to be be documented as QML properties, so it can't 
report an error if a C++ property is not documented as a QML property.

Maybe we should change this policy and tell qdoc to require a \qmlproperty for 
every C++ property that has a \property ?

martin

From: development-bounces+martin.smith=digia@qt-project.org 
[development-bounces+martin.smith=digia@qt-project.org] on behalf of Alan 
Alpert [4163654...@gmail.com]
Sent: Monday, December 02, 2013 7:32 AM
To: Mark Gaiser
Cc: development@qt-project.org
Subject: Re: [Development] Can the hidden QML properties please be
documented?

On Sun, Dec 1, 2013 at 4:25 AM, Mark Gaiser mark...@gmail.com wrote:
 On Sun, Dec 1, 2013 at 11:09 AM, Nurmi J-P jpnu...@digia.com wrote:


 On 01 Dec 2013, at 00:42, Mark Gaiser mark...@gmail.com wrote:

 Hi,

 Recently i was searching for a way to influence the dragDistance in
 QML. The documentation (i even looked at dev snapshot docs) didn't
 provide any clue, but the code did. Turns out there is a hidden
 property:

 drag.threshold (it is underlined in red in QtCreator, but works just fine!).

 Perhaps you're reading Qt 5.1.x docs? MouseArea::drag::threshold is a new 
 property that was added in September. The documentation is there in the 
 latest snapshot: 
 http://doc-snapshot.qt-project.org/qt5-release/qml-qtquick-mousearea.html


 For font rendering there is the hidden property:

 renderType

 Which works just fine, but is nowhere to be found in the Qt documentation.


 QQuickText::renderType was indeed missing from the docs. It has been fixed 
 in Qt 5.2.0:
 - https://bugreports.qt-project.org/browse/QTBUG-35018
 - https://codereview.qt-project.org/#change,72391

 --
 J-P Nurmi

 That's awesome!
 It still makes me wonder, how many more are hidden? I hope none :)

I hope so too, as it's usually a doc bug. Feel free to file further
issues like this on bugreports.qt-project.org .

--
Alan Alpert
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Can the hidden QML properties please be documented?

2013-12-02 Thread Mark Gaiser
On Mon, Dec 2, 2013 at 10:06 AM, Smith Martin martin.sm...@digia.com wrote:
 For a QML type in a .qml file, qdoc reports an error if it sees a QML 
 property it thinks should be in the public API for that QML type and there is 
 no \qmlproperty comment immediately preceding that property in the .qml file.

 But for a QML type that is represented by a C++ class, qdoc doesn't know 
 which C++ properties are meant to be be documented as QML properties, so it 
 can't report an error if a C++ property is not documented as a QML property.

 Maybe we should change this policy and tell qdoc to require a \qmlproperty 
 for every C++ property that has a \property ?

That sounds like a good thing to do if that prevents properties being
hidden. Remember, these 2 i mentioned are just the ones i discoverd in
recent months, i had more of those early on on Qt 5.0 and 5.1. Right
now it seems like the properties from the C++ QML components are too
easy to get wrong resulting in the property being undocumented. Even
while it might be properly documented, but just in the wrong order
(like renderType was).
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Can the hidden QML properties please be documented?

2013-12-02 Thread Alan Alpert
On Mon, Dec 2, 2013 at 1:06 AM, Smith Martin martin.sm...@digia.com wrote:
 For a QML type in a .qml file, qdoc reports an error if it sees a QML 
 property it thinks should be in the public API for that QML type and there is 
 no \qmlproperty comment immediately preceding that property in the .qml file.

 But for a QML type that is represented by a C++ class, qdoc doesn't know 
 which C++ properties are meant to be be documented as QML properties, so it 
 can't report an error if a C++ property is not documented as a QML property.

 Maybe we should change this policy and tell qdoc to require a \qmlproperty 
 for every C++ property that has a \property ?

If it's been associated with a QML type, yes.

There is the situation of a C++ type with C++ properties which is not
exposed to QML - don't want to document that.

But if we have a \qmltype which \instantiates it, then any C++
properties need to be considered QML properties as well (it helps if
\internal works with \qmlproperty for the ones that are meant to be
hidden ;) ).

--
Alan Alpert
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Can the hidden QML properties please be documented?

2013-12-01 Thread Mark Gaiser
On Sun, Dec 1, 2013 at 11:09 AM, Nurmi J-P jpnu...@digia.com wrote:


 On 01 Dec 2013, at 00:42, Mark Gaiser mark...@gmail.com wrote:

 Hi,

 Recently i was searching for a way to influence the dragDistance in
 QML. The documentation (i even looked at dev snapshot docs) didn't
 provide any clue, but the code did. Turns out there is a hidden
 property:

 drag.threshold (it is underlined in red in QtCreator, but works just fine!).

 Perhaps you're reading Qt 5.1.x docs? MouseArea::drag::threshold is a new 
 property that was added in September. The documentation is there in the 
 latest snapshot: 
 http://doc-snapshot.qt-project.org/qt5-release/qml-qtquick-mousearea.html


 For font rendering there is the hidden property:

 renderType

 Which works just fine, but is nowhere to be found in the Qt documentation.


 QQuickText::renderType was indeed missing from the docs. It has been fixed in 
 Qt 5.2.0:
 - https://bugreports.qt-project.org/browse/QTBUG-35018
 - https://codereview.qt-project.org/#change,72391

 --
 J-P Nurmi

That's awesome!
It still makes me wonder, how many more are hidden? I hope none :)
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Can the hidden QML properties please be documented?

2013-12-01 Thread Alan Alpert
On Sun, Dec 1, 2013 at 4:25 AM, Mark Gaiser mark...@gmail.com wrote:
 On Sun, Dec 1, 2013 at 11:09 AM, Nurmi J-P jpnu...@digia.com wrote:


 On 01 Dec 2013, at 00:42, Mark Gaiser mark...@gmail.com wrote:

 Hi,

 Recently i was searching for a way to influence the dragDistance in
 QML. The documentation (i even looked at dev snapshot docs) didn't
 provide any clue, but the code did. Turns out there is a hidden
 property:

 drag.threshold (it is underlined in red in QtCreator, but works just fine!).

 Perhaps you're reading Qt 5.1.x docs? MouseArea::drag::threshold is a new 
 property that was added in September. The documentation is there in the 
 latest snapshot: 
 http://doc-snapshot.qt-project.org/qt5-release/qml-qtquick-mousearea.html


 For font rendering there is the hidden property:

 renderType

 Which works just fine, but is nowhere to be found in the Qt documentation.


 QQuickText::renderType was indeed missing from the docs. It has been fixed 
 in Qt 5.2.0:
 - https://bugreports.qt-project.org/browse/QTBUG-35018
 - https://codereview.qt-project.org/#change,72391

 --
 J-P Nurmi

 That's awesome!
 It still makes me wonder, how many more are hidden? I hope none :)

I hope so too, as it's usually a doc bug. Feel free to file further
issues like this on bugreports.qt-project.org .

--
Alan Alpert
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Can the hidden QML properties please be documented?

2013-11-30 Thread Mark Gaiser
Hi,

Recently i was searching for a way to influence the dragDistance in
QML. The documentation (i even looked at dev snapshot docs) didn't
provide any clue, but the code did. Turns out there is a hidden
property:

drag.threshold (it is underlined in red in QtCreator, but works just fine!).

For font rendering there is the hidden property:

renderType

Which works just fine, but is nowhere to be found in the Qt documentation.

When reading the Qt documentation i would very much like to rely on it
and believe that the doc at the very least specify all exposed
properties. Searching the respective C++ classes in the Qt code to see
if any property is missing is a bit cumbersome to say the least.

So please, document those hidden properties. These are just the ones i
found, but i'm sure there is quite a bit more out there. I know that
both of the above where mentioned that they should be documented
somewhere on the mailing lists or in comments of bug reports (don't
know where though, quite a while ago).

Why are some properties not documented anyway? It should just be
documented if it has a Q_PROPERTY(...) right? Even if there is no
description.

Cheers,
Mark
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development