Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KBlocks
Commits
e61d6a7f
Commit
e61d6a7f
authored
Dec 31, 2021
by
Laurent Montel
Browse files
Fix some qt6 compile error
parent
0a640067
Pipeline
#116327
passed with stage
in 50 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/KBlocksNetClient.cpp
View file @
e61d6a7f
...
...
@@ -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
;
}
...
...
src/KBlocksNetServer.cpp
View file @
e61d6a7f
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment