The report name is a report variable so move it into into ReportVars.
Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all
Unified · Split
| @@ -1402,7 +1402,8 @@ class BranchModel(TreeModel): · 1401 unmodified lines | ||
| 1402 | 1402 | |
| 1403 | 1403 | class ReportVars(): |
| 1404 | 1404 | |
| 1405 | − def __init__(self, where_clause = ""): | |
| 1405 | + def __init__(self, name = "", where_clause = ""): | |
| 1406 | + self.name = name | |
| 1406 | 1407 | self.where_clause = where_clause |
| 1407 | 1408 | |
| 1408 | 1409 | def UniqueId(self): |
| @@ -1412,7 +1413,7 @@ class ReportVars(): · 3 unmodified lines | ||
| 1412 | 1413 | |
| 1413 | 1414 | class BranchWindow(QMdiSubWindow): |
| 1414 | 1415 | |
| 1415 | − def __init__(self, glb, event_id, name, report_vars, parent=None): | |
| 1416 | + def __init__(self, glb, event_id, report_vars, parent=None): | |
| 1416 | 1417 | super(BranchWindow, self).__init__(parent) |
| 1417 | 1418 | |
| 1418 | 1419 | model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId() |
| @@ -1435,7 +1436,7 @@ class BranchWindow(QMdiSubWindow): · 16 unmodified lines | ||
| 1435 | 1436 | |
| 1436 | 1437 | self.setWidget(self.vbox.Widget()) |
| 1437 | 1438 | |
| 1438 | − AddSubWindow(glb.mainwindow.mdi_area, self, name + " Branch Events") | |
| 1439 | + AddSubWindow(glb.mainwindow.mdi_area, self, report_vars.name + " Branch Events") | |
| 1439 | 1440 | |
| 1440 | 1441 | def ResizeColumnToContents(self, column, n): |
| 1441 | 1442 | # Using the view's resizeColumnToContents() here is extrememly slow |
| @@ -1710,7 +1711,6 @@ class ReportDialogBase(QDialog): · 268 unmodified lines | ||
| 1710 | 1711 | |
| 1711 | 1712 | self.glb = glb |
| 1712 | 1713 | |
| 1713 | − self.name = "" | |
| 1714 | 1714 | self.report_vars = ReportVars() |
| 1715 | 1715 | |
| 1716 | 1716 | self.setWindowTitle(title) |
| @@ -1751,8 +1751,8 @@ class ReportDialogBase(QDialog): · 34 unmodified lines | ||
| 1751 | 1751 | |
| 1752 | 1752 | def Ok(self): |
| 1753 | 1753 | vars = self.report_vars |
| 1754 | − self.name = self.data_items[0].value | |
| 1755 | − if not self.name: | |
| 1754 | + vars.name = self.data_items[0].value | |
| 1755 | + if not vars.name: | |
| 1756 | 1756 | self.ShowMessage("Report name is required") |
| 1757 | 1757 | return |
| 1758 | 1758 | for d in self.data_items: |
| @@ -2392,13 +2392,13 @@ class MainWindow(QMainWindow): · 633 unmodified lines | ||
| 2392 | 2392 | CallGraphWindow(self.glb, self) |
| 2393 | 2393 | |
| 2394 | 2394 | def NewBranchView(self, event_id): |
| 2395 | − BranchWindow(self.glb, event_id, "", ReportVars(), self) | |
| 2395 | + BranchWindow(self.glb, event_id, ReportVars(), self) | |
| 2396 | 2396 | |
| 2397 | 2397 | def NewSelectedBranchView(self, event_id): |
| 2398 | 2398 | dialog = SelectedBranchDialog(self.glb, self) |
| 2399 | 2399 | ret = dialog.exec_() |
| 2400 | 2400 | if ret: |
| 2401 | − BranchWindow(self.glb, event_id, dialog.name, dialog.report_vars, self) | |
| 2401 | + BranchWindow(self.glb, event_id, dialog.report_vars, self) | |
| 2402 | 2402 | |
| 2403 | 2403 | def NewTableView(self, table_name): |
| 2404 | 2404 | TableWindow(self.glb, table_name, self) |