Opened 15 years ago
Closed 15 years ago
#1672 closed bug (fixed)
keyColumn and sql are in wrong order in qgsdatasourceuri.cpp
Reported by: | hdus | Owned by: | jef |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.2.0 |
Component: | Data Provider | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
The new option keyColumn should appear after the option sql in src/core/qgsdatasourceuri.cpp.
With the trunk version former defined datasources allocates sql queries as keycolumn. After changing the order of &keyColumn and &sql everything works fine. Take a look at the code snippets please.
The definition also does't correspond with qgsdatasourceuri.h.
Wrong allocation:
void QgsDataSourceURI::setDataSource( const QString &schema, const QString &table, const QString &geometryColumn, const QString &keyColumn, const QString &sql ) { mSchema = schema; mTable = table; mGeometryColumn = geometryColumn; mKeyColumn = keyColumn; mSql = sql; }
working allocation:
void QgsDataSourceURI::setDataSource( const QString &schema, const QString &table, const QString &geometryColumn, const QString &sql, const QString &keyColumn ) { mSchema = schema; mTable = table; mGeometryColumn = geometryColumn; mKeyColumn = keyColumn; mSql = sql; }
Note:
See TracTickets
for help on using tickets.
fixed in r10692