mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +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.
|
||||
if (text.count() < 3) {
|
||||
if (text.size() < 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ void TerminalStripBridge::fromXml(const QDomElement &dom_element)
|
||||
}
|
||||
|
||||
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,
|
||||
QStringLiteral("real_terminals"),
|
||||
|
||||
Reference in New Issue
Block a user