]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls...
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 21 May 2021 09:20:51 +0000 (12:20 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 13:02:40 +0000 (15:02 +0200)
commit227448f8e43feb47f3a9711d91dcade81d155b45
tree9b1aa566b81628a7228aa591d07059707ae611d1
parent969a15d3946e168093216c68e006c77704d8d551
perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report

BugLink: https://bugs.launchpad.net/bugs/1931166
commit a6172059758ba1b496ae024cece7d5bdc8d017db upstream.

Provide missing argument to prevent following error when copying a
selection to the clipboard:

Traceback (most recent call last):
  File "tools/perf/scripts/python/exported-sql-viewer.py", line 4041, in <lambda>
    menu.addAction(CreateAction("&Copy selection", "Copy to clipboard", lambda: CopyCellsToClipboardHdr(self.view), self.view))
  File "tools/perf/scripts/python/exported-sql-viewer.py", line 4021, in CopyCellsToClipboardHdr
    CopyCellsToClipboard(view, False, True)
  File "tools/perf/scripts/python/exported-sql-viewer.py", line 4018, in CopyCellsToClipboard
    view.CopyCellsToClipboard(view, as_csv, with_hdr)
  File "tools/perf/scripts/python/exported-sql-viewer.py", line 3871, in CopyTableCellsToClipboard
    val = model.headerData(col, Qt.Horizontal)
TypeError: headerData() missing 1 required positional argument: 'role'

Fixes: 96c43b9a7ab3b ("perf scripts python: exported-sql-viewer.py: Add copy to clipboard")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lore.kernel.org/lkml/20210521092053.25683-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/perf/scripts/python/exported-sql-viewer.py