[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdevelop/3.4/parts/astyle
From:       Ian Reinhart Geiser <geiseri () kde ! org>
Date:       2006-07-19 17:03:54
Message-ID: 1153328634.006589.31101.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 564256 by geiseri:

apply the patches from branch here.  still not sure what i am doing

 M  +3 -3      astyle_adaptor.cpp  
 M  +18 -1     astyle_widget.cpp  


--- branches/kdevelop/3.4/parts/astyle/astyle_adaptor.cpp #564255:564256
@@ -90,11 +90,11 @@
 
   // padding
   setOperatorPaddingMode(config->readBoolEntry("PadOperators", false));
-  setParenthesisPaddingMode(config->readBoolEntry("PadOperators", false));
+  setParenthesisPaddingMode(config->readBoolEntry("PadParentheses", false));
 
   // oneliner
-  setBreakOneLineBlocksMode(config->readBoolEntry("KeepBlocks", false));
-  setSingleStatementsMode(config->readBoolEntry("KeepStatements", false));
+  setBreakOneLineBlocksMode(!config->readBoolEntry("KeepBlocks", false));
+  setSingleStatementsMode(!config->readBoolEntry("KeepStatements", false));
 }
 
 KDevFormatter::KDevFormatter( AStyleWidget * widget )
--- branches/kdevelop/3.4/parts/astyle/astyle_widget.cpp #564255:564256
@@ -138,7 +138,24 @@
 
 void AStyleWidget::styleChanged( int id )
 {
-	QString sample = "namespace foospace { class Bar { public: int foo(); private: int \
m_foo; }; int Bar::foo() { switch (x) { case 1: break; default: break; } if (isBar) { \
bar(); return m_foo+1; } else return 0; } }"; +	QString sample = "namespace foospace \
{\n" +		"class Bar {\n"
+		"public:\n"
+		"int foo();\n"
+		"private:\n"
+		"int m_foo;\n"
+		"};\n"
+		"int Bar::foo() {\n"
+		"switch (x) {\n"
+		"case 1:\n"
+		"break;\n"
+		"default:\n"
+		"break;\n"
+		"} if (isBar) {\n"
+		"bar();\n"
+		"return m_foo+1;\n"
+		"} else return 0; \n"
+		"}\n }\n";
 
 	ConfigTabs->setTabEnabled(tab_2, id == 0);
 	ConfigTabs->setTabEnabled(tab_3, id == 0);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic