ResourceDB: added Doxygen comments
Documented the ResourceDB class and all its members.
This commit is contained in:
@@ -278,7 +278,7 @@ qDebug() << "read dir" << d.canonicalPath();
|
||||
{
|
||||
ResourceItem::Relation * item = *it;
|
||||
it = curParent->children().erase( it );
|
||||
database()->recursiveRemoveItems( item );
|
||||
database()->removeItemsRecursively( item );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ void ResourceDB::init()
|
||||
|
||||
void ResourceDB::load( const QString & _file )
|
||||
{
|
||||
recursiveRemoveItems( topLevelNode(), false );
|
||||
removeItemsRecursively( topLevelNode(), false );
|
||||
|
||||
multimediaProject m( _file );
|
||||
|
||||
@@ -283,7 +283,7 @@ void ResourceDB::addItem( ResourceItem * newItem )
|
||||
ResourceItem::Relation * oldRelation = oldItem->relation();
|
||||
if( oldRelation )
|
||||
{
|
||||
recursiveRemoveItems( oldRelation, false );
|
||||
removeItemsRecursively( oldRelation, false );
|
||||
delete oldRelation;
|
||||
}
|
||||
if( oldItem->type() == ResourceItem::TypeDirectory )
|
||||
@@ -299,8 +299,8 @@ void ResourceDB::addItem( ResourceItem * newItem )
|
||||
|
||||
|
||||
|
||||
void ResourceDB::recursiveRemoveItems( ResourceItem::Relation * parent,
|
||||
bool removeTopLevelParent )
|
||||
void ResourceDB::removeItemsRecursively( ResourceItem::Relation * parent,
|
||||
bool removeParent )
|
||||
{
|
||||
if( !parent )
|
||||
{
|
||||
@@ -309,10 +309,10 @@ void ResourceDB::recursiveRemoveItems( ResourceItem::Relation * parent,
|
||||
|
||||
while( !parent->children().isEmpty() )
|
||||
{
|
||||
recursiveRemoveItems( parent->children().front() );
|
||||
removeItemsRecursively( parent->children().front() );
|
||||
}
|
||||
|
||||
if( removeTopLevelParent && parent->item() )
|
||||
if( removeParent && parent->item() )
|
||||
{
|
||||
if( parent->item()->type() == ResourceItem::TypeDirectory )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user