mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-02 10:04:12 +02:00
Fix trivial Qt6 deprecations (QString::count, QColor::setNamedColor)
QString::count() (no-arg) is deprecated -> size(); QColor::setNamedColor() is deprecated -> the QColor(QString) constructor. Both replacements are non-deprecated on Qt5 too. Clears 2 -Wdeprecated-declarations warnings.
This commit is contained in:
@@ -830,7 +830,7 @@ void ElementsCollectionWidget::search()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//start the search when text have at least 3 letters.
|
//start the search when text have at least 3 letters.
|
||||||
if (text.count() < 3) {
|
if (text.size() < 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ void TerminalStripBridge::fromXml(const QDomElement &dom_element)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_uuid = QUuid(dom_element.attribute(QStringLiteral("uuid"), m_uuid.toString()));
|
m_uuid = QUuid(dom_element.attribute(QStringLiteral("uuid"), m_uuid.toString()));
|
||||||
m_color.setNamedColor(dom_element.attribute(QStringLiteral("color")));
|
m_color = QColor(dom_element.attribute(QStringLiteral("color")));
|
||||||
|
|
||||||
const auto real_t_vector = QETXML::subChild(dom_element,
|
const auto real_t_vector = QETXML::subChild(dom_element,
|
||||||
QStringLiteral("real_terminals"),
|
QStringLiteral("real_terminals"),
|
||||||
|
|||||||
Reference in New Issue
Block a user