mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Further updates to places provider registry called pluginPath to make it use providerPath now
This commit is contained in:
parent
fa4686a509
commit
0116951cd7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user