QT Beautifier plugin With Artistic Style refuses to function 'Error in Beautifier ... "AStyle.exe" terminated with exit code 1'
-
Hello, I'm trying to use the QT Beautifier plugin on Windows 10 with Artistic Style.
I downloaded Artistic style, enabled the Beautifier plugin, set the Beautifier general tool to Artistic Style, set a keyboard short cut and created a custom configuration file.
in tools>options>beautifier>artisticstyle I set the Artistic Style Command to:
C:\PATH_TO_ASTYLE\AStyle\bin\AStyle.exe
I can even go into that directory and type
Astyle.exe --version
and the following will come up:Artistic Style Version 3.0
So I'm not sure what the problem is.
At the time of writing this I found out what the problem was, so I will reply with the solution so others do not have the same issue.
-
The following was my configuration.
--style=allman --indent=spaces=4 --indent-classes --indent-switches --indent-labels --indent-preproc-block --indent-preproc-define --indent-col1-comments --max-continuation-indent --pad-oper --pad-comma --pad-header --align-pointer=type --align-reference=type --break-one-line-headers --add-braces --close-templates --max-code-length=80
At first it may appear as if nothing was wrong, but
--max-continuation-indent
needs to have a value, changing it to--max-continuation-indent=40
worked. It appears that if the Artistic Style style config file does not have proper syntax QT does not notify the user.To debug this I took a command I knew would work and tried it again, it worked fine.