mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added some extra debug info for project path
This commit is contained in:
parent
e07596c421
commit
6186c9f0ac
@ -242,6 +242,11 @@ int main( int argc, char * argv[] )
|
||||
if ( mapFileIt != parameterMap.end() )
|
||||
{
|
||||
configFilePath = mapFileIt->second;
|
||||
QgsDebugMsg( QString( "Configuration file path set to: %1" ).arg( defaultConfigFilePath ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( QString( "Using default configuration file path: %1" ).arg( defaultConfigFilePath ) );
|
||||
}
|
||||
|
||||
QgsConfigParser* adminConfigParser = QgsConfigCache::instance()->searchConfiguration( configFilePath );
|
||||
|
@ -149,6 +149,7 @@ void QgsProjectParser::addLayers( QDomDocument &doc,
|
||||
{
|
||||
//add layers from other project files and embed into this group
|
||||
QString project = convertToAbsolutePath( currentChildElem.attribute( "project" ) );
|
||||
QgsDebugMsg( QString( "Project path: %1" ).arg( project ) );
|
||||
QString embeddedGroupName = currentChildElem.attribute( "name" );
|
||||
QgsProjectParser* p = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( project ) );
|
||||
if ( p )
|
||||
@ -360,7 +361,9 @@ QList<QgsMapLayer*> QgsProjectParser::mapLayerFromStyle( const QString& lName, c
|
||||
{
|
||||
if ( groupIt->attribute( "embedded" ) == "1" ) //requested group is embedded from another project
|
||||
{
|
||||
QgsProjectParser* p = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath( groupIt->attribute( "project" ) ) ) );
|
||||
QString project = convertToAbsolutePath( groupIt->attribute( "project" ) );
|
||||
QgsDebugMsg( QString( "Project path: %1" ).arg( project ) );
|
||||
QgsProjectParser* p = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( project ) );
|
||||
if ( p )
|
||||
{
|
||||
QList<QDomElement> pGroupElems = p->legendGroupElements();
|
||||
@ -417,6 +420,7 @@ QList<QgsMapLayer*> QgsProjectParser::mapLayerFromStyle( const QString& lName, c
|
||||
{
|
||||
QString id = layerIt.value().attribute( "id" );
|
||||
QString project = layerIt.value().attribute( "project" );
|
||||
QgsDebugMsg( QString( "Project path: %1" ).arg( project ) );
|
||||
|
||||
//get config parser from cache
|
||||
QgsProjectParser* otherParser = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( project ) );
|
||||
@ -443,7 +447,9 @@ QList<QgsMapLayer*> QgsProjectParser::mapLayerFromStyle( const QString& lName, c
|
||||
{
|
||||
if ( groupIt->attribute( "embedded" ) == "1" )
|
||||
{
|
||||
QgsProjectParser* p = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath( groupIt->attribute( "project" ) ) ) );
|
||||
QString project = convertToAbsolutePath( groupIt->attribute( "project" ) );
|
||||
QgsDebugMsg( QString( "Project path: %1" ).arg( project ) );
|
||||
QgsProjectParser* p = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( project ) );
|
||||
if ( p )
|
||||
{
|
||||
QMap< QString, QDomElement > pLayers = p->projectLayerElementsByName();
|
||||
@ -889,7 +895,9 @@ QgsMapLayer* QgsProjectParser::createLayerFromElement( const QDomElement& elem )
|
||||
}
|
||||
else if ( elem.attribute( "embedded" ) == "1" ) //layer is embedded from another project file
|
||||
{
|
||||
QgsProjectParser* otherConfig = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( convertToAbsolutePath( elem.attribute( "project" ) ) ) );
|
||||
QString project = convertToAbsolutePath( elem.attribute( "project" ) );
|
||||
QgsDebugMsg( QString( "Project path: %1" ).arg( project ) );
|
||||
QgsProjectParser* otherConfig = dynamic_cast<QgsProjectParser*>( QgsConfigCache::instance()->searchConfiguration( project ) );
|
||||
if ( !otherConfig )
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user