diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2021-07-01 07:32:37 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-07-01 07:32:37 +0530 |
commit | c503c193db7d7ccc0c58b1ef694eaef331318149 (patch) | |
tree | 44d3215196f385e88fa5da6affc58649c90e0ea9 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 9821a195d4e263801884b105554e801642c59f2a (diff) | |
parent | 1eb5dde674f57b1a1918dab33f09e35cdd64eb07 (diff) | |
download | linux-c503c193db7d7ccc0c58b1ef694eaef331318149.tar.gz linux-c503c193db7d7ccc0c58b1ef694eaef331318149.tar.bz2 linux-c503c193db7d7ccc0c58b1ef694eaef331318149.zip |
Merge branch 'cpufreq/cppc-fie' into cpufreq/arm/linux-next
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-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 = "," |