equal
deleted
inserted
replaced
|
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: Unit test helper for TestHelper |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "unittest_helper.h" |
|
19 |
|
20 |
|
21 TestHelper::TestHelper(QObject *parent) |
|
22 : QAbstractListModel(parent) |
|
23 { |
|
24 } |
|
25 |
|
26 TestHelper::~TestHelper() |
|
27 { |
|
28 } |
|
29 |
|
30 /*! |
|
31 Dummy function to satisfy QAbstractListModel inheritance. |
|
32 */ |
|
33 int TestHelper::rowCount( const QModelIndex &parent ) const |
|
34 { |
|
35 Q_UNUSED(parent); |
|
36 return 0; |
|
37 } |
|
38 |
|
39 /*! |
|
40 Dummy function to satisfy QAbstractListModel inheritance. |
|
41 */ |
|
42 QVariant TestHelper::data(const QModelIndex &index, int role) const |
|
43 { |
|
44 Q_UNUSED(index); |
|
45 Q_UNUSED(role); |
|
46 return QVariant(); |
|
47 } |
|
48 |
|
49 /*! |
|
50 Slot to be called when album art for the \a index needs to be updated. |
|
51 */ |
|
52 QModelIndex TestHelper::indexFor(int index) |
|
53 { |
|
54 return QAbstractItemModel::createIndex(index, 0); |
|
55 } |
|
56 |
|
57 // End of file |