]> Git Repo - linux.git/blobdiff - tools/perf/scripts/python/exported-sql-viewer.py
perf scripts python: exported-sql-viewer.py: Move view creation
[linux.git] / tools / perf / scripts / python / exported-sql-viewer.py
index 74ef92f1d19ad6637140829497997cc2cf8b686e..db4655168ab1f0ac3e1c5683cb56fb2413c1457e 100755 (executable)
@@ -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)):
This page took 0.034437 seconds and 4 git commands to generate.