extragear/multimedia/amarok/src

Maximilian Kossick maximilian.kossick at googlemail.com
Tue Mar 24 00:22:32 CET 2009


Both collections actually use MemoryQueryMaker, so it only has to be
implemented once (and will magically work for any other
MemoryCollection too)

On Mon, Mar 23, 2009 at 2:45 PM, Valentin Rouet <v.rouet at gmail.com> wrote:
> SVN commit 943435 by vrouet:
>
> As requested by dan, i'm reverting my commit No 942962 in order to let it be done the right way, by implementing IpodQueryMaker and MtpQueryMaker classes. If interessed feel free to do it, nobody's currently on it.
>
>  M  +0 -5      browsers/collectionbrowser/CollectionTreeItem.cpp
>  M  +1 -1      browsers/collectionbrowser/CollectionTreeItem.h
>  M  +0 -3      collection/Collection.h
>  M  +0 -1      collection/ipodcollection/IpodCollection.h
>  M  +0 -1      collection/mtpcollection/MtpCollection.h
>
>
> --- trunk/extragear/multimedia/amarok/src/browsers/collectionbrowser/CollectionTreeItem.cpp #943434:943435
> @@ -165,8 +165,6 @@
>         {
>             if( m_trackCount < 0 )
>             {
> -                if ( m_parentCollection->trackCount() < 0 )
> -                {
>                 QueryMaker *qm = m_parentCollection->queryMaker();
>                 connect( qm, SIGNAL( newResultReady(QString, QStringList) ), SLOT( tracksCounted(QString, QStringList) ) );
>
> @@ -174,9 +172,6 @@
>                   ->setQueryType( QueryMaker::Custom )
>                   ->addReturnFunction( QueryMaker::Count, Meta::valUrl )
>                   ->run();
> -                }
> -                else
> -                    m_trackCount = m_parentCollection->trackCount();
>             }
>
>             return i18np( "1 Track", "%1 Tracks", KGlobal::locale()->formatNumber( m_trackCount, 0 ) );
> --- trunk/extragear/multimedia/amarok/src/browsers/collectionbrowser/CollectionTreeItem.h #943434:943435
> @@ -56,7 +56,7 @@
>         int childCount() const { return m_childItems.count(); }
>         int columnCount() const { return 1; }
>
> -        QVariant data( int role );
> +        QVariant data( int role ) const;
>
>         int row() const;
>
> --- trunk/extragear/multimedia/amarok/src/collection/Collection.h #943434:943435
> @@ -146,9 +146,6 @@
>             @return A unique identifier for this type of collection
>         */
>         virtual QString collectionId() const = 0;
> -
> -        // virtual bool hasQueryMaker() const { return true; }
> -        virtual int trackCount() { return -1; }
>         /**
>             @return a user visible name for this collection, to be displayed in the collectionbrowser and elsewhere
>         */
> --- trunk/extragear/multimedia/amarok/src/collection/ipodcollection/IpodCollection.h #943434:943435
> @@ -93,7 +93,6 @@
>         virtual CollectionLocation* location() const;
>
>         virtual QString collectionId() const;
> -        virtual int trackCount() { return trackMap().size(); }
>         virtual QString prettyName() const;
>         virtual KIcon icon() const { return KIcon("multimedia-player-apple-ipod"); };
>
> --- trunk/extragear/multimedia/amarok/src/collection/mtpcollection/MtpCollection.h #943434:943435
> @@ -91,7 +91,6 @@
>     virtual CollectionLocation* location() const;
>
>     virtual QString collectionId() const;
> -    virtual int trackCount() { return trackMap().size(); }
>     virtual QString prettyName() const;
>     virtual KIcon icon() const { return KIcon("multimedia-player"); }
>
>


More information about the Amarok-devel mailing list