mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -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 = 0;
|
||||||
|
|
||||||
QgsProviderRegistry *QgsProviderRegistry::instance( QString pluginPath )
|
QgsProviderRegistry *QgsProviderRegistry::instance( QString providerPath )
|
||||||
{
|
{
|
||||||
if ( _instance == 0 )
|
if ( _instance == 0 )
|
||||||
{
|
{
|
||||||
_instance = new QgsProviderRegistry( pluginPath );
|
_instance = new QgsProviderRegistry( providerPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
return _instance;
|
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
|
// At startup, examine the libs in the qgis/lib dir and store those that
|
||||||
// are a provider shared lib
|
// are a provider shared lib
|
||||||
@ -71,7 +71,7 @@ QgsProviderRegistry::QgsProviderRegistry( QString pluginPath )
|
|||||||
int bin = appDir.findRev("/bin", -1, false);
|
int bin = appDir.findRev("/bin", -1, false);
|
||||||
QString baseDir = appDir.left(bin);
|
QString baseDir = appDir.left(bin);
|
||||||
QString mLibraryDirectory = baseDir + "/lib"; */
|
QString mLibraryDirectory = baseDir + "/lib"; */
|
||||||
mLibraryDirectory = pluginPath;
|
mLibraryDirectory = providerPath;
|
||||||
|
|
||||||
mLibraryDirectory.setSorting( QDir::Name | QDir::IgnoreCase );
|
mLibraryDirectory.setSorting( QDir::Name | QDir::IgnoreCase );
|
||||||
mLibraryDirectory.setFilter( QDir::Files | QDir::NoSymLinks );
|
mLibraryDirectory.setFilter( QDir::Files | QDir::NoSymLinks );
|
||||||
|
@ -43,7 +43,7 @@ class CORE_EXPORT QgsProviderRegistry
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
/** means of accessing canonical single instance */
|
/** means of accessing canonical single instance */
|
||||||
static QgsProviderRegistry* instance( QString pluginPath = QString::null );
|
static QgsProviderRegistry* instance( QString providerPath = QString::null );
|
||||||
|
|
||||||
/** Virtual dectructor */
|
/** Virtual dectructor */
|
||||||
virtual ~QgsProviderRegistry();
|
virtual ~QgsProviderRegistry();
|
||||||
@ -143,7 +143,7 @@ class CORE_EXPORT QgsProviderRegistry
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
/** ctor private since instance() creates it */
|
/** ctor private since instance() creates it */
|
||||||
QgsProviderRegistry( QString pluginPath );
|
QgsProviderRegistry( QString providerPath );
|
||||||
|
|
||||||
/** pointer to canonical Singleton object */
|
/** pointer to canonical Singleton object */
|
||||||
static QgsProviderRegistry* _instance;
|
static QgsProviderRegistry* _instance;
|
||||||
|
@ -164,10 +164,10 @@ int main( int argc, char * argv[] )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Instantiate the plugin directory so that providers are loaded
|
// Instantiate the provider directory so that providers are loaded
|
||||||
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
|
QgsProviderRegistry::instance( QgsApplication::providerPath() );
|
||||||
QgsDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() );
|
QgsDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() );
|
||||||
QgsDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() );
|
QgsDebugMsg( "Provider PATH: " + QgsApplication::providerPath() );
|
||||||
QgsDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() );
|
QgsDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() );
|
||||||
QgsDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() );
|
QgsDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() );
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ int main( int argc, char *argv[] )
|
|||||||
QgsApplication::setOrganizationDomain( "qgis.org" );
|
QgsApplication::setOrganizationDomain( "qgis.org" );
|
||||||
QgsApplication::setApplicationName( "QGIS" );
|
QgsApplication::setApplicationName( "QGIS" );
|
||||||
|
|
||||||
QgsProviderRegistry::instance( QgsApplication::pluginPath() );
|
QgsProviderRegistry::instance( QgsApplication::providerPath() );
|
||||||
|
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACX
|
||||||
// If the GDAL plugins are bundled with the application and GDAL_DRIVER_PATH
|
// If the GDAL plugins are bundled with the application and GDAL_DRIVER_PATH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user