diff --git a/pglablib/utils/PostgresqlUrlParser.cpp b/pglablib/utils/PostgresqlUrlParser.cpp index e2d9883..534de1f 100644 --- a/pglablib/utils/PostgresqlUrlParser.cpp +++ b/pglablib/utils/PostgresqlUrlParser.cpp @@ -4,8 +4,6 @@ #include #include -//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())