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'
Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all
Unified · Split
| @@ -3868,7 +3868,7 @@ def CopyTableCellsToClipboard(view, as_csv=False, with_hdr=False): · 3867 unmodified lines | ||
| 3868 | 3868 | if with_hdr: |
| 3869 | 3869 | model = indexes[0].model() |
| 3870 | 3870 | for col in range(min_col, max_col + 1): |
| 3871 | − val = model.headerData(col, Qt.Horizontal) | |
| 3871 | + val = model.headerData(col, Qt.Horizontal, Qt.DisplayRole) | |
| 3872 | 3872 | if as_csv: |
| 3873 | 3873 | text += sep + ToCSValue(val) |
| 3874 | 3874 | sep = "," |