Fix that an URL without a port resulted in wrong portnumber being used. Closes #75
This commit is contained in:
parent
7dc665948d
commit
a5069bb2b9
1 changed files with 1 additions and 3 deletions
|
|
@ -4,8 +4,6 @@
|
|||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
|
||||
//PostgresqlUrlParser::PostgresqlUrlParser() {}
|
||||
|
||||
bool TryParsePostgresqlUrl(const QString &urlString, ConnectionConfig &out)
|
||||
{
|
||||
const char* shortPrefix = "postgres";
|
||||
|
|
@ -19,7 +17,7 @@ bool TryParsePostgresqlUrl(const QString &urlString, ConnectionConfig &out)
|
|||
out.setPassword(url.password());
|
||||
out.setHost(url.host());
|
||||
out.setDbname(url.fileName());
|
||||
out.setPort(url.port());
|
||||
out.setPort(url.port(5432));
|
||||
|
||||
QUrlQuery query(url.query());
|
||||
for (auto && param : query.queryItems())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue