[QGIS Commit] r9502 - in trunk/qgis: python/core src/app src/core
src/plugins/geoprocessing src/plugins/grass src/plugins/spit
src/providers/postgres
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Oct 20 16:24:36 EDT 2008
Author: timlinux
Date: 2008-10-20 16:24:36 -0400 (Mon, 20 Oct 2008)
New Revision: 9502
Modified:
trunk/qgis/python/core/qgsdatasourceuri.sip
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsdbsourceselect.cpp
trunk/qgis/src/app/qgsdbsourceselect.h
trunk/qgis/src/app/qgsnewconnection.cpp
trunk/qgis/src/app/qgspgquerybuilder.cpp
trunk/qgis/src/app/qgsserversourceselect.cpp
trunk/qgis/src/app/qgsserversourceselect.h
trunk/qgis/src/core/qgsdatasourceuri.cpp
trunk/qgis/src/core/qgsdatasourceuri.h
trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/plugins/spit/qgsspit.cpp
trunk/qgis/src/plugins/spit/qgsspit.h
trunk/qgis/src/providers/postgres/qgspostgrescountthread.cpp
trunk/qgis/src/providers/postgres/qgspostgrescountthread.h
trunk/qgis/src/providers/postgres/qgspostgresextentthread.cpp
trunk/qgis/src/providers/postgres/qgspostgresextentthread.h
trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
trunk/qgis/src/providers/postgres/qgspostgresprovider.h
Log:
Remove abbreviation of connectionInfo
Modified: trunk/qgis/python/core/qgsdatasourceuri.sip
===================================================================
--- trunk/qgis/python/core/qgsdatasourceuri.sip 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/python/core/qgsdatasourceuri.sip 2008-10-20 20:24:36 UTC (rev 9502)
@@ -20,7 +20,7 @@
QgsDataSourceURI(QString uri);
//! connection info
- QString connInfo() const;
+ QString connectionInfo() const;
//! complete uri
QString uri() const;
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -2308,17 +2308,17 @@
QApplication::setOverrideCursor( Qt::WaitCursor );
- QString connInfo = dbs->connInfo();
+ QString connectionInfo = dbs->connectionInfo();
// for each selected table, connect to the database, parse the Wkt geometry,
// and build a canvasitem for it
- // readWKB(connInfo,tables);
+ // readWKB(connectionInfo,tables);
QStringList::Iterator it = tables.begin();
while ( it != tables.end() )
{
// create the layer
//qWarning("creating layer");
- QgsVectorLayer *layer = new QgsVectorLayer( connInfo + " table=" + *it, *it, "postgres" );
+ QgsVectorLayer *layer = new QgsVectorLayer( connectionInfo + " table=" + *it, *it, "postgres" );
if ( layer->isValid() )
{
// register this layer with the central layers registry
@@ -2371,7 +2371,7 @@
if ( wmss->exec() )
{
- addRasterLayer( wmss->connInfo(),
+ addRasterLayer( wmss->connectionInfo(),
wmss->connName(),
"wms",
wmss->selectedLayers(),
Modified: trunk/qgis/src/app/qgsdbsourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsdbsourceselect.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgsdbsourceselect.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -386,17 +386,17 @@
// Need to escape the password to allow for single quotes and backslashes
- QgsDebugMsg( "Connection info: " + uri.connInfo() );
+ QgsDebugMsg( "Connection info: " + uri.connectionInfo() );
if ( makeConnection )
{
- m_connInfo = uri.connInfo();
- //qDebug(m_connInfo);
+ m_connectionInfo = uri.connectionInfo();
+ //qDebug(m_connectionInfo);
// Tidy up an existing connection if one exists.
if ( pd != 0 )
PQfinish( pd );
- pd = PQconnectdb( m_connInfo.toLocal8Bit() ); // use what is set based on locale; after connecting, use Utf8
+ pd = PQconnectdb( m_connectionInfo.toLocal8Bit() ); // use what is set based on locale; after connecting, use Utf8
if ( PQstatus( pd ) == CONNECTION_OK )
{
//qDebug("Connection succeeded");
@@ -458,9 +458,9 @@
return m_selectedTables;
}
-QString QgsDbSourceSelect::connInfo()
+QString QgsDbSourceSelect::connectionInfo()
{
- return m_connInfo;
+ return m_connectionInfo;
}
void QgsDbSourceSelect::setSql( const QModelIndex& index )
@@ -516,7 +516,7 @@
if ( mColumnTypeThread == NULL )
{
mColumnTypeThread = new QgsGeomColumnTypeThread();
- mColumnTypeThread->setConnInfo( m_connInfo );
+ mColumnTypeThread->setConnInfo( m_connectionInfo );
}
mColumnTypeThread->addGeometryColumn( schema, table, column );
}
Modified: trunk/qgis/src/app/qgsdbsourceselect.h
===================================================================
--- trunk/qgis/src/app/qgsdbsourceselect.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgsdbsourceselect.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -70,7 +70,7 @@
//! String list containing the selected tables
QStringList selectedTables();
//! Connection info (database, host, user, password)
- QString connInfo();
+ QString connectionInfo();
// Store the selected database
void dbChanged();
// Utility function to construct the query for finding out the
@@ -133,7 +133,7 @@
QStringList mColumnLabels;
// Our thread for doing long running queries
QgsGeomColumnTypeThread* mColumnTypeThread;
- QString m_connInfo;
+ QString m_connectionInfo;
QStringList m_selectedTables;
// Storage for the range of layer type icons
QMap<QString, QPair<QString, QIcon> > mLayerIcons;
Modified: trunk/qgis/src/app/qgsnewconnection.cpp
===================================================================
--- trunk/qgis/src/app/qgsnewconnection.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgsnewconnection.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -110,9 +110,9 @@
QgsDataSourceURI uri;
uri.setConnection( txtHost->text(), txtPort->text(), txtDatabase->text(), txtUsername->text(), txtPassword->text() );
- QgsLogger::debug( "PQconnectdb(" + uri.connInfo() + ");" );
+ QgsLogger::debug( "PQconnectdb(" + uri.connectionInfo() + ");" );
- PGconn *pd = PQconnectdb( uri.connInfo().toLocal8Bit().data() );
+ PGconn *pd = PQconnectdb( uri.connectionInfo().toLocal8Bit().data() );
if ( PQstatus( pd ) == CONNECTION_OK )
{
// Database successfully opened; we can now issue SQL commands.
Modified: trunk/qgis/src/app/qgspgquerybuilder.cpp
===================================================================
--- trunk/qgis/src/app/qgspgquerybuilder.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgspgquerybuilder.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -42,11 +42,11 @@
setupGuiViews();
// The query builder must make its own connection to the database when
// using this constructor
- QString connInfo = mUri->connInfo();
+ QString connectionInfo = mUri->connectionInfo();
- QgsDebugMsg( "Attempting connect using: " + connInfo );
+ QgsDebugMsg( "Attempting connect using: " + connectionInfo );
- mPgConnection = PQconnectdb( connInfo.toLocal8Bit().data() ); // use what is set based on locale; after connecting, use Utf8
+ mPgConnection = PQconnectdb( connectionInfo.toLocal8Bit().data() ); // use what is set based on locale; after connecting, use Utf8
// check the connection status
if ( PQstatus( mPgConnection ) == CONNECTION_OK )
{
Modified: trunk/qgis/src/app/qgsserversourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsserversourceselect.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgsserversourceselect.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -319,9 +319,9 @@
connStringParts += settings.value( key + "/url" ).toString();
m_connName = cmbConnections->currentText();
- m_connInfo = connStringParts.join( " " );
+ m_connectionInfo = connStringParts.join( " " );
- QgsDebugMsg( QString( "Connection info: '%1'." ).arg( m_connInfo ) );
+ QgsDebugMsg( QString( "Connection info: '%1'." ).arg( m_connectionInfo ) );
// TODO: Create and bind to data provider
@@ -330,7 +330,7 @@
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
mWmsProvider =
- ( QgsWmsProvider* ) pReg->getProvider( "wms", m_connInfo );
+ ( QgsWmsProvider* ) pReg->getProvider( "wms", m_connectionInfo );
if ( mWmsProvider )
{
@@ -528,9 +528,9 @@
return m_connName;
}
-QString QgsServerSourceSelect::connInfo()
+QString QgsServerSourceSelect::connectionInfo()
{
- return m_connInfo;
+ return m_connectionInfo;
}
QStringList QgsServerSourceSelect::selectedLayers()
Modified: trunk/qgis/src/app/qgsserversourceselect.h
===================================================================
--- trunk/qgis/src/app/qgsserversourceselect.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/app/qgsserversourceselect.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -54,7 +54,7 @@
QString connName();
//! Connection info (uri)
- QString connInfo();
+ QString connectionInfo();
//! Connection Proxy Host
QString connProxyHost();
@@ -147,7 +147,7 @@
QString m_connName;
//! URI for selected connection
- QString m_connInfo;
+ QString m_connectionInfo;
//! Proxy Host for selected connection
QString m_connProxyHost;
Modified: trunk/qgis/src/core/qgsdatasourceuri.cpp
===================================================================
--- trunk/qgis/src/core/qgsdatasourceuri.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/core/qgsdatasourceuri.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -269,36 +269,36 @@
return pval;
}
-QString QgsDataSourceURI::connInfo() const
+QString QgsDataSourceURI::connectionInfo() const
{
- QString connInfo = "dbname='" + mDatabase + "'";
+ QString connectionInfo = "dbname='" + mDatabase + "'";
if ( mHost != "" )
{
- connInfo += " host=" + mHost;
+ connectionInfo += " host=" + mHost;
if ( mPort != "" )
- connInfo += " port=" + mPort;
+ connectionInfo += " port=" + mPort;
}
if ( mUsername != "" )
{
- connInfo += " user='" + mUsername + "'"; //needs to be escaped
+ connectionInfo += " user='" + mUsername + "'"; //needs to be escaped
if ( mPassword != "" )
{
QString p = mPassword;
p.replace( '\\', "\\\\" );
p.replace( '\'', "\\'" );
- connInfo += " password='" + p + "'";
+ connectionInfo += " password='" + p + "'";
}
}
- return connInfo;
+ return connectionInfo;
}
QString QgsDataSourceURI::uri() const
{
- return connInfo()
+ return connectionInfo()
+ QString( " table=%1 (%2) sql=%3" )
.arg( quotedTablename() )
.arg( mGeometryColumn )
Modified: trunk/qgis/src/core/qgsdatasourceuri.h
===================================================================
--- trunk/qgis/src/core/qgsdatasourceuri.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/core/qgsdatasourceuri.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -39,7 +39,7 @@
QgsDataSourceURI( QString uri );
//! return connection part of URI
- QString connInfo() const;
+ QString connectionInfo() const;
//! return complete uri
QString uri() const;
Modified: trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp
===================================================================
--- trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -100,10 +100,10 @@
QgsDataSourceURI uri( lyr->source() );
- QgsDebugMsg( "data source = " + uri.connInfo() );
+ QgsDebugMsg( "data source = " + uri.connectionInfo() );
// connect to the database and check the capabilities
- PGconn *capTest = PQconnectdb( uri.connInfo().toUtf8() );
+ PGconn *capTest = PQconnectdb( uri.connectionInfo().toUtf8() );
if ( PQstatus( capTest ) == CONNECTION_OK )
{
postgisVersion( capTest );
@@ -135,7 +135,7 @@
}
}
// connect to the database
- PGconn *conn = PQconnectdb( uri.connInfo().toUtf8() );
+ PGconn *conn = PQconnectdb( uri.connectionInfo().toUtf8() );
if ( PQstatus( conn ) == CONNECTION_OK )
{
// populate the schema drop-down
@@ -305,7 +305,7 @@
if ( bb->addLayerToMap() )
{
// create the connection string
- QString newLayerSource = uri.connInfo();
+ QString newLayerSource = uri.connectionInfo();
QgsDebugMsg( "newLayerSource: " + newLayerSource );
// add the schema.table and geometry column
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -2688,7 +2688,7 @@
{
// Construct OGR DSN
QgsDataSourceURI dsUri( provider->dataSourceUri() );
- uri = "PG:" + dsUri.connInfo();
+ uri = "PG:" + dsUri.connectionInfo();
if ( dsUri.schema() != "" )
{
Modified: trunk/qgis/src/plugins/spit/qgsspit.cpp
===================================================================
--- trunk/qgis/src/plugins/spit/qgsspit.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/plugins/spit/qgsspit.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -420,7 +420,7 @@
settings.value( key + "/username" ).toString(),
password );
- conn = PQconnectdb( uri.connInfo().toUtf8() );
+ conn = PQconnectdb( uri.connectionInfo().toUtf8() );
}
if ( conn == NULL || PQstatus( conn ) != CONNECTION_OK )
Modified: trunk/qgis/src/plugins/spit/qgsspit.h
===================================================================
--- trunk/qgis/src/plugins/spit/qgsspit.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/plugins/spit/qgsspit.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -48,7 +48,7 @@
//! Return a list of selected tables
QStringList selectedTables();
//! Return the connection info
- QString connInfo();
+ QString connectionInfo();
//! Create a new PostgreSQL connection
void newConnection();
//! Edit a PostgreSQL connection
Modified: trunk/qgis/src/providers/postgres/qgspostgrescountthread.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgrescountthread.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgrescountthread.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -47,7 +47,7 @@
void QgsPostgresCountThread::setConnInfo( QString s )
{
- connInfo = s;
+ connectionInfo = s;
}
void QgsPostgresCountThread::setTableName( QString s )
@@ -74,12 +74,12 @@
void QgsPostgresCountThread::run()
{
// // placeholders for now.
-// QString connInfo;
+// QString connectionInfo;
QgsDebugMsg( "QgsPostgresCountThread: Started running." );
// Open another connection to the database
- PGconn *connection = PQconnectdb( connInfo.toUtf8() );
+ PGconn *connection = PQconnectdb( connectionInfo.toUtf8() );
// get the extents
Modified: trunk/qgis/src/providers/postgres/qgspostgrescountthread.h
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgrescountthread.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgrescountthread.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -92,7 +92,7 @@
/**
*
*/
- QString connInfo;
+ QString connectionInfo;
/**
* Name of the table with no schema
Modified: trunk/qgis/src/providers/postgres/qgspostgresextentthread.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresextentthread.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgresextentthread.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -50,7 +50,7 @@
void QgsPostgresExtentThread::setConnInfo( QString s )
{
- connInfo = s;
+ connectionInfo = s;
}
void QgsPostgresExtentThread::setTableName( QString s )
@@ -77,12 +77,12 @@
void QgsPostgresExtentThread::run()
{
// // placeholders for now.
-// QString connInfo;
+// QString connectionInfo;
QgsDebugMsg( "Started running." );
// Open another connection to the database
- PGconn *connection = PQconnectdb( connInfo.toUtf8() );
+ PGconn *connection = PQconnectdb( connectionInfo.toUtf8() );
// get the extents
Modified: trunk/qgis/src/providers/postgres/qgspostgresextentthread.h
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresextentthread.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgresextentthread.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -111,7 +111,7 @@
/**
*
*/
- QString connInfo;
+ QString connectionInfo;
/**
* Name of the table with no schema
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2008-10-20 20:24:36 UTC (rev 9502)
@@ -81,14 +81,14 @@
QgsDebugMsg( "Table name is " + mTableName );
QgsDebugMsg( "SQL is " + sqlWhereClause );
- QgsDebugMsg( "Connection info is " + mUri.connInfo() );
+ QgsDebugMsg( "Connection info is " + mUri.connectionInfo() );
QgsDebugMsg( "Geometry column is: " + geometryColumn );
QgsDebugMsg( "Schema is: " + mSchemaName );
QgsDebugMsg( "Table name is: " + mTableName );
connectionRW = NULL;
- connectionRO = Conn::connectDb( mUri.connInfo(), true );
+ connectionRO = Conn::connectDb( mUri.connectionInfo(), true );
if ( connectionRO == NULL )
{
valid = false;
@@ -205,7 +205,7 @@
#ifdef POSTGRESQL_THREADS
QgsDebugMsg( "About to touch mExtentThread" );
- mExtentThread.setConnInfo( mUri.connInfo );
+ mExtentThread.setConnInfo( mUri.connectionInfo );
mExtentThread.setTableName( mTableName );
mExtentThread.setSqlWhereClause( sqlWhereClause );
mExtentThread.setGeometryColumn( geometryColumn );
@@ -215,7 +215,7 @@
QgsDebugMsg( "Main thread just dispatched mExtentThread" );
QgsDebugMsg( "About to touch mCountThread" );
- mCountThread.setConnInfo( mUri.connInfo );
+ mCountThread.setConnInfo( mUri.connectionInfo );
mCountThread.setTableName( mTableName );
mCountThread.setSqlWhereClause( sqlWhereClause );
mCountThread.setGeometryColumn( geometryColumn );
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.h
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.h 2008-10-20 20:08:43 UTC (rev 9501)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.h 2008-10-20 20:24:36 UTC (rev 9502)
@@ -666,7 +666,7 @@
if ( connectionRW )
return connectionRW;
- connectionRW = Conn::connectDb( mUri.connInfo(), false );
+ connectionRW = Conn::connectDb( mUri.connectionInfo(), false );
return connectionRW;
}
More information about the QGIS-commit
mailing list