Use unicode instead of str for convert strings
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 23 Apr 2009 10:29:22 +0000 (10:29 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 23 Apr 2009 10:29:22 +0000 (10:29 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2646 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BFolderPage.py
wizard/BModulePage.py
wizard/BToolchainPage.py
wizard/bertos_utils.py

index 9eda8b717661dacfc915f0aee84f04791b7eea62..dce305e0d2c0127f57ead17829384a07faeb5af0 100644 (file)
@@ -91,14 +91,14 @@ class BFolderPage(BWizardPage):
         """
         Slot called when the project name is changed manually by the user.
         """
-        self._project_name = str(name).replace(" ", "_")
+        self._project_name = unicode(name).replace(" ", "_")
         self.setProjectPath()
     
     def directoryChanged(self, directory):
         """
         Slot called when the project folder is changed manually by the user.
         """
-        self._destination_folder = str(QDir.toNativeSeparators(directory))
+        self._destination_folder = unicode(QDir.toNativeSeparators(directory))
         self.setProjectPath()
 
     def selectDirectory(self):
index 9fbcf01554620df8fbbead350be21f1548feb64c..38bc8a531183b6673ee7457838c9ec9ee63fbc1c 100644 (file)
@@ -189,7 +189,7 @@ class BModulePage(BWizardPage):
         configuration = self.projectInfo("MODULES")[self.currentModule()]["configuration"]
         configurations = self.projectInfo("CONFIGURATIONS")
         if "type" not in configurations[configuration][property]["informations"] or configurations[configuration][property]["informations"]["type"] == "int":
-            configurations[configuration][property]["value"] = str(int(self.pageContent.propertyTable.cellWidget(index, 1).value()))
+            configurations[configuration][property]["value"] = unicode(int(self.pageContent.propertyTable.cellWidget(index, 1).value()))
         elif configurations[configuration][property]["informations"]["type"] == "enum":
             configurations[configuration][property]["value"] = unicode(self.pageContent.propertyTable.cellWidget(index, 1).currentText())
         elif configurations[configuration][property]["informations"]["type"] == "boolean":
index 4f7b4bf83701c022d800de4362c30862677e5087..f85dbb1f30c44b417d01fb7c8b88eda138e65c81 100644 (file)
@@ -251,7 +251,7 @@ class BToolchainPage(BWizardPage):
             self._validation_process.start(filename, ["-v"])
             self._validation_process.waitForStarted(1000)
             if self._validation_process.waitForFinished(200):
-                description = str(self._validation_process.readAllStandardError())
+                description = unicode(self._validation_process.readAllStandardError())
                 info = bertos_utils.getToolchainInfo(description)
                 if len(info) >= 4:
                     valid = True
index 2bc44ab54d0fa385fc55964860925466a97c448f..00b687d788c5510b97b830bfdf6e022faf990e8f 100644 (file)
@@ -228,7 +228,7 @@ def csrcGenerator(project_info):
     cppasrc = " \\\n\t".join(cppasrc) + " \\"
     cxxsrc = " \\\n\t".join(cxxsrc) + " \\"
     asrc = " \\\n\t".join(asrc) + " \\"
-    constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + str(value) for key, value in constants.items()])
+    constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + unicode(value) for key, value in constants.items()])
     return csrc, pcsrc, cppasrc, cxxsrc, asrc, constants
 
 def findModuleFiles(module, project_info):