Skip to content
Permalink
Browse files
complete QgsDataSourceURI() methods
git-svn-id: http://svn.osgeo.org/qgis/trunk@10581 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 16, 2009
1 parent 3b3556b commit 02bf44eb2c3ac04843d4ab67c6be15985594d1d4
Showing with 34 additions and 3 deletions.
  1. +7 −1 python/core/qgsdatasourceuri.sip
  2. +20 −0 src/core/qgsdatasourceuri.cpp
  3. +7 −2 src/core/qgsdatasourceuri.h
@@ -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);
};
@@ -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;
@@ -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 );

0 comments on commit 02bf44e

Please sign in to comment.