Skip to content

Commit 258851a

Browse files
manisandrom-kuhn
authored andcommittedSep 9, 2015
Make QgsDataSourceURI uri string parser skip invalid portions instead of skipping the entire string
1 parent fc0843c commit 258851a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/core/qgsdatasourceuri.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ QgsDataSourceURI::QgsDataSourceURI( QString uri )
6464

6565
if ( i == uri.length() || uri[i] != '=' )
6666
{
67-
QgsDebugMsg( "= expected after parameter name" );
68-
return;
67+
QgsDebugMsg( QString( "= expected after parameter name, skipping text '%1'" ).arg( pname ) );
68+
continue;
6969
}
7070

7171
i++;
@@ -101,7 +101,6 @@ QgsDataSourceURI::QgsDataSourceURI( QString uri )
101101
i++;
102102

103103
int start = i;
104-
QString col;
105104
while ( i < uri.length() && uri[i] != ')' )
106105
{
107106
if ( uri[i] == '\\' )

0 commit comments

Comments
 (0)
Please sign in to comment.