Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2687349pxj; Mon, 31 May 2021 08:16:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmMx1dFqNarttetm/6RUbOeP58Fyxmj99yJRcrBrcyyswEWfSHuMIXyqfCPBihtUs20mu6 X-Received: by 2002:a05:6638:37a6:: with SMTP id w38mr21038441jal.106.1622474163518; Mon, 31 May 2021 08:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622474163; cv=none; d=google.com; s=arc-20160816; b=eXCZXylyG2OmEp/dliDRf6va8YJJ1W71Qs9iJL/8eaLfOvnVaChBTHfE0Q6kVqRDqI 2KEXU+Gglboq/6bAsK5kl5QuKm+txiJ5Pm9b5Vtx6yFVaIEuvYPtOiP3hgrRKEvgClGi pc2dge0WIPkfB4paMVEhHII2TxTlJKx+D1B36yDZbWQA8Kg/Hc7vba2llBayB40piOjQ 3Vgoij5FFUyHbB05GEvVAmHtOJZr9jMfHu2e7cgcKrkvHPAxttzVYGnV5qgpunF3iH3o TyeEYUb/IHgQO3IDcxr5bBjpliUmJ7VsIGjk1Q0prajJYUrCzVSpi/TeMm9+lTmOoBds 5X9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IwzJlOXrNGzWNMYzDFXey6TEygxkuw97i2GQdZK2QBc=; b=lMsLdFmNQwURPmV3TlPQn8TrBc8nlo2afNGvNpYFEV207g8xhZSHCJyEaHqHvjGIkR zwPb+ZC/+l0ag1F/kpp5AajT6nPbtcNCjaDMd/EP2i7+cFZiyB+amMKEaxGXfYu5xOEx qenZvLLco83I4bw2y3TWeov8xxOpOXswQPla+UKrLZIqGyQsWFc2U2cNBrRhTerDcXtu rH2cSQde+Ql5l5I2qJLSWEM9mZT0iAe1JSpyl2A95J6wsqr4xEbw8Hr1ivaKNiGRQoRn XZkjDj7Amns6SyRqEm7tOljJd1SXYD1/t353RO6DmE7OsgOOFbBMf0PRV5a6X4OoM782 a01w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aVklNwa8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si384751iog.32.2021.05.31.08.15.50; Mon, 31 May 2021 08:16:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aVklNwa8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233775AbhEaPPk (ORCPT + 99 others); Mon, 31 May 2021 11:15:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233462AbhEaONC (ORCPT ); Mon, 31 May 2021 10:13:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F35C6198D; Mon, 31 May 2021 13:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468510; bh=n2WdW7r21UCrBvhtuq3j/yxgqLpH7jwPH/+d7X8f1Wk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aVklNwa8xpSGeMkyddSvYh1FxlLgopQiEG6iyUdzUcZrDt8ces40Lxsa/10hTO9dX TGB+kYuBtmKC3aYcmQr2ANTetks4rmJZn5XHSIEHRG9fW1v3G8Sbpx44rLHfu9BnKT oprVxkEfiWVO4EVz28nurswPFiaIp44pk6Hiq8P0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 5.4 009/177] perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report Date: Mon, 31 May 2021 15:12:46 +0200 Message-Id: <20210531130648.224138093@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter 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 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 Cc: Jiri Olsa 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 Signed-off-by: Greg Kroah-Hartman --- tools/perf/scripts/python/exported-sql-viewer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/scripts/python/exported-sql-viewer.py +++ b/tools/perf/scripts/python/exported-sql-viewer.py @@ -2495,7 +2495,7 @@ def CopyTableCellsToClipboard(view, as_c 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 = ","