Qt: Don't use QMap::first or ::last

QMap::first and ::last were added in Qt 5.2.

Change-Id: I63bbb384aa75910bb96d8f75185ae90444b6c127
Reviewed-on: https://code.wireshark.org/review/15576
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2016-05-26 08:29:27 -07:00
parent 9f02b25caf
commit ab63b89357
1 changed files with 7 additions and 2 deletions

View File

@ -112,8 +112,13 @@ int SequenceDiagram::adjacentPacket(bool next)
if (data_->size() < 1) return adjacent_packet;
if (selected_packet_ < 1) {
WSCPSeqData &data = next ? data_->first() : data_->last();
return data.value->frame_number;
if (next) {
it = data_->constBegin();
} else {
it = data_->constEnd();
--it;
}
return it.value().value->frame_number;
}
if (next) {