Skip to content

Commit

Permalink
complete QgsDataSourceURI() methods
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10581 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 16, 2009
1 parent 37c73c1 commit bb919fd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
8 changes: 7 additions & 1 deletion python/core/qgsdatasourceuri.sip
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ public:
QString table() const;
QString sql() const;
QString geometryColumn() const;
QString database() const; // added in version 1.1

// added in 1.1
QString host() const;
QString database() const;
QString password() const;
QString port() const;
SSLmode sslMode() const;

void setSql(QString sql);
};
20 changes: 20 additions & 0 deletions src/core/qgsdatasourceuri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,31 @@ QString QgsDataSourceURI::username() const
return mUsername;
}

QString QgsDataSourceURI::host() const
{
return mHost;
}

QString QgsDataSourceURI::database() const
{
return mDatabase;
}

QString QgsDataSourceURI::password() const
{
return mPassword;
}

QString QgsDataSourceURI::port() const
{
return mPort;
}

QgsDataSourceURI::SSLmode QgsDataSourceURI::sslMode() const
{
return mSSLmode;
}

QString QgsDataSourceURI::schema() const
{
return mSchema;
Expand Down
9 changes: 7 additions & 2 deletions src/core/qgsdatasourceuri.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ class CORE_EXPORT QgsDataSourceURI
QString table() const;
QString sql() const;
QString geometryColumn() const;
QString database() const; // added in version 1.1
enum SSLmode sslMode() const;

void clearSchema();
void setSql( QString sql );

// added in version 1.1
QString host() const;
QString database() const;
QString port() const;
QString password() const;
enum SSLmode sslMode() const;

private:
void skipBlanks( const QString &uri, int &i );
QString getValue( const QString &uri, int &i );
Expand Down

0 comments on commit bb919fd

Please sign in to comment.