[Qt-creator] Is it possible to run some commands or scripts on saving the documents?
André Hartmann
andre.hartmann at iseg-hv.de
Wed Sep 9 16:35:41 CEST 2015
Hi all,
there is already code under review to "beautify" on each save:
https://codereview.qt-project.org/#/c/124941/
So suggestions and comments can also be placed there to continue the
review process and get the patch accepted.
Best regards,
Andre
Am 09.09.2015 um 16:11 schrieb Tobias Hunger:
> 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
> _______________________________________________
> 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