diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-06-03 20:00:49 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-06-03 20:00:49 +0300 |
commit | a9e906b71f963f19aabf7af59f73f37c929a5221 (patch) | |
tree | 0228f82f4719160cfa4635c0c042c9c73fc2d2a5 /tools/perf/scripts/python | |
parent | 475ea6c60279e9f2ddf7e4cf2648cd8ae0608361 (diff) | |
parent | fcf6631f3736985ec89bdd76392d3c7bfb60119f (diff) | |
download | linux-a9e906b71f963f19aabf7af59f73f37c929a5221.tar.xz |
Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
-rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 12 |
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 = "," |