Use self.project() as readonly property
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Apr 2010 13:05:46 +0000 (13:05 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Apr 2010 13:05:46 +0000 (13:05 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3457 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py
wizard/BFinalPage.py
wizard/BModulePage.py
wizard/BWizardPage.py

index 49daf8c98df294e023bdd44897b446d602cf692e..4803d6c6c9e153600513ba89e0eacb8c3c724d6f 100644 (file)
@@ -112,7 +112,7 @@ class BCpuPage(BWizardPage):
         """
         try:
             QApplication.instance().setOverrideCursor(Qt.WaitCursor)
-            self.project().loadSourceTree()
+            self.project.loadSourceTree()
             self.populateCpuList()
             cpu_name = self.projectInfo("CPU_NAME")
             selected_freq = self.projectInfo("SELECTED_FREQ")
@@ -161,7 +161,7 @@ class BCpuPage(BWizardPage):
         """
         self.pageContent.cpuList.clear()
         self.pageContent.cpuList.setCurrentItem(None)
-        infos = self.project().loadCpuInfos()
+        infos = self.project.loadCpuInfos()
         tag_list = bertos_utils.getTagSet(infos)
         # Create, fill and store the dict with the tags
         tag_dict = {}
index f5d353edfd4e200f90c6bc84afb3028860a35281..ec767a70f227f1c6de888d81293234df583c7fc8 100644 (file)
@@ -59,7 +59,7 @@ class BFinalPage(BWizardPage):
         """
         try:
             QApplication.instance().setOverrideCursor(Qt.WaitCursor)
-            bertos_utils.createBertosProject(self.project())
+            bertos_utils.createBertosProject(self.project)
         finally:
             QApplication.instance().restoreOverrideCursor()
         self._plugin_dict = {}
index ccaf621c4f53e12ecddce7b162165875c1f719a4..9c13a2cc01402688b69ba71b70faef78d1d1f27e 100644 (file)
@@ -110,7 +110,7 @@ class BModulePage(BWizardPage):
         module = self.currentModule()
         if module:
             try:
-                supported = bertos_utils.isSupported(self.project(), module=module)
+                supported = bertos_utils.isSupported(self.project, module=module)
             except SupportedException, e:
                 self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(module))
                 supported = True
@@ -137,7 +137,7 @@ class BModulePage(BWizardPage):
                         # Doesn't show the hidden fields
                         continue
                     try:
-                        param_supported = bertos_utils.isSupported(self.project(), property_id=(configuration, property))
+                        param_supported = bertos_utils.isSupported(self.project, property_id=(configuration, property))
                     except SupportedException, e:
                         self.exceptionOccurred(self.tr("Error evaluating \"%1\" for parameter %2").arg(e.support_string).arg(property))
                         param_supported = True
@@ -224,7 +224,7 @@ class BModulePage(BWizardPage):
                 and not self.projectInfo("LISTS") \
                 and not self.projectInfo("CONFIGURATIONS"):
             try:
-                self.project().loadModuleData()
+                self.project.loadModuleData()
             except ModuleDefineException, e:
                 self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line))
             except EnumDefineException, e:
@@ -251,7 +251,7 @@ class BModulePage(BWizardPage):
                 enabled = modules[module]["enabled"]
                 module_item = QTreeWidgetItem(item, QStringList([module]))
                 try:
-                    supported = bertos_utils.isSupported(self.project(), module=module)
+                    supported = bertos_utils.isSupported(self.project, module=module)
                 except SupportedException, e:
                     self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(module))
                     supported = True
index 5c4b4bb9650f42d4dd1da35376d26bf7625c03c8..b7ffe1f51e96a2fb76e431935cc806973c20a8b2 100644 (file)
@@ -85,6 +85,7 @@ class BWizardPage(QWizardPage):
         """
         return QApplication.instance().project.info(key)
     
+    @property
     def project(self):
         """
         Returns the BProject instance.
@@ -207,4 +208,4 @@ class BWizardPage(QWizardPage):
         """
         pass
     
-    ####
\ No newline at end of file
+    ####