[Qt-creator] Is it possible to run some commands or scripts on saving the documents?

Tobias Hunger tobias.hunger at gmail.com
Wed Sep 9 16:11:56 CEST 2015


On Wed, Sep 9, 2015 at 4:00 PM, Hualet Wang <mr.asianwang at gmail.com> wrote:
> 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?

Why would you want to do that?

There are *lots* of document updates and slowing each and every one of
those down with the beautifier.

What keeps you from changing the indenter with the functionality you
are missing? Then you would only insert "beautiful" lines and would
not need the beautifier plugin at all:-)

Best Regards,
Tobias



More information about the Qt-creator mailing list