equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: VideoCollectionWrapperPrivate class implementation |
14 * Description: VideoCollectionWrapperPrivate class implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: % |
18 // Version : %version: 27 % |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include <qapplication.h> |
21 #include <qapplication.h> |
22 #include <qabstractitemmodel.h> |
22 #include <qabstractitemmodel.h> |
23 #include <vcxmyvideosdefs.h> |
23 #include <vcxmyvideosdefs.h> |
38 // ----------------------------------------------------------------------------- |
38 // ----------------------------------------------------------------------------- |
39 // |
39 // |
40 VideoCollectionWrapperPrivate::VideoCollectionWrapperPrivate() |
40 VideoCollectionWrapperPrivate::VideoCollectionWrapperPrivate() |
41 : mAllVideosModel( 0 ) |
41 : mAllVideosModel( 0 ) |
42 , mCollectionsModel( 0 ) |
42 , mCollectionsModel( 0 ) |
|
43 , mCollectionContentModel( 0 ) |
43 , mGenericModel( 0 ) |
44 , mGenericModel( 0 ) |
44 , mSourceModel( 0 ) |
45 , mSourceModel( 0 ) |
|
46 , mAboutToClose( false ) |
45 { |
47 { |
46 FUNC_LOG; |
48 FUNC_LOG; |
47 // NOP |
49 // NOP |
48 } |
50 } |
49 |
51 |
52 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
53 // |
55 // |
54 VideoCollectionWrapperPrivate::~VideoCollectionWrapperPrivate() |
56 VideoCollectionWrapperPrivate::~VideoCollectionWrapperPrivate() |
55 { |
57 { |
56 FUNC_LOG; |
58 FUNC_LOG; |
57 // NOP here |
|
58 } |
59 } |
59 |
60 |
60 |
61 |
61 // ----------------------------------------------------------------------------- |
62 // ----------------------------------------------------------------------------- |
62 // VideoCollectionWrapperPrivate::getModel() |
63 // VideoCollectionWrapperPrivate::getModel() |
65 VideoSortFilterProxyModel* VideoCollectionWrapperPrivate::getModel(VideoCollectionCommon::TModelType &type) |
66 VideoSortFilterProxyModel* VideoCollectionWrapperPrivate::getModel(VideoCollectionCommon::TModelType &type) |
66 { |
67 { |
67 FUNC_LOG; |
68 FUNC_LOG; |
68 INFO_1("VideoCollectionWrapperPrivate::getModel() type: %d", type); |
69 INFO_1("VideoCollectionWrapperPrivate::getModel() type: %d", type); |
69 |
70 |
|
71 if(mAboutToClose) |
|
72 { |
|
73 return 0; |
|
74 } |
|
75 |
70 VideoSortFilterProxyModel *model = 0; |
76 VideoSortFilterProxyModel *model = 0; |
71 if(!mSourceModel) |
77 if(!mSourceModel) |
72 { |
78 { |
73 mSourceModel = new VideoListDataModel(); |
79 mSourceModel = new VideoListDataModel(); |
74 if(!mSourceModel || mSourceModel->initialize() < 0 || |
80 if(!mSourceModel || mSourceModel->initialize() < 0 || |
141 { |
147 { |
142 FUNC_LOG; |
148 FUNC_LOG; |
143 if(!mSourceModel.isNull()) |
149 if(!mSourceModel.isNull()) |
144 { |
150 { |
145 delete mSourceModel; |
151 delete mSourceModel; |
|
152 delete mAllVideosModel; |
|
153 delete mCollectionsModel; |
|
154 delete mCollectionContentModel; |
|
155 delete mGenericModel; |
|
156 mAboutToClose = true; |
146 } |
157 } |
147 } |
158 } |
148 |
159 |
149 // End of file |
160 // End of file |