From 268fad0690eb131a7d440d2f815b28c9b55607f6 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Mon, 26 Jun 2023 18:08:49 +0530 Subject: [PATCH] Include headers also when copying stream stats This is for plain text copy format. This also replaces any newlines in the header text with a space to maintain formatting. --- client/streamstatswindow.ui | 3 +++ client/xtableview.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/streamstatswindow.ui b/client/streamstatswindow.ui index 2ba52ca3..121abd2c 100644 --- a/client/streamstatswindow.ui +++ b/client/streamstatswindow.ui @@ -19,6 +19,9 @@ Qt::ActionsContextMenu + + QAbstractItemView::SelectRows + Oops! We don't seem to have any stream statistics for the requested port(s) diff --git a/client/xtableview.h b/client/xtableview.h index 99ea3aed..c8f39d47 100644 --- a/client/xtableview.h +++ b/client/xtableview.h @@ -169,7 +169,8 @@ public slots: for (int i = start; i < end; i++) if (indexes.contains(model()->index(indexes.first().row(), i))) text.append(model()->headerData(i, Qt::Horizontal) - .toString()+"\t");; + .toString().replace('\n', ' ') + +"\t");; text.append("\n"); }