mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-13 12:33:27 +02:00
Util.cpp, make RenderHostPortPair check for ret.isEmpty()
Rather than .isNull(), which may be false even for an empty string. A string may be empty but not null. :/
This commit is contained in:
parent
654e101314
commit
6dc265af7a
1 changed files with 1 additions and 1 deletions
|
|
@ -557,7 +557,7 @@ namespace Util {
|
|||
QString RenderHostPortPair(const QHostAddress &addr, quint16 port)
|
||||
{
|
||||
QString ret = addr.toString();
|
||||
if (!ret.isNull()) {
|
||||
if (!ret.isEmpty()) {
|
||||
if (addr.protocol() == QAbstractSocket::IPv6Protocol && ret.front() != QChar('[') && ret.back() != QChar(']')) {
|
||||
ret.insert(0, QChar('['));
|
||||
ret.append(QChar(']'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue