mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 11:20:49 +07:00
perf scripts python: exported-sql-viewer.py: Move view creation
As preparation for adding support for copying to clipboard, create view in TreeWindowBase instead of derived classes. Committer testing: Tested using an old .db used to test some older patches: $ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db Nothing breaks. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190503120828.25326-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ca138a7aab
commit
be6e747136
@ -877,9 +877,10 @@ class TreeWindowBase(QMdiSubWindow):
|
||||
super(TreeWindowBase, self).__init__(parent)
|
||||
|
||||
self.model = None
|
||||
self.view = None
|
||||
self.find_bar = None
|
||||
|
||||
self.view = QTreeView()
|
||||
|
||||
def DisplayFound(self, ids):
|
||||
if not len(ids):
|
||||
return False
|
||||
@ -921,7 +922,6 @@ class CallGraphWindow(TreeWindowBase):
|
||||
|
||||
self.model = LookupCreateModel("Context-Sensitive Call Graph", lambda x=glb: CallGraphModel(x))
|
||||
|
||||
self.view = QTreeView()
|
||||
self.view.setModel(self.model)
|
||||
|
||||
for c, w in ((0, 250), (1, 100), (2, 60), (3, 70), (4, 70), (5, 100)):
|
||||
@ -944,7 +944,6 @@ class CallTreeWindow(TreeWindowBase):
|
||||
|
||||
self.model = LookupCreateModel("Call Tree", lambda x=glb: CallTreeModel(x))
|
||||
|
||||
self.view = QTreeView()
|
||||
self.view.setModel(self.model)
|
||||
|
||||
for c, w in ((0, 230), (1, 100), (2, 100), (3, 70), (4, 70), (5, 100)):
|
||||
|
Loading…
Reference in New Issue
Block a user