1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: stub Videosortfilterproxymodel for VideoCollectionWrapperPrivate unit tests |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <qstringlist.h> |
|
19 #include <qtimer.h> |
|
20 #include <qdatetime.h> |
|
21 |
|
22 #include "videocollectioncommon.h" |
|
23 #include "videosortfilterproxymodel.h" |
|
24 #include "videolistdatamodel.h" |
|
25 #include "videocollectionclient.h" |
|
26 |
|
27 bool gInitFails = false; |
|
28 |
|
29 bool gFetchMediaIDFails = false; |
|
30 |
|
31 bool gFailDeleteFile = false; |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // setInitFailure |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 void VideoSortFilterProxyModel::setInitFailure(bool fails) |
|
38 { |
|
39 gInitFails = fails; |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // VideoSortFilterProxyModel::VideoSortFilterProxyModel |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 VideoSortFilterProxyModel::VideoSortFilterProxyModel(int type, QObject *parent) : |
|
47 QObject(parent), |
|
48 mModel(0), |
|
49 mType(type) |
|
50 { |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // VideoSortFilterProxyModel::~VideoSortFilterProxyModel |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 VideoSortFilterProxyModel::~VideoSortFilterProxyModel() |
|
58 { |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // VideoSortFilterProxyModel::initialize |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 int VideoSortFilterProxyModel::initialize(VideoListDataModel *sourceModel) |
|
66 { |
|
67 mModel = sourceModel; |
|
68 return gInitFails ? -1 : 0; |
|
69 } |
|
70 // end of file |
|