Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Andrey Kozhevnikov

writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch wrote:

Hi All

My app exposes chunks of functionality to the QML side from C++ 
declarative plugins.


On the QML side QtCreator gives me automatic code completion for 
elements exposed from such plugins, suggesting property and method names.


So far so good.

The trouble is, I often refactor the C++ code as I add complexity e.g. 
renaming properties and methods as better names occur to me, or 
reflect a change in purpose.


The trouble is, back on the QML side, QtCreator code-completion still 
suggests the original names long after these have been renamed or 
eliminated.


Is there any way to flush / update the code completion so it 
reflects the current state of affairs? Cleaning does not help, nor 
does Reset Code Model.


mfg

Chris


___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Gabriel Böhme
Would also be a good feature, to have the Refactoring function for QML in
QtCreator - if you want to change id/property/... names. Is it possible?!


Cheers, Gabriel.



--



Von meinem Nokia N9 gesendet



Andrey Kozhevnikov schrieb am 26.01.14 17:25:
writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch wrote:

 Hi All

 My app exposes chunks of functionality to the QML side from C++
 declarative plugins.

 On the QML side QtCreator gives me automatic code completion for elements
 exposed from such plugins, suggesting property and method names.

 So far so good.

 The trouble is, I often refactor the C++ code as I add complexity e.g.
 renaming properties and methods as better names occur to me, or reflect a
 change in purpose.

 The trouble is, back on the QML side, QtCreator code-completion still
 suggests the original names long after these have been renamed or
 eliminated.

 Is there any way to flush / update the code completion so it reflects
 the current state of affairs? Cleaning does not help, nor does Reset Code
 Model.

 mfg

 Chris


 ___
 SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread Andrey Kozhevnikov
i think you need to post your suggestions according QtCreator to Digia, 
not Jolla ;)


On 27.01.2014 00:36, Gabriel Böhme wrote:


Would also be a good feature, to have the Refactoring function for QML 
in QtCreator - if you want to change id/property/... names. Is it 
possible?!



Cheers, Gabriel.

--

Von meinem Nokia N9 gesendet


Andrey Kozhevnikov schrieb am 26.01.14 17:25:

writing qmltypes file can help you :)

On 26.01.2014 22:23, christopher.l...@thurweb.ch 
mailto:christopher.l...@thurweb.ch wrote:


Hi All

My app exposes chunks of functionality to the QML side from C++
declarative plugins.

On the QML side QtCreator gives me automatic code completion for
elements exposed from such plugins, suggesting property and method
names.

So far so good.

The trouble is, I often refactor the C++ code as I add complexity
e.g. renaming properties and methods as better names occur to me,
or reflect a change in purpose.

The trouble is, back on the QML side, QtCreator code-completion
still suggests the original names long after these have been
renamed or eliminated.

Is there any way to flush / update the code completion so it
reflects the current state of affairs? Cleaning does not help, nor
does Reset Code Model.

mfg

Chris


___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hoi Sven

thanks.

The problem (and it is a small one only) is limited to the  
auto-completion. Code builds perfectly well enough.


QtCreator's clean function wipes out the moc files, but seems to have  
no effect on auto-complete.


grüsse

Chris

Zitat von Sven Putze sailfish...@hardcodes.de:


Hi,

try to build/run qmake from the menu and if that does not help,  
throw away the Makefile. The property binding depends on the Qt meta  
system, bound to the Q_OBJECT macro. Often recompiling does not  
start the needed steps to recreate the moc files and things get  
strange.


BR.
Sven



The trouble is, I often refactor the C++ code as I add complexity  
e.g. renaming properties and methods as better names occur to me,  
or reflect a change in purpose.


The trouble is, back on the QML side, QtCreator code-completion  
still suggests the original names long after these have been  
renamed or eliminated.


Is there any way to flush / update the code completion so it  
reflects the current state of affairs? Cleaning does not help, nor  
does Reset Code Model.




___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread David Greaves
On 26/01/14 16:23, christopher.l...@thurweb.ch wrote:
 Hi All
 
 My app exposes chunks of functionality to the QML side from C++ declarative
 plugins.
 
 On the QML side QtCreator gives me automatic code completion for elements
 exposed from such plugins, suggesting property and method names.
 
 So far so good.
 
 The trouble is, I often refactor the C++ code as I add complexity e.g. 
 renaming
 properties and methods as better names occur to me, or reflect a change in 
 purpose.
 
 The trouble is, back on the QML side, QtCreator code-completion still suggests
 the original names long after these have been renamed or eliminated.
 
 Is there any way to flush / update the code completion so it reflects the
 current state of affairs? Cleaning does not help, nor does Reset Code Model.

Just guessing but this ^^ option is under Tools = QML/JS ... have you tried
Tools = C++ = Update Code Model

David

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Qt Creator Code AutoCompletion in QML for C++ declarative plugins

2014-01-26 Thread christopher . lamb

Hi David

Thanks, your guess is correct. I had not seen the option under Tools / C++.

Unfortunately it does not help either.

During breakfast I have found a solution: closing all projects and  
QtCreator, then reopening gives autocompletion with the correct  
updated properties / method names.


Chris

Zitat von David Greaves david.grea...@jolla.com:


On 26/01/14 16:23, christopher.l...@thurweb.ch wrote:

Hi All

My app exposes chunks of functionality to the QML side from C++ declarative
plugins.

On the QML side QtCreator gives me automatic code completion for elements
exposed from such plugins, suggesting property and method names.

So far so good.

The trouble is, I often refactor the C++ code as I add complexity  
e.g. renaming
properties and methods as better names occur to me, or reflect a  
change in purpose.


The trouble is, back on the QML side, QtCreator code-completion  
still suggests

the original names long after these have been renamed or eliminated.

Is there any way to flush / update the code completion so it reflects the
current state of affairs? Cleaning does not help, nor does Reset  
Code Model.


Just guessing but this ^^ option is under Tools = QML/JS ... have you tried
Tools = C++ = Update Code Model

David






___
SailfishOS.org Devel mailing list