Bug 78020 - Build system logic could be separated a bit more
Summary: Build system logic could be separated a bit more
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: All build tools (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-19 18:44 UTC by Kuba Ober
Modified: 2006-06-30 17:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kuba Ober 2004-03-19 18:44:17 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    RedHat RPMs

I guess it could be helpful in the long run to separate three things under the current "build system" umbrella:

1. configuration management

2. makefile generation

3. make tool

It's e.g. completely possible to use autoconf as (1), do (2) by hand and use cook as (3).

In case of make, (3) is just make, but (2) could be either qmake or automake (or just plain hand-written). 

And so on.

This is nothing that could be done overnight I'm sure, but I guess some discussion is needed as I believe such a separation would reduce redundant work in maintaining different build systems, as well as make kdevelop more expandable. Myself, for example I'm slowly migrating from qmake/make to cook. There are others who use cook as well, and there are some other build tools out there too. And so on.

Rants/reasonable flames (tm) more than welcome :)

Cheers, Kuba Ober
Comment 1 geiseri 2006-06-30 17:23:33 UTC
SVN commit 556535 by geiseri:

Fixed astyle adaptor is using "PadOperators" option for padding both 
operators and parenthesis.
Bug# 121106

Fixed keep one-line blocks option does nothing.
Bug# 105396

Fixed custom style preview.  This was closed, but it was not working 
right, the preview would always be wrong.
Bug# 70818

BUG: 121106
BUG: 105396
BUG: 78020



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


--- tags/kdevelop/3.3.91/parts/astyle/astyle_adaptor.cpp #556534:556535
@@ -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 )
--- tags/kdevelop/3.3.91/parts/astyle/astyle_widget.cpp #556534:556535
@@ -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);