Changeset View
Changeset View
Standalone View
Standalone View
autotests/trackslistenertest.cpp
Show All 14 Lines | |||||
15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "databasetestdata.h" | 18 | #include "databasetestdata.h" | ||
19 | 19 | | |||
20 | #include "trackslistener.h" | 20 | #include "trackslistener.h" | ||
21 | #include "mediaplaylist.h" | 21 | #include "mediaplaylist.h" | ||
22 | #include "databaseinterface.h" | 22 | #include "databaseinterface.h" | ||
23 | #include "datatypes.h" | ||||
23 | 24 | | |||
24 | #include "config-upnp-qt.h" | 25 | #include "config-upnp-qt.h" | ||
25 | 26 | | |||
26 | #include <QObject> | 27 | #include <QObject> | ||
27 | #include <QUrl> | 28 | #include <QUrl> | ||
28 | #include <QString> | 29 | #include <QString> | ||
29 | #include <QHash> | 30 | #include <QHash> | ||
30 | #include <QVector> | 31 | #include <QVector> | ||
Show All 22 Lines | 52 | private Q_SLOTS: | |||
53 | void initTestCase() | 54 | void initTestCase() | ||
54 | { | 55 | { | ||
55 | qRegisterMetaType<QHash<qulonglong,int>>("QHash<qulonglong,int>"); | 56 | qRegisterMetaType<QHash<qulonglong,int>>("QHash<qulonglong,int>"); | ||
56 | qRegisterMetaType<QHash<QString,QUrl>>("QHash<QString,QUrl>"); | 57 | qRegisterMetaType<QHash<QString,QUrl>>("QHash<QString,QUrl>"); | ||
57 | qRegisterMetaType<QList<MusicAudioTrack>>("QList<MusicAudioTrack>"); | 58 | qRegisterMetaType<QList<MusicAudioTrack>>("QList<MusicAudioTrack>"); | ||
58 | qRegisterMetaType<QVector<qlonglong>>("QVector<qlonglong>"); | 59 | qRegisterMetaType<QVector<qlonglong>>("QVector<qlonglong>"); | ||
59 | qRegisterMetaType<QHash<qlonglong,int>>("QHash<qlonglong,int>"); | 60 | qRegisterMetaType<QHash<qlonglong,int>>("QHash<qlonglong,int>"); | ||
60 | qRegisterMetaType<QList<QUrl>>("QList<QUrl>"); | 61 | qRegisterMetaType<QList<QUrl>>("QList<QUrl>"); | ||
61 | qRegisterMetaType<DatabaseInterface::ListTrackDataType>("ListTrackDataType"); | 62 | qRegisterMetaType<DataTypes::ListTrackDataType>("ListTrackDataType"); | ||
62 | qRegisterMetaType<DatabaseInterface::ListAlbumDataType>("ListAlbumDataType"); | 63 | qRegisterMetaType<DataTypes::ListAlbumDataType>("ListAlbumDataType"); | ||
63 | qRegisterMetaType<DatabaseInterface::ListArtistDataType>("ListArtistDataType"); | 64 | qRegisterMetaType<DataTypes::ListArtistDataType>("ListArtistDataType"); | ||
64 | qRegisterMetaType<DatabaseInterface::ListGenreDataType>("ListGenreDataType"); | 65 | qRegisterMetaType<DataTypes::ListGenreDataType>("ListGenreDataType"); | ||
65 | qRegisterMetaType<DatabaseInterface::TrackDataType>("TrackDataType"); | 66 | qRegisterMetaType<DataTypes::TrackDataType>("TrackDataType"); | ||
66 | qRegisterMetaType<DatabaseInterface::AlbumDataType>("AlbumDataType"); | 67 | qRegisterMetaType<DataTypes::AlbumDataType>("AlbumDataType"); | ||
67 | qRegisterMetaType<DatabaseInterface::ArtistDataType>("ArtistDataType"); | 68 | qRegisterMetaType<DataTypes::ArtistDataType>("ArtistDataType"); | ||
68 | qRegisterMetaType<DatabaseInterface::GenreDataType>("GenreDataType"); | 69 | qRegisterMetaType<DataTypes::GenreDataType>("GenreDataType"); | ||
69 | qRegisterMetaType<ElisaUtils::PlayListEntryType>("PlayListEntryType"); | 70 | qRegisterMetaType<ElisaUtils::PlayListEntryType>("PlayListEntryType"); | ||
70 | } | 71 | } | ||
71 | 72 | | |||
72 | void testTrackRemoval() | 73 | void testTrackRemoval() | ||
73 | { | 74 | { | ||
74 | MediaPlayList myPlayList; | 75 | MediaPlayList myPlayList; | ||
75 | DatabaseInterface myDatabaseContent; | 76 | DatabaseInterface myDatabaseContent; | ||
76 | TracksListener myListener(&myDatabaseContent); | 77 | TracksListener myListener(&myDatabaseContent); | ||
▲ Show 20 Lines • Show All 408 Lines • Show Last 20 Lines |