From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH 3/5] kernel-shark-qt: Rearrange the KsQuickContextMenu menu
Date: Thu, 10 Jan 2019 15:44:17 +0200 [thread overview]
Message-ID: <20190110134419.20247-4-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20190110134419.20247-1-ykaradzhov@vmware.com>
Swaps the position of the Show / Hide actions in the menu. This is
done because we expect the "Show" actions to be used more often.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
| 26 ++++++++++++----------
1 file changed, 14 insertions(+), 12 deletions(-)
--git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index 4f922a2..7ab5a5f 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -88,13 +88,6 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
addSection("Pointer menu");
- descr = "Hide task [";
- descr += taskName;
- descr += "-";
- descr += QString("%1").arg(pid);
- descr += "]";
- lamAddAction(&_hideTaskAction, &KsQuickContextMenu::_hideTask);
-
descr = "Show task [";
descr += taskName;
descr += "-";
@@ -102,23 +95,32 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
descr += "] only";
lamAddAction(&_showTaskAction, &KsQuickContextMenu::_showTask);
- descr = "Hide event [";
- descr += kshark_get_event_name_easy(_data->rows()[_row]);
+ descr = "Hide task [";
+ descr += taskName;
+ descr += "-";
+ descr += QString("%1").arg(pid);
descr += "]";
- lamAddAction(&_hideEventAction, &KsQuickContextMenu::_hideEvent);
+ lamAddAction(&_hideTaskAction, &KsQuickContextMenu::_hideTask);
descr = "Show event [";
descr += kshark_get_event_name_easy(_data->rows()[_row]);
descr += "] only";
lamAddAction(&_showEventAction, &KsQuickContextMenu::_showEvent);
- descr = QString("Hide CPU [%1]").arg(_data->rows()[_row]->cpu);
- lamAddAction(&_hideCPUAction, &KsQuickContextMenu::_hideCPU);
+ descr = "Hide event [";
+ descr += kshark_get_event_name_easy(_data->rows()[_row]);
+ descr += "]";
+ lamAddAction(&_hideEventAction, &KsQuickContextMenu::_hideEvent);
if (parentName == "KsTraceViewer") {
descr = QString("Show CPU [%1] only").arg(cpu);
lamAddAction(&_showCPUAction, &KsQuickContextMenu::_showCPU);
+ }
+
+ descr = QString("Hide CPU [%1]").arg(_data->rows()[_row]->cpu);
+ lamAddAction(&_hideCPUAction, &KsQuickContextMenu::_hideCPU);
+ if (parentName == "KsTraceViewer") {
descr = "Add [";
descr += taskName;
descr += "-";
--
2.17.1
next prev parent reply other threads:[~2019-01-10 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 1/5] kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 2/5] kernel-shark-qt: Remove the "Apply to" checkboxes " Yordan Karadzhov
2019-01-10 13:44 ` Yordan Karadzhov [this message]
2019-01-10 13:44 ` [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 5/5] kernel-shark-qt: Add section separator in KsQuickContextMenu Yordan Karadzhov
2019-01-10 14:31 ` [PATCH 0/5] Cosmetic modifications " Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190110134419.20247-4-ykaradzhov@vmware.com \
--to=ykaradzhov@vmware.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).