Fix sorting of numeric host lists (P25/NXDN)

main
Doug McLain 1 year ago
parent 6d73e2eb4d
commit 84b7d459d3

@ -903,6 +903,9 @@ void DroidStar::process_p25_hosts()
m_hostsmodel.append(i.key()); m_hostsmodel.append(i.key());
++i; ++i;
} }
QMap<int, QString> m;
for (auto s : m_hostsmodel) m[s.toInt()] = s;
m_hostsmodel = QStringList(m.values());
} }
f.close(); f.close();
} }
@ -944,6 +947,9 @@ void DroidStar::process_nxdn_hosts()
m_hostsmodel.append(i.key()); m_hostsmodel.append(i.key());
++i; ++i;
} }
QMap<int, QString> m;
for (auto s : m_hostsmodel) m[s.toInt()] = s;
m_hostsmodel = QStringList(m.values());
} }
f.close(); f.close();
} }

Loading…
Cancel
Save