Qt: Drag-and-Dropping from ProtoTree copies whole field

If a DnD is initiated from the ProtoTree it actually copies the complete
text of the expanded tree elements. This can be dropped in any text-window
outside of Wireshark

Change-Id: Ia174bcf2f061ddb23439c3243149bb54a1ba89d9
Reviewed-on: https://code.wireshark.org/review/33630
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Roland Knall 2019-06-16 23:42:04 +02:00
parent c288574842
commit 17aacfae43
1 changed files with 2 additions and 0 deletions

View File

@ -601,6 +601,8 @@ bool ProtoTree::eventFilter(QObject * obj, QEvent * event)
{
DisplayFilterMimeData * dfmd =
new DisplayFilterMimeData(QString(finfo.headerInfo().name), QString(finfo.headerInfo().abbreviation), filter);
dfmd->setText(toString(idx));
QDrag * drag = new QDrag(this);
drag->setMimeData(dfmd);