[QGIS-trac] [Quantum GIS] #1672: keyColumn and sql are in wrong order in qgsdatasourceuri.cpp

Quantum GIS qgis at qgis.org
Fri May 1 04:50:04 EDT 2009


#1672: keyColumn and sql are in wrong order in qgsdatasourceuri.cpp
------------------------------------------------+---------------------------
   Reporter:  hdus                              |              Owner:  jef          
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.2.0
  Component:  Data Provider                     |            Version:  HEAD         
   Keywords:                                    |   Platform_version:               
   Platform:  All                               |           Must_fix:  Yes          
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 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;
 }
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1672>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list