Hi Lorenz,

I occasionally found below lines in source code of todo plugin,
> 
>     CppTools::CppModelManager *modelManager 
> =CppTools::CppModelManager::instance();
> 
>     connect(modelManager, &CppTools::CppModelManager::documentUpdated,
>             this, &CppTodoItemsScanner::documentUpdated, 
> Qt::DirectConnection);

I’m pretty excited about that finding, maybe you can use the APIs in that 
snippet to run
Beautifier on the document every time the document get updated?

> 在 2015年8月28日,下午5:00,Lorenz Haas <[email protected]> 写道:
> 
> Hi Hualet,
> 
> I have that on my to do list. Unfortunately this requires some more
> changes to the (global) save mechanism. So, I am sorry, it's not
> possible right now with the Beautifier Plug-in.
> 
> The last days I got aware of the "close Qt Creator hook" where plugins
> can interrupt and stop the close event. I was thinking of a similar hook
> for saving a file. But it's in a early brainstorming stage and I first
> have to ask the core developer if that would be principally okay? Is it? :)
> 
> Best,
> Lorenz
> 
> 
> 
> Am 28.08.2015 um 09:52 schrieb Hualet Wang:
>> I found the useful beautifier plugin yesterday, but what I want is to
>> run astyle every time I save the document. so, any ideas?
>> 
>> -- 
>> -- Hualet
>> 
>> 
>> _______________________________________________
>> Qt-creator mailing list
>> [email protected]
>> http://lists.qt-project.org/mailman/listinfo/qt-creator
>> 

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to