History

perf scripts python: exported-sql-viewer.py: Move report name into ReportVars

The report name is a report variable so move it into into ReportVars.

Adrian Hunter committed 7 years ago

Commit 947cc381 parent 0bf09471 file · +8 −8Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/exported-sql-viewer.py+8−8
@@ -1402,7 +1402,8 @@ class BranchModel(TreeModel): · 1401 unmodified lines
1402 1402
1403class ReportVars():1403class ReportVars():
1404 1404
1405 def __init__(self, where_clause = ""):1405 def __init__(self, name = "", where_clause = ""):
1406 self.name = name
1406 self.where_clause = where_clause1407 self.where_clause = where_clause
1407 1408
1408 def UniqueId(self):1409 def UniqueId(self):
@@ -1412,7 +1413,7 @@ class ReportVars(): · 3 unmodified lines
1412 1413
1413class BranchWindow(QMdiSubWindow):1414class 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 super(BranchWindow, self).__init__(parent)1417 super(BranchWindow, self).__init__(parent)
1417 1418
1418 model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId()1419 model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId()
@@ -1435,7 +1436,7 @@ class BranchWindow(QMdiSubWindow): · 16 unmodified lines
1435 1436
1436 self.setWidget(self.vbox.Widget())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 def ResizeColumnToContents(self, column, n):1441 def ResizeColumnToContents(self, column, n):
1441 # Using the view's resizeColumnToContents() here is extrememly slow1442 # Using the view's resizeColumnToContents() here is extrememly slow
@@ -1710,7 +1711,6 @@ class ReportDialogBase(QDialog): · 268 unmodified lines
1710 1711
1711 self.glb = glb1712 self.glb = glb
1712 1713
1713 self.name = ""
1714 self.report_vars = ReportVars()1714 self.report_vars = ReportVars()
1715 1715
1716 self.setWindowTitle(title)1716 self.setWindowTitle(title)
@@ -1751,8 +1751,8 @@ class ReportDialogBase(QDialog): · 34 unmodified lines
1751 1751
1752 def Ok(self):1752 def Ok(self):
1753 vars = self.report_vars1753 vars = self.report_vars
1754 self.name = self.data_items[0].value1754 vars.name = self.data_items[0].value
1755 if not self.name:1755 if not vars.name:
1756 self.ShowMessage("Report name is required")1756 self.ShowMessage("Report name is required")
1757 return1757 return
1758 for d in self.data_items:1758 for d in self.data_items:
@@ -2392,13 +2392,13 @@ class MainWindow(QMainWindow): · 633 unmodified lines
2392 CallGraphWindow(self.glb, self)2392 CallGraphWindow(self.glb, self)
2393 2393
2394 def NewBranchView(self, event_id):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 def NewSelectedBranchView(self, event_id):2397 def NewSelectedBranchView(self, event_id):
2398 dialog = SelectedBranchDialog(self.glb, self)2398 dialog = SelectedBranchDialog(self.glb, self)
2399 ret = dialog.exec_()2399 ret = dialog.exec_()
2400 if ret: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 def NewTableView(self, table_name):2403 def NewTableView(self, table_name):
2404 TableWindow(self.glb, table_name, self)2404 TableWindow(self.glb, table_name, self)