forked from osmocom/wireshark
Qt: Substitute for C++17 ism
Replace C++17 ism from !9822 with code with the same effect that is valid earlier (cherry picked from commit 50f71efbe0955b32dfb99bb4933f6ff310b39283)
This commit is contained in:
parent
2d4e637fef
commit
189d93b4b8
|
@ -340,7 +340,8 @@ void PacketListModel::addFrameComment(const QModelIndexList &indices, const QByt
|
||||||
frame_data *fdata;
|
frame_data *fdata;
|
||||||
if (!cap_file_) return;
|
if (!cap_file_) return;
|
||||||
|
|
||||||
foreach (const auto &index, std::as_const(indices)) {
|
for (qsizetype i = 0; i < indices.size(); ++i) {
|
||||||
|
const auto &index = indices.at(i);
|
||||||
if (!index.isValid()) continue;
|
if (!index.isValid()) continue;
|
||||||
|
|
||||||
PacketListRecord *record = static_cast<PacketListRecord*>(index.internalPointer());
|
PacketListRecord *record = static_cast<PacketListRecord*>(index.internalPointer());
|
||||||
|
@ -414,7 +415,8 @@ void PacketListModel::deleteFrameComments(const QModelIndexList &indices)
|
||||||
frame_data *fdata;
|
frame_data *fdata;
|
||||||
if (!cap_file_) return;
|
if (!cap_file_) return;
|
||||||
|
|
||||||
foreach (const auto &index, std::as_const(indices)) {
|
for (qsizetype i = 0; i < indices.size(); ++i) {
|
||||||
|
const auto &index = indices.at(i);
|
||||||
if (!index.isValid()) continue;
|
if (!index.isValid()) continue;
|
||||||
|
|
||||||
PacketListRecord *record = static_cast<PacketListRecord*>(index.internalPointer());
|
PacketListRecord *record = static_cast<PacketListRecord*>(index.internalPointer());
|
||||||
|
|
Loading…
Reference in New Issue