Commit f97875a8 authored by hjk's avatar hjk

Utils: Make Port::number error out with -1 in the invalid case

That's more consistent with 'default' cases QUrl::port() and internal
Utils::m_port representation.

Change-Id: Ia6ee413f92e94c202f70d734e79976a0cda0d9ef
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 646abdd4
......@@ -50,7 +50,7 @@ public:
{
}
quint16 number() const { QTC_ASSERT(isValid(), return 0); return quint16(m_port); }
quint16 number() const { QTC_ASSERT(isValid(), return -1); return quint16(m_port); }
bool isValid() const { return m_port != -1; }
QString toString() const { return QString::number(m_port); }
......
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