mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add debug output to pinpoint strange path origin
This commit is contained in:
parent
773fa0fcd5
commit
8167167bc9
@ -1538,6 +1538,40 @@ private:
|
||||
std::map<QString, QString> m_oldPathToPathIdMap;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void reportOnStrangePath( caf::PdmObjectHandle* object )
|
||||
{
|
||||
if ( !object ) return;
|
||||
|
||||
std::vector<caf::PdmField<caf::FilePath>*> fields;
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> allFieldsInObject;
|
||||
object->fields( allFieldsInObject );
|
||||
|
||||
std::vector<caf::PdmObjectHandle*> children;
|
||||
|
||||
for ( const auto& field : allFieldsInObject )
|
||||
{
|
||||
caf::PdmField<caf::FilePath>* typedField = dynamic_cast<caf::PdmField<caf::FilePath>*>( field );
|
||||
if ( typedField && ( ( *typedField )().path() == "/private/hhgs" ) )
|
||||
{
|
||||
fields.push_back( typedField );
|
||||
std::cout << "Found path: " << typedField->ownerObject()->xmlCapability()->classKeyword().toStdString()
|
||||
<< "." << typedField->keyword().toStdString() << ": " << ( *typedField )().path().toStdString()
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
field->childObjects( &children );
|
||||
}
|
||||
|
||||
for ( const auto& child : children )
|
||||
{
|
||||
reportOnStrangePath( child );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1545,6 +1579,8 @@ void RimProject::transferPathsToGlobalPathList()
|
||||
{
|
||||
GlobalPathListMapper pathListMapper( m_globalPathList() );
|
||||
|
||||
reportOnStrangePath( this );
|
||||
|
||||
std::vector<caf::FilePath*> filePaths;
|
||||
fieldContentsByType( this, filePaths );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user