Skip to content

Commit

Permalink
Further updates to places provider registry called pluginPath to make…
Browse files Browse the repository at this point in the history
… it use providerPath now
  • Loading branch information
timlinux committed Nov 23, 2011
1 parent fa4686a commit 0116951
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/core/qgsproviderregistry.cpp
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsproviderregistry.h
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/mapserver/qgis_map_serv.cpp
Expand Up @@ -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() );

Expand Down
2 changes: 1 addition & 1 deletion tests/bench/main.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 0116951

Please sign in to comment.