Provide a valid default port when parsing QUrl

When port is not specified in QUrl, the default value is
returned. This default value is -1, which was promptly cast to an
unsigned integer.
This commit is contained in:
Adam Majer 2014-04-30 12:46:26 -05:00
parent 5c4db2233c
commit 29fc73a5d2
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ void ClientPrivate::parseCnnString( const QUrl & con )
q->setSsl(con.scheme() == AMQPSSCHEME);
q->setPassword(con.password());
q->setUser(con.userName());
q->setPort(con.port());
q->setPort(con.port(AMQPPORT));
q->setHost(con.host());
q->setVirtualHost(con.path());
}