Skip to content
Permalink
Browse files
Further updates to places provider registry called pluginPath to make…
… it use providerPath now
  • Loading branch information
timlinux committed Nov 23, 2011
1 parent fa4686a commit 0116951cd78bc4da10a7096fa84c772325ca3b72
Showing with 10 additions and 10 deletions.
  1. +4 −4 src/core/qgsproviderregistry.cpp
  2. +2 −2 src/core/qgsproviderregistry.h
  3. +3 −3 src/mapserver/qgis_map_serv.cpp
  4. +1 −1 tests/bench/main.cpp
@@ -46,11 +46,11 @@ typedef QString protocolDrivers_t();

QgsProviderRegistry *QgsProviderRegistry::_instance = 0;

QgsProviderRegistry *QgsProviderRegistry::instance( QString pluginPath )
QgsProviderRegistry *QgsProviderRegistry::instance( QString providerPath )
{
if ( _instance == 0 )
{
_instance = new QgsProviderRegistry( pluginPath );
_instance = new QgsProviderRegistry( providerPath );
}

return _instance;
@@ -59,7 +59,7 @@ QgsProviderRegistry *QgsProviderRegistry::instance( QString pluginPath )



QgsProviderRegistry::QgsProviderRegistry( QString pluginPath )
QgsProviderRegistry::QgsProviderRegistry( QString providerPath )
{
// At startup, examine the libs in the qgis/lib dir and store those that
// are a provider shared lib
@@ -71,7 +71,7 @@ QgsProviderRegistry::QgsProviderRegistry( QString pluginPath )
int bin = appDir.findRev("/bin", -1, false);
QString baseDir = appDir.left(bin);
QString mLibraryDirectory = baseDir + "/lib"; */
mLibraryDirectory = pluginPath;
mLibraryDirectory = providerPath;

mLibraryDirectory.setSorting( QDir::Name | QDir::IgnoreCase );
mLibraryDirectory.setFilter( QDir::Files | QDir::NoSymLinks );
@@ -43,7 +43,7 @@ class CORE_EXPORT QgsProviderRegistry
public:

/** means of accessing canonical single instance */
static QgsProviderRegistry* instance( QString pluginPath = QString::null );
static QgsProviderRegistry* instance( QString providerPath = QString::null );

/** Virtual dectructor */
virtual ~QgsProviderRegistry();
@@ -143,7 +143,7 @@ class CORE_EXPORT QgsProviderRegistry
private:

/** ctor private since instance() creates it */
QgsProviderRegistry( QString pluginPath );
QgsProviderRegistry( QString providerPath );

/** pointer to canonical Singleton object */
static QgsProviderRegistry* _instance;
@@ -164,10 +164,10 @@ int main( int argc, char * argv[] )
}
#endif

// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
// Instantiate the provider directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::providerPath() );
QgsDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() );
QgsDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() );
QgsDebugMsg( "Provider PATH: " + QgsApplication::providerPath() );
QgsDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() );
QgsDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() );

@@ -367,7 +367,7 @@ int main( int argc, char *argv[] )
QgsApplication::setOrganizationDomain( "qgis.org" );
QgsApplication::setApplicationName( "QGIS" );

QgsProviderRegistry::instance( QgsApplication::pluginPath() );
QgsProviderRegistry::instance( QgsApplication::providerPath() );

#ifdef Q_OS_MACX
// If the GDAL plugins are bundled with the application and GDAL_DRIVER_PATH

0 comments on commit 0116951

Please sign in to comment.