Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2726356pxj; Mon, 31 May 2021 09:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCM8eIr/8xKmEI00lVR+34Ne0QmLDILd8Lj4E5etx9uNxoh1EaxTSQptu6sxRWyFh/llRj X-Received: by 2002:aa7:c844:: with SMTP id g4mr21804603edt.257.1622477513758; Mon, 31 May 2021 09:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477513; cv=none; d=google.com; s=arc-20160816; b=RHF/dhpGXrrCc8Uuqznf4Js5myl543TbjNVM+t/XffcNmylKxAZqi0ron9Qulxb9B8 9vgJ+Hw6Ehs1UnIP+CHSiDbNi+TQNC51FXFP8+HYUhSYIyF6uN9nyV2ZMWmaWpU/sEix xE2J9cH4g/FNatW358kNEKmGC2sS0uBhSe7CQWm73Bm6rOhVUUTcMA3zslQCztK9Nbr8 TSFZ821bkNpfk2xEeEWNNUf/jmcRiFrJgxw5JHJG8KaWtbg1SpbItkkbfSrDBUYSwaQQ 6S7vD6VfVGSeqEGjQh8YegtVAF9rmRIUMLlCEYSUTxHxY3AQ9X/N7rNySZeizoEpBEkd fHow== 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=gua4jEr68XRaU1iWKoLJEs+1hYKmvJGEORkZFnPwwZ4=; b=0QkNUV7hnjKfto9gvEx2S2KktNq7rdlZ6uRCV6XXBUZUrGIhnwpNtS8koO9NGVYdqC TZcUpN+33MADv91T8j5zgPfrAqvw0+Ef/P+Fg2vzX4IKYUtBBWnE3RnEaOpBKz8rLntW 6aaZPiPQ+OeuX7G/AyM3j5YlnakYgkcHvYnUfRIsR/gp9KXxhvJUzvloC8oyGar3RcHq OreXp9PE0ruLcaPA6x5UCA5Zw/Q4Jvn6PKy6WcpI2GWCU9gepaHsBiR8EuoJYoi/0QRN OiG3DWCz5ZGFN6Ogs54q+vjvh9nW7x8GxenUZLTeBsrz8hQDwPM5R9pQ5TXIgIlg+nQg pqaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NiQxlKXO; 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 ji21si309579ejc.740.2021.05.31.09.11.30; Mon, 31 May 2021 09:11:53 -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=NiQxlKXO; 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 S233957AbhEaQJZ (ORCPT + 99 others); Mon, 31 May 2021 12:09:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:60316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233643AbhEaOgU (ORCPT ); Mon, 31 May 2021 10:36:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C4F1661C4F; Mon, 31 May 2021 13:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469081; bh=XSgpYZSS1A43AEYXwsuaBxUBHSVjgtsQgACDshoxKDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NiQxlKXOQ/xFWhw+GQxGUBlp8fmK9ybfzpI1iXYSefAdYiZJaB+OGOxUPYe1dyyhU 1MAmf2l5LaADamulKgbV12Ri3+z0I7K18QHiBBwV0sKvi6REOIyBIqFMQXZ1K7/4Hf 85XYwToG9P47VFsFYQ7n+/AqPc1l5mTrV8os0uAc= 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.12 027/296] perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report Date: Mon, 31 May 2021 15:11:22 +0200 Message-Id: <20210531130704.695539522@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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 @@ -3868,7 +3868,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 = ","