]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
0d6673e5cb32562853bfed0b1b3fabd6bc4e7063
[thirdparty/kernel/stable-queue.git] /
1 From a6172059758ba1b496ae024cece7d5bdc8d017db Mon Sep 17 00:00:00 2001
2 From: Adrian Hunter <adrian.hunter@intel.com>
3 Date: Fri, 21 May 2021 12:20:51 +0300
4 Subject: perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report
5
6 From: Adrian Hunter <adrian.hunter@intel.com>
7
8 commit a6172059758ba1b496ae024cece7d5bdc8d017db upstream.
9
10 Provide missing argument to prevent following error when copying a
11 selection to the clipboard:
12
13 Traceback (most recent call last):
14 File "tools/perf/scripts/python/exported-sql-viewer.py", line 4041, in <lambda>
15 menu.addAction(CreateAction("&Copy selection", "Copy to clipboard", lambda: CopyCellsToClipboardHdr(self.view), self.view))
16 File "tools/perf/scripts/python/exported-sql-viewer.py", line 4021, in CopyCellsToClipboardHdr
17 CopyCellsToClipboard(view, False, True)
18 File "tools/perf/scripts/python/exported-sql-viewer.py", line 4018, in CopyCellsToClipboard
19 view.CopyCellsToClipboard(view, as_csv, with_hdr)
20 File "tools/perf/scripts/python/exported-sql-viewer.py", line 3871, in CopyTableCellsToClipboard
21 val = model.headerData(col, Qt.Horizontal)
22 TypeError: headerData() missing 1 required positional argument: 'role'
23
24 Fixes: 96c43b9a7ab3b ("perf scripts python: exported-sql-viewer.py: Add copy to clipboard")
25 Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
26 Cc: Jiri Olsa <jolsa@redhat.com>
27 Cc: stable@vger.kernel.org
28 Link: http://lore.kernel.org/lkml/20210521092053.25683-2-adrian.hunter@intel.com
29 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 ---
32 tools/perf/scripts/python/exported-sql-viewer.py | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35 --- a/tools/perf/scripts/python/exported-sql-viewer.py
36 +++ b/tools/perf/scripts/python/exported-sql-viewer.py
37 @@ -3868,7 +3868,7 @@ def CopyTableCellsToClipboard(view, as_c
38 if with_hdr:
39 model = indexes[0].model()
40 for col in range(min_col, max_col + 1):
41 - val = model.headerData(col, Qt.Horizontal)
42 + val = model.headerData(col, Qt.Horizontal, Qt.DisplayRole)
43 if as_csv:
44 text += sep + ToCSValue(val)
45 sep = ","