Modify the comments
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 9 Apr 2009 13:51:43 +0000 (13:51 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 9 Apr 2009 13:51:43 +0000 (13:51 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2473 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BModulePage.py
wizard/BToolchainPage.py
wizard/BVersionPage.py
wizard/bertos.py
wizard/bertos_utils.py

index 4c681f8549854d8691028e080dcfa128a8650e96..7c8472c3b5f83cc8236e80418667c1cab061a7ae 100644 (file)
@@ -89,10 +89,10 @@ class BModulePage(BWizardPage):
                 index = 0
                 for i, property in param_list:
                     if "type" in configurations[property]["informations"] and configurations[property]["informations"]["type"] == "autoenabled":
-                        ## Doesn't show the hidden fields
+                        # Doesn't show the hidden fields
                         pass
                     else:
-                        ## Set the row count to the current index + 1
+                        # Set the row count to the current index + 1
                         self.pageContent.propertyTable.setRowCount(index + 1)
                         item = QTableWidgetItem(configurations[property]["brief"])
                         item.setData(Qt.UserRole, qvariant_converter.convertString(property))
@@ -160,7 +160,7 @@ class BModulePage(BWizardPage):
         """
         Loads the module data.
         """
-        ## Load the module data only if it isn't already loaded
+        # Load the module data only if it isn't already loaded
         if self.projectInfo("MODULES") == None \
                 and self.projectInfo("LISTS") == None \
                 and self.projectInfo("CONFIGURATIONS") == None:
@@ -233,7 +233,7 @@ class BModulePage(BWizardPage):
         Inserts in the table at index a spinbox for an int, a long or an unsigned
         long property setted to value.
         """
-        ## int, long or undefined type property
+        # int, long or undefined type property
         spin_box = None
         if bertos_utils.isLong(informations) or bertos_utils.isUnsignedLong(informations):
             spin_box = QDoubleSpinBox()
index 1820768aaf0c27f034e86d2849932e93ff784086..8988ed5741b3a87194ca5045bd075c59346aa5dd 100644 (file)
@@ -200,14 +200,14 @@ class BToolchainPage(BWizardPage):
         filename = qvariant_converter.getStringDict(self.pageContent.toolchainList.item(i).data(Qt.UserRole))["path"]
         valid = False
         info = {}
-        ## Check for the other tools of the toolchain
+        # Check for the other tools of the toolchain
         for tool in TOOLCHAIN_ITEMS:
             if os.path.exists(filename.replace("gcc", tool)):
                 valid = True
             else:
                 valid = False
                 break
-        ## Try to retrieve the informations about the toolchain only for the valid toolchains
+        # Try to retrieve the informations about the toolchain only for the valid toolchains
         if valid:
             self._validation_process = QProcess()
             self._validation_process.start(filename, ["-v"])
@@ -219,7 +219,7 @@ class BToolchainPage(BWizardPage):
                     valid = True
             else:
                 self._validation_process.kill()
-        ## Add the item in the list with the appropriate associate data.
+        # Add the item in the list with the appropriate associate data.
         if valid:
             self._validItem(i, info)
         else:
index e4cb8d2ca90a2b52779ba56f3c0ebca2d04bc10f..6a7fbf6309a92956eebf9429a61c45b7543b1e04 100644 (file)
@@ -36,7 +36,7 @@ class BVersionPage(BWizardPage):
         """
         if self.pageContent.versionList.currentRow() != -1:
             sources_path = qvariant_converter.getString(self.pageContent.versionList.currentItem().data(Qt.UserRole))
-            ## Remove the trailing slash
+            # Remove the trailing slash
             if sources_path.endswith(os.sep):
                 sources_path = sources_path[:-1]
             self.setProjectInfo("SOURCES_PATH", sources_path)
index a8d4665091269c92ac7285def2e4e2eac687aa38..87b08237fa02e43ddad363b4eb0a1fc88644c422 100755 (executable)
@@ -55,7 +55,7 @@ def main():
     app = QApplication(sys.argv)
     app.settings = QSettings("Develer", "Bertos Configurator")
     app.project = BProject.BProject()
-    ## Development utility lines, to be removed for production
+    # Development utility lines, to be removed for production
     if newer("bertos.qrc", "bertos.rcc"):
         os.system("rcc -binary bertos.qrc -o bertos.rcc")
     QResource.registerResource("bertos.rcc")
@@ -64,7 +64,7 @@ def main():
     elif "--edit" in sys.argv and "--create" not in sys.argv:
         editProject()
     elif "--create" in sys.argv and "--edit" in sys.argv:
-        ## TODO: need an explaining message
+        # TODO need an explaining message
         print " ".join(sys.argv)
         print "Invalid usage!"
         pass
index 1b8715ffe9efe6ac04107eac51e872c5b9526524..f4547f1f7245942472523ad108783261eccd144e 100644 (file)
@@ -34,22 +34,22 @@ def createBertosProject(project_info):
     f = open(directory + "/project.bertos", "w")
     f.write(pickle.dumps(project_info))
     f.close()
-    ## Destination source dir
+    # Destination source dir
     srcdir = directory + "/bertos"
     shutil.rmtree(srcdir, True)
     shutil.copytree(sources_dir + "/bertos", srcdir)
-    ## Destination makefile
+    # Destination makefile
     makefile = directory + "/Makefile"
     if os.path.exists(makefile):
         os.remove(makefile)
     makefile = open("mktemplates/Makefile").read()
     makefile = makefileGenerator(project_info, makefile)
     open(directory + "/Makefile", "w").write(makefile)
-    ## Destination project dir
+    # Destination project dir
     prjdir = directory + "/" + os.path.basename(directory)
     shutil.rmtree(prjdir, True)
     os.mkdir(prjdir)
-    ## Destination configurations files
+    # Destination configurations files
     cfgdir = prjdir + "/cfg"
     shutil.rmtree(cfgdir, True)
     os.mkdir(cfgdir)
@@ -68,14 +68,14 @@ def createBertosProject(project_info):
         f = open(cfgdir + "/" + os.path.basename(configuration), "w")
         f.write(string)
         f.close()
-    ## Destinatio mk file
+    # Destinatio mk file
     makefile = open("mktemplates/template.mk", "r").read()
     makefile = mkGenerator(project_info, makefile)
     open(prjdir + "/" + os.path.basename(prjdir) + ".mk", "w").write(makefile)
-    ## Destination main.c file
+    # Destination main.c file
     main = open("srctemplates/main.c", "r").read()
     open(prjdir + "/main.c", "w").write(main)
-    ## Codelite project files
+    # Codelite project files
     if "codelite" in project_info.info("OUTPUT"):
         codelite_project.createProject(project_info)
 
@@ -102,7 +102,7 @@ def makefileGenerator(project_info, makefile):
     """
     Generate the Makefile for the current project.
     """
-    # TODO: write a general function that works for both the mk file and the Makefile
+    # TODO write a general function that works for both the mk file and the Makefile
     while makefile.find("project_name") != -1:
         makefile = makefile.replace("project_name", os.path.basename(project_info.info("PROJECT_PATH")))
     return makefile
@@ -114,18 +114,18 @@ def csrcGenerator(project_info):
         harvard = True
     else:
         harvard = False
-    ## file to be included in CSRC variable
+    # file to be included in CSRC variable
     csrc = []
-    ## file to be included in PCSRC variable
+    # file to be included in PCSRC variable
     pcsrc = []
-    ## files to be included in CPPASRC variable
+    # files to be included in CPPASRC variable
     asrc = []
-    ## constants to be included at the beginning of the makefile
+    # constants to be included at the beginning of the makefile
     constants = {}
     for module, information in modules.items():
         module_files = set([])
         dependency_files = set([])
-        ## assembly sources
+        # assembly sources
         asm_files = set([])
         if information["enabled"]:
             if "constants" in information:
@@ -154,22 +154,22 @@ def csrcGenerator(project_info):
     return csrc, pcsrc, asrc, constants
     
 def findModuleFiles(module, project_info):
-    ## Find the files related to the selected module
+    # Find the files related to the selected module
     cfiles = []
     sfiles = []
-    ## .c files related to the module and the cpu architecture
+    # .c files related to the module and the cpu architecture
     for filename, path in findDefinitions(module + ".c", project_info) + \
             findDefinitions(module + "_" + project_info.info("CPU_INFOS")["TOOLCHAIN"] + ".c", project_info):
         path = path.replace(project_info.info("SOURCES_PATH") + "/", "")
         cfiles.append(path + "/" + filename)
-    ## .s files related to the module and the cpu architecture
+    # .s files related to the module and the cpu architecture
     for filename, path in findDefinitions(module + ".s", project_info) + \
             findDefinitions(module + "_" + project_info.info("CPU_INFOS")["TOOLCHAIN"] + ".s", project_info) + \
             findDefinitions(module + ".S", project_info) + \
             findDefinitions(module + "_" + project_info.info("CPU_INFOS")["TOOLCHAIN"] + ".S", project_info):
         path = path.replace(project_info.info("SOURCES_PATH") + "/", "")
         sfiles.append(path + "/" + filename)
-    ## .c and .s files related to the module and the cpu tags
+    # .c and .s files related to the module and the cpu tags
     for tag in project_info.info("CPU_INFOS")["CPU_TAGS"]:
         for filename, path in findDefinitions(module + "_" + tag + ".c", project_info):
             path = path.replace(project_info.info("SOURCES_PATH") + "/", "")