summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-06-08 17:16:11 -0700
committerDan Williams <dan.j.williams@intel.com>2021-06-08 17:16:11 -0700
commit54ada34b4dfdb864ac602e13ff87581abe517ce9 (patch)
tree8c92ca68c13e86b71f9cbf05a1a432c3ba4ea67b /tools/perf/scripts/python
parent605a5e41db7d8c930fb80115686991c4c1d08ee4 (diff)
parent4a2c1dcfaf59be4b357400d893c3f5daff6cab6c (diff)
Merge branch 'rafael/acpica/cfmws' into for-5.14/cxl
Pick up the definition of the CXL Fixed Memory Window Structure from Rafael's ACPICA development branch.
Diffstat (limited to 'tools/perf/scripts/python')
-rwxr-xr-xtools/perf/scripts/python/exported-sql-viewer.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index 7daa8bb70a5a..711d4f9f5645 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -91,6 +91,11 @@
from __future__ import print_function
import sys
+# Only change warnings if the python -W option was not used
+if not sys.warnoptions:
+ import warnings
+ # PySide2 causes deprecation warnings, ignore them.
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
import argparse
import weakref
import threading
@@ -125,8 +130,9 @@ if pyside_version_1:
from PySide.QtGui import *
from PySide.QtSql import *
-from decimal import *
-from ctypes import *
+from decimal import Decimal, ROUND_HALF_UP
+from ctypes import CDLL, Structure, create_string_buffer, addressof, sizeof, \
+ c_void_p, c_bool, c_byte, c_char, c_int, c_uint, c_longlong, c_ulonglong
from multiprocessing import Process, Array, Value, Event
# xrange is range in Python3
@@ -3868,7 +3874,7 @@ def CopyTableCellsToClipboard(view, as_csv=False, with_hdr=False):
if with_hdr:
model = indexes[0].model()
for col in range(min_col, max_col + 1):
- val = model.headerData(col, Qt.Horizontal)
+ val = model.headerData(col, Qt.Horizontal, Qt.DisplayRole)
if as_csv:
text += sep + ToCSValue(val)
sep = ","