Full use of StatisticsProvider object everywhere refactoring2-statistics
authorRalf Engels <ralf.engels@nokia.com>
Tue, 3 Jul 2012 14:41:25 +0000 (16:41 +0200)
committerRalf Engels <ralf.engels@nokia.com>
Thu, 19 Jul 2012 15:52:01 +0000 (17:52 +0200)
commit9aa0a9d3e672bd25334dbe2feca6ab4289266798
tree046fe74eb792e2e8c20aafa4bf42bc1bfa146173
parent782f604677fb95d8cb97d029e4c489d2c0896b9e
Full use of StatisticsProvider object everywhere

Remove the Meta::Track statistics functions in favor of a
StatisticsProvider object

- Track statistics handling is mostly the same. The statistics are stored
in the same location in the database. We can remove duplicate code now
- Enables us to get rid of the Capability classes.
- Removes a lot of "firstPlayed, lastPlayed, ..." functions from a lot of
tracks.
- Enables later on to refactor the database table layout, especially
when deleting tracks (and keeping the statistics).
90 files changed:
src/MainWindow.cpp
src/TrayIcon.cpp
src/context/applets/currenttrack/CurrentTrack.cpp
src/context/widgets/RecentlyPlayedListWidget.cpp
src/core-impl/collections/audiocd/AudioCdMeta.cpp
src/core-impl/collections/audiocd/AudioCdMeta.h
src/core-impl/collections/daap/DaapMeta.cpp
src/core-impl/collections/daap/DaapMeta.h
src/core-impl/collections/db/sql/CapabilityDelegateImpl.cpp
src/core-impl/collections/db/sql/SqlCollectionLocation.cpp
src/core-impl/collections/db/sql/SqlMeta.cpp
src/core-impl/collections/db/sql/SqlMeta.h
src/core-impl/collections/db/sql/SqlRegistry.cpp
src/core-impl/collections/db/sql/SqlRegistry.h
src/core-impl/collections/db/sql/SqlRegistry_p.cpp
src/core-impl/collections/db/sql/SqlRegistry_p.h
src/core-impl/collections/ipodcollection/IpodMeta.cpp
src/core-impl/collections/ipodcollection/IpodMeta.h
src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp
src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.h
src/core-impl/collections/mediadevicecollection/handler/MediaDeviceHandler.cpp
src/core-impl/collections/nepomukcollection/NepomukTrack.cpp
src/core-impl/collections/playdarcollection/PlaydarMeta.cpp
src/core-impl/collections/playdarcollection/PlaydarMeta.h
src/core-impl/collections/proxycollection/ProxyCollectionMeta.cpp
src/core-impl/collections/proxycollection/ProxyCollectionMeta.h
src/core-impl/collections/support/MemoryCustomValue.cpp
src/core-impl/collections/support/MemoryMeta.cpp
src/core-impl/collections/support/MemoryMeta.h
src/core-impl/collections/upnpcollection/UpnpMeta.cpp
src/core-impl/collections/upnpcollection/UpnpMeta.h
src/core-impl/meta/file/File.cpp
src/core-impl/meta/file/File.h
src/core-impl/meta/file/File_p.h
src/core-impl/meta/multi/MultiTrack.h
src/core-impl/meta/proxy/MetaProxy.cpp
src/core-impl/meta/proxy/MetaProxy.h
src/core-impl/meta/stream/Stream.cpp
src/core-impl/meta/stream/Stream.h
src/core-impl/meta/stream/Stream_p.h
src/core-impl/meta/timecode/TimecodeMeta.cpp
src/core-impl/meta/timecode/TimecodeMeta.h
src/core-impl/statistics/providers/url/PermanentUrlStatisticsProvider.cpp
src/core-impl/statistics/providers/url/PermanentUrlStatisticsProvider.h
src/core/CMakeLists.txt
src/core/capabilities/Capability.h
src/core/capabilities/StatisticsCapability.cpp [deleted file]
src/core/capabilities/StatisticsCapability.h [deleted file]
src/core/meta/Meta.cpp
src/core/meta/Meta.h
src/core/meta/support/MetaConstants.cpp
src/core/meta/support/MetaUtility.cpp
src/core/podcasts/PodcastMeta.cpp
src/core/podcasts/PodcastMeta.h
src/core/statistics/StatisticsProvider.cpp
src/core/statistics/StatisticsProvider.h
src/databaseimporter/amarok14/FastForwardWorker.cpp
src/databaseimporter/itunes/ITunesImporterWorker.cpp
src/dialogs/TagDialog.cpp
src/dialogs/TrackOrganizer.cpp
src/playlist/PlaylistModel.cpp
src/playlist/navigators/FavoredRandomTrackNavigator.cpp
src/playlist/proxymodels/GroupingProxy.cpp
src/playlist/proxymodels/ProxyBase.cpp
src/playlist/proxymodels/SortAlgorithms.cpp
src/playlist/view/listview/PrettyItemDelegate.cpp
src/playlistgenerator/constraints/TagMatch.cpp
src/scanner/GenericScanManager.cpp
src/scriptengine/MetaTypeExporter.cpp
src/services/ServiceMetaBase.cpp
src/services/ServiceMetaBase.h
src/services/lastfm/meta/LastFmMeta.cpp
src/services/lastfm/meta/LastFmMeta.h
src/services/lastfm/meta/LastFmMeta_p.h
src/services/magnatune/MagnatuneMeta.cpp
src/widgets/Osd.cpp
tests/TestTrackOrganizer.cpp
tests/browsers/TestSingleCollectionTreeItemModel.cpp
tests/core-impl/collections/db/sql/TestSqlScanManager.cpp
tests/core-impl/collections/db/sql/TestSqlTrack.cpp
tests/core-impl/meta/file/TestMetaFileTrack.cpp
tests/core-impl/meta/file/TestMetaFileTrack.h
tests/core-impl/playlists/types/file/xspf/TestXSPFPlaylist.cpp
tests/core/meta/TestMetaTrack.cpp
tests/core/meta/TestMetaTrack.h
tests/mocks/MetaMock.h
tests/mocks/MockTrack.h
tests/synchronization/TestMasterSlaveSynchronizationJob.cpp
tests/synchronization/TestOneWaySynchronizationJob.cpp
tests/synchronization/TestUnionJob.cpp