aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-11-21 10:50:41 +0100
committerRoland Knall <rknall@gmail.com>2019-11-21 10:59:05 +0000
commitcfee0f8082578810cbc88213edde3562f2a7bf73 (patch)
treea7faa696f466c3fc004709a602474af79361910d /ui/qt/byte_view_tab.cpp
parentecb90a4e25ac9aad866c76a9d65839dc27c77519 (diff)
Qt: Remove frameSelect signal
As all frameSelect signals now transport a QList<int> of selected frames, use this instead Change-Id: I1888e45a4df997920aebde9706ca0ae803bdba03 Reviewed-on: https://code.wireshark.org/review/35176 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp
index a5279afc4e..d007f1a95a 100644
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -59,7 +59,7 @@ void ByteViewTab::connectToMainWindow()
wsApp->mainWindow(), SIGNAL(fieldHighlight(FieldInformation *)));
/* Connect change of packet selection */
- connect(wsApp->mainWindow(), SIGNAL(frameSelected(int)), this, SLOT(selectedFrameChanged(int)));
+ connect(wsApp->mainWindow(), SIGNAL(framesSelected(QList<int>)), this, SLOT(selectedFrameChanged(QList<int>)));
connect(wsApp->mainWindow(), SIGNAL(setCaptureFile(capture_file*)), this, SLOT(setCaptureFile(capture_file*)));
connect(wsApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)), this, SLOT(selectedFieldChanged(FieldInformation *)));
@@ -77,7 +77,7 @@ void ByteViewTab::captureActive(int cap)
tvbuff_t * stored = VariantPointer<tvbuff_t>::asPtr(bvt->property(tvb_data_property));
if (! stored)
- selectedFrameChanged(-1);
+ selectedFrameChanged(QList<int>());
}
}
}
@@ -227,7 +227,7 @@ void ByteViewTab::setTabsVisible() {
tabBar()->hide();
}
-void ByteViewTab::selectedFrameChanged(int frameNum)
+void ByteViewTab::selectedFrameChanged(QList<int> frames)
{
clear();
qDeleteAll(findChildren<ByteViewText *>());
@@ -246,7 +246,8 @@ void ByteViewTab::selectedFrameChanged(int frameNum)
}
}
- if (frameNum >= 0)
+ /* only show the bytes for single selections */
+ if (frames.count() == 1)
{
if (! cap_file_ || ! cap_file_->edt)
return;
@@ -340,7 +341,7 @@ void ByteViewTab::highlightedFieldChanged(FieldInformation *highlighted)
void ByteViewTab::setCaptureFile(capture_file *cf)
{
- selectedFrameChanged(-1);
+ selectedFrameChanged(QList<int>());
cap_file_ = cf;
}