qtecomplugins/supplements/xqecom/xqecom.py
changeset 14 6fbed849b4f4
parent 8 71781823f776
--- a/qtecomplugins/supplements/xqecom/xqecom.py	Fri Jun 11 14:26:25 2010 +0300
+++ b/qtecomplugins/supplements/xqecom/xqecom.py	Wed Jun 23 19:08:38 2010 +0300
@@ -36,11 +36,12 @@
 	def strip(self, s):
 		l = len(s) - len(s.lstrip())
 		def stripOrNot(x):
+			x = x + '\n'
 			if l>=len(x):
 				return x
 			else:
 				return x[l:]
-		return ''.join(map(stripOrNot, s.splitlines(True)))
+		return ''.join(map(stripOrNot, s.splitlines(False)))
 		
 class RssGenerator(Generator):
 	"""
@@ -103,8 +104,7 @@
 					};
 				}
 			};
-		} 		
-		"""
+		}"""
 		
 		output.write(self.strip(header) % self.args )
 		
@@ -116,7 +116,7 @@
 	def __init__(self, args):
 		super(self.__class__, self).__init__(args)
 	def generate(self):
-		content="""\
+		content='''\
 		// ============================================================================
 		// Generated by xqecom on %(timestamp)s
 		// This file is generated by xqecom and should not be modified by the user.
@@ -143,8 +143,7 @@
 
 		;files
 		"\\epoc32\\release\\armv5\\urel\\%(target)s.dll"    - "!:\\sys\\bin\\%(target)s.dll"
-		"\\epoc32\\data\\Z\\resource\\plugins\\%(target)s.rsc" - "!:\\resource\\plugins\\%(target)s.rsc" 		
-		"""
+		"\\epoc32\\data\\Z\\resource\\plugins\\%(target)s.rsc" - "!:\\resource\\plugins\\%(target)s.rsc"'''
 		
 		fileName = self.args['target'] + ".pkg"
 		output = file(fileName, "w")
@@ -172,8 +171,7 @@
 
 		ECOM_PLUGIN( %(target)s.dll, %(target)s.rsc )
 
-		#endif //%(TARGET)s_IBY 		
-		"""
+		#endif //%(TARGET)s_IBY"""
 		
 		fileName = self.args['target'] + ".iby"
 		output = file(fileName, "w")
@@ -195,8 +193,7 @@
 		#ifndef ECOMSTUB_%(uid3)s_HRH
 		#define ECOMSTUB_%(uid3)s_HRH
 		#define KQtEcomPluginImplementationUid %(uid3)s
-		#endif //ECOMSTUB_%(uid3)s_HRH 
-		"""
+		#endif //ECOMSTUB_%(uid3)s_HRH"""
 
 		fileName = "ecomstub_" + self.args['uid3'] + ".hrh"
 		output = file(fileName, "w")
@@ -221,8 +218,7 @@
 			{
 			aTableCount = sizeof( implementationTable ) / sizeof( TImplementationProxy );
 			return implementationTable;
-			} 
-		"""		
+			}"""
 
 		fileName = "ecomstub_" + self.args['uid3'] + ".cpp"
 		output = file(fileName, "w")