Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Qt Polution of PacketList, PacketTree and ByteView

From: Roland Knall <rknall@xxxxxxxxx>
Date: Mon, 24 Jul 2017 10:48:04 +0200
Hi

One of the most often requested features is the possibility to load more then one trace at the same time aka. make Wireshark multi-document enabled.

One of the biggest hassles UI-wise with that is, that at the moment we rely to strongly on the tight integration of MainWindow, PacketList, PacketTree and ByteView. The later all get set upon each other as well as on the PacketList.

I would like to request everyone doing Qt development to stop that practice and rather do the following:

If you want to signal something from, let's say the ByteView to the status bar, emit a signal in ByteView and create a proxy signal in MainWindow:

- ByteView signals a field changed, emits a "fieldChanged(FieldInformation *)" signal
- MainWindow connects that fieldChanged Signal to it's own fieldChanged Signal (for Signal/Signal see http://doc.qt.io/qt-4.8/signalsandslots.html#signals-and-slots last paragraph). 
- MainStatusBar get's connected during instantiation to the fieldChanged signal from MainWindow and reacts on it.

That way, whenever a field changes, MainStatusBar automatically updates, and however changes a field, just has to information MainWindow.

I am currently in the process of implementing exactly that for "fieldChanged", but if you come across that sort of thing on your end, please keep that in mind.

Otherwise it makes it really impossible to extend the Qt-UI with future concepts like multi-document or UI plugins, for instance.

cheers,
Roland