+ current_version = version_page.projectInfo("SOURCES_PATH")
+ if dialog.exec_():
+ version = qvariant_converter.getString(version_page.currentItem().data(Qt.UserRole))
+ if version != current_version:
+ if QMessageBox.question(
+ version_page,
+ self.tr("BeRTOS version update"),
+ self.tr("Changing the BeRTOS version will destroy all the modification done on the BeRTOS sources"),
+ QMessageBox.Ok | QMessageBox.Cancel
+ ) == QMessageBox.Ok:
+ version_page.setProjectInfo("SOURCES_PATH", version)
+ version_page.setProjectInfo("OLD_SOURCES_PATH", current_version)
+ project = version_page.project()
+ modules, lists, configurations, files = project.info("MODULES"), project.info("LISTS"), project.info("CONFIGURATIONS"), project.info("FILES")
+ bertos_utils.loadSourceTree(version_page.project())
+ bertos_utils.loadModuleData(version_page.project(), True)
+ modules_, lists_, configurations_, files_ = project.info("MODULES"), project.info("LISTS"), project.info("CONFIGURATIONS"), project.info("FILES")
+ self.module_page.fillModuleTree()
+ print modules == modules_, lists == lists_, configurations == configurations_, files == files_