Version: 3.4.0 (using KDE 3.5.6 "release 19.1" , openSUSE ) Compiler: Target: i586-suse-linux OS: Linux (i686) release 2.6.16.27-0.6-smp hello, I configured code formatting either as JAVA (predefined) or UserDefined with Brackets->Attach. But both formattings always result in function() { } instead of function(){ } ...wohooo way more lines of code just by re-formatting the source ;-) Thanks for fixing this. Andreas
I can't reproduce this here. After setting the options you need to use Reformat Sources. It doesn't work while typing, thats kate's part.
I have problems with brackets and code formatting, too (KDevelop 3.4.0 on Gentoo). This is how I want it to be: void foo() { } This is the result for most functions (some functions are formatted as expected): void foo() { } These are the astyle settings from my kdeveloprc: [AStyle] Extensions=*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm Fill=Tabs IndentLabels=false IndentNamespaces=false IndentSwitches=true Options=BlockBreak=0,BlockBreakAll=0,BlockIfElse=0,Brackets=Break,BracketsCloseHeaders=0,FStyle=UserDefined,Fill=Tabs,FillCount=4,FillEmptyLines=0,FillForce=1,IndentBlocks=0,IndentBrackets=0,IndentCases=0,IndentClasses=0,IndentLabels=0,IndentNamespaces=0,IndentPreprocessors=0,IndentSwitches=0,KeepBlocks=0,KeepStatements=0,MaxStatement=40,MinConditional=-1,PadOperators=1,PadParenthesesIn=0,PadParenthesesOut=0,PadParenthesesUn=0,
I still can't reproduce this problem with those settings. Could either of you please poste a source file where the problem occurs?
Created attachment 19896 [details] Some source where the problem occurs Ok, here some code where the problem occurs. Code formatting results in: Font::Font(const QString& fontString) { setFont(fontString); } Font::Font(const QDomElement& xfontElem) { setFont(xfontElem); }
Sorry, I still can't reproduce the problem.
Same bug here (newest svn version). Additionally astyle ignores other settings (for instance it adds spaces around parenthesis although the option isn't ticked). Similar to bug 137913 and 105396. It worked with version 3.3.93, but if I start now the old version, it doesn't work anymore. So it has something to do with configuration files..
Hm, or with another astyle bug (see bug 138699)
Note that the astyle settings are available under Configure KDevelop and Project Options. The Project Options have precedence.
Yeah, I've noticed that right now. It works here. But a note etc in the global options would be appropriate..
Thats unfortunately not possible anymore for KDevelop3, no user-visible-string changes are allowed. The bug is not reproduceable with 3.4.1 and we had an astyle update since 3.4.0, so I'm closing it.