Commit e61d6a7f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some qt6 compile error

parent 0a640067
Pipeline #116327 passed with stage
in 50 seconds
......@@ -44,7 +44,11 @@ bool KBlocksNetClient::parseIPString(const QString &input, QHostAddress *ip, qui
{
bool result = false;
ip->setAddress(input.left(input.indexOf(QStringLiteral(":"))));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
*port = input.midRef(input.indexOf(QStringLiteral(":")) + 1).toUInt(&result);
#else
*port = QStringView(input).mid(input.indexOf(QStringLiteral(":")) + 1).toUInt(&result);
#endif
return result;
}
......
......@@ -435,7 +435,11 @@ bool KBlocksNetServer::parseIPString(const QString &input, QHostAddress *ip, qui
{
bool result = false;
ip->setAddress(input.left(input.indexOf(QStringLiteral(":"))));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
*port = input.midRef(input.indexOf(QStringLiteral(":")) + 1).toUInt(&result);
#else
*port = QStringView(input).mid(input.indexOf(QStringLiteral(":")) + 1).toUInt(&result);
#endif
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment