[Qt-creator] My small wish-list

Ch'Gans chgans at gna.org
Sat Feb 25 00:04:13 CET 2017


On 25 February 2017 at 01:11, Nikolai Kosjar <nikolai.kosjar at qt.io> wrote:
> Hi!
>
> Some of these are addressed now (see below). For the others, please create
> reports/suggestions.
>
> On 02/24/2017 06:52 AM, Ch'Gans wrote:
>>
>> * From the context menu on a 'Q_PROPERTY' macro, entry 'Generate
>> missing Q_PROPERTY members...'
>>  - use emit (memberValue) instead of emit (parameterValue):
>>    sometimes the member value will be different from the parameter
>> value, it is then easy to forget to replace the generated 'emit
>> (parameterValue);' with 'emit (memberValue);', for the case where the
>> code stays as-is, emit (memberValue) is synonym for emit
>> (parameterValue):, so no regression here
>
>
> https://codereview.qt-project.org/#/c/186638/

Seeing this code change, and after a quick scan at cppquickfixes.cpp,
it seems to me quite easy to implement the use a qFuzzyCompare for
floating point properties, by simply adding a "bool
isFuzzyComparable(const QString &typeName):" into the anonymous NS,
and use it in "InsertQtPropertyMembersOp::perform".

See https://codereview.qt-project.org/#/c/186710/

Unfortunately, i couldn't test it, as QtCreator seems broken (at least
for me), I get this sort of messages when running QtC:
"QTextCursor::setPosition: Position '1115' out of range" and
QtPropertyDeclarationAST::type_id is an empty string, all my generated
Q_PROPERTY members have an empty string in place of the property type
name and the property name, eg.:
"m_;"
" foo() const"

Thanks,
Chris

>
>>  - very minor: the sub-menu entry ends with '...' which traditionally
>> means that a pop-up dialog will show up, which is not the case.
>
>
> https://codereview.qt-project.org/#/c/186634/
>
>> From the context menu on a the name of a class declaration:
>>  - It would be nice to add an entry 'Generate all missing Q_PROPERTY
>> members', which as you bet is the same as above but applied to all
>> Q_PROPERTY.
>
>
> That's https://codereview.qt-project.org/#/c/171969/ , except that it will
> be triggerable on the class name.
>
> Nikolai
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator



More information about the Qt-creator mailing list