fix deprecated warning QSet<T>::toList() Use values() instead.

warning: ‘QList<T> QSet<T>::toList() const [with T = Conductor*]’
is deprecated: Use values() instead. [-Wdeprecated-declarations]

QT_VERSION 5.15.0
GCC 64bit
This commit is contained in:
Simon De Backer
2020-05-27 23:01:39 +02:00
committed by Laurent Trinques
parent 7948e2b1d3
commit 362509cb38
9 changed files with 16 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
if (m_potential_conductors.isEmpty()) {
m_potential_conductors << c;
} else {
if (!potentialIsManaged(c->relatedPotentialConductors(true).toList())) {
if (!potentialIsManaged(c->relatedPotentialConductors(true).values())) {
m_potential_conductors << c;
}
}
@@ -338,7 +338,7 @@ DiagramContent &DiagramContent::operator+=(const DiagramContent &other)
for (Conductor *c : other.m_potential_conductors)
{
QList<Conductor *> c_list = c->relatedPotentialConductors(true).toList();
QList<Conductor *> c_list = c->relatedPotentialConductors(true).values();
c_list << c;
if (!potentialIsManaged(c_list)) {
m_potential_conductors << c;