videocollection/tsrc/stubs/src/videocollectionuiloader.cpp
changeset 24 7d93ee07fb27
parent 17 69946d1824c4
child 47 45e72b57a2fd
equal deleted inserted replaced
20:b9e04db066d4 24:7d93ee07fb27
    95 {
    95 {
    96     QObjectList list = HbDocumentLoader::load(fileName, section, ok);
    96     QObjectList list = HbDocumentLoader::load(fileName, section, ok);
    97     storeOrphans(list);
    97     storeOrphans(list);
    98 }
    98 }
    99 
    99 
   100 QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name)
   100 QGraphicsWidget* VideoCollectionUiLoader::doFindWidget(const QString &name, bool loadIfNotFound)
   101 {
   101 {
       
   102     Q_UNUSED(loadIfNotFound);
   102     QGraphicsWidget *widget = 0;
   103     QGraphicsWidget *widget = 0;
   103     if(VideoCollectionUiLoaderData::mFindFailure)
   104     if(VideoCollectionUiLoaderData::mFindFailure)
   104     {
   105     {
   105         return 0; 
   106         return 0; 
   106     }
   107     }
   109         widget = HbDocumentLoader::findWidget(name);
   110         widget = HbDocumentLoader::findWidget(name);
   110     }
   111     }
   111     return widget;
   112     return widget;
   112 }
   113 }
   113 
   114 
   114 QObject* VideoCollectionUiLoader::doFindObject(const QString &name)
   115 QObject* VideoCollectionUiLoader::doFindObject(const QString &name, bool loadIfNotFound)
   115 {
   116 {
       
   117     Q_UNUSED(loadIfNotFound);
   116     QObject *object = 0;
   118     QObject *object = 0;
   117     if(VideoCollectionUiLoaderData::mFindFailure)
   119     if(VideoCollectionUiLoaderData::mFindFailure)
   118     {
   120     {
   119         return 0; 
   121         return 0; 
   120     }
   122     }
   197 }
   199 }
   198 
   200 
   199 QObject* VideoCollectionUiLoader::createObject(const QString& type,
   201 QObject* VideoCollectionUiLoader::createObject(const QString& type,
   200     const QString &name)
   202     const QString &name)
   201 {
   203 {
   202     QObject* object = doFindObject(name);
   204     QObject* object = doFindObject(name, true);
   203     if (!object)
   205     if (!object)
   204     {
   206     {
   205         if (name == DOCML_NAME_VIEW)
   207         if (name == DOCML_NAME_VIEW)
   206         {
   208         {
   207             object = new VideoListView(this);
   209             object = new VideoListView(this);