Commit 2438c83b authored by Frédéric Larue's avatar Frédéric Larue
Browse files

GetByContent() function added to UIProject.

parent c6d7906f
......@@ -72,6 +72,14 @@ GenericUIData* UIProject::GetByFilename( const QString& filename )
}
GenericUIData* UIProject::GetByContent( const void* content )
{
for( auto d : m_ItemByNames )
if( d->RawContent() == content )
return d;
}
void UIProject::Remove( GenericUIData* data )
{
m_ItemByNames.remove( data->GetFileName() );
......
......@@ -49,6 +49,7 @@ public:
void RemoveAndDelete( GenericUIData* data );
void RemoveAndDeleteAll();
GenericUIData* GetByFilename( const QString& filename );
GenericUIData* GetByContent( const void* content );
inline const UIDataMap& GetAll() const { return m_ItemByNames; }
virtual void OnAddingData( GenericUIData *data ) {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment