1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02:00

* Style fixes.

This commit is contained in:
Christian Muehlhaeuser
2013-04-22 09:17:37 +02:00
parent 2c79831ef8
commit 18f44f4e47
6 changed files with 13 additions and 12 deletions

View File

@@ -306,7 +306,7 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
if ( !cleanResults.isEmpty() ) if ( !cleanResults.isEmpty() )
{ {
q->addResults( cleanResults ); q->addResults( cleanResults );
if ( m_queries_temporary.contains( q ) ) if ( m_queries_temporary.contains( q ) )
{ {
foreach ( const result_ptr& r, cleanResults ) foreach ( const result_ptr& r, cleanResults )
@@ -564,7 +564,7 @@ Pipeline::onTemporaryQueryTimer()
for ( int i = m_queries_temporary.count() - 1; i >= 0; i-- ) for ( int i = m_queries_temporary.count() - 1; i >= 0; i-- )
{ {
query_ptr q = m_queries_temporary.takeAt( i ); query_ptr q = m_queries_temporary.takeAt( i );
m_qids.remove( q->id() ); m_qids.remove( q->id() );
foreach ( const Tomahawk::result_ptr& r, q->results() ) foreach ( const Tomahawk::result_ptr& r, q->results() )
m_rids.remove( r->id() ); m_rids.remove( r->id() );

View File

@@ -188,7 +188,6 @@ public:
void setTitle( const QString& s ); void setTitle( const QString& s );
// </IGNORE> // </IGNORE>
QList<plentry_ptr> entriesFromQueries( const QList<Tomahawk::query_ptr>& queries, bool clearFirst = false ); QList<plentry_ptr> entriesFromQueries( const QList<Tomahawk::query_ptr>& queries, bool clearFirst = false );
void addUpdater( PlaylistUpdaterInterface* updater ); void addUpdater( PlaylistUpdaterInterface* updater );
@@ -249,7 +248,6 @@ public slots:
// entries should be <= entries(), with changed metadata. // entries should be <= entries(), with changed metadata.
void updateEntries( const QString& newrev, const QString& oldrev, const QList< plentry_ptr >& entries ); void updateEntries( const QString& newrev, const QString& oldrev, const QList< plentry_ptr >& entries );
void reportCreated( const Tomahawk::playlist_ptr& self ); void reportCreated( const Tomahawk::playlist_ptr& self );
void reportDeleted( const Tomahawk::playlist_ptr& self ); void reportDeleted( const Tomahawk::playlist_ptr& self );
@@ -263,6 +261,7 @@ public slots:
void resolve(); void resolve();
void setWeakSelf( QWeakPointer< Playlist > self ); void setWeakSelf( QWeakPointer< Playlist > self );
protected: protected:
// called from loadAllPlaylists DB cmd: // called from loadAllPlaylists DB cmd:
explicit Playlist( const source_ptr& src, explicit Playlist( const source_ptr& src,
@@ -291,12 +290,12 @@ protected:
bool is_newest_rev, bool is_newest_rev,
const QMap< QString, Tomahawk::plentry_ptr >& addedmap ); const QMap< QString, Tomahawk::plentry_ptr >& addedmap );
private slots: private slots:
void onResultsChanged(); void onResultsChanged();
void onResolvingFinished(); void onResolvingFinished();
void onDeleteResult( SourceTreePopupDialog* ); void onDeleteResult( SourceTreePopupDialog* );
private: private:
Playlist(); Playlist();
void init(); void init();

View File

@@ -43,6 +43,7 @@ namespace Tomahawk
class DynamicPlaylist; class DynamicPlaylist;
class Query; class Query;
class Result; class Result;
class Track;
class Source; class Source;
class DynamicControl; class DynamicControl;
class GeneratorInterface; class GeneratorInterface;
@@ -54,7 +55,11 @@ namespace Tomahawk
typedef QSharedPointer<PlaylistInterface> playlistinterface_ptr; typedef QSharedPointer<PlaylistInterface> playlistinterface_ptr;
typedef QSharedPointer<DynamicPlaylist> dynplaylist_ptr; typedef QSharedPointer<DynamicPlaylist> dynplaylist_ptr;
typedef QSharedPointer<Query> query_ptr; typedef QSharedPointer<Query> query_ptr;
typedef QWeakPointer<Query> query_wptr;
typedef QSharedPointer<Result> result_ptr; typedef QSharedPointer<Result> result_ptr;
typedef QWeakPointer<Result> result_wptr;
typedef QSharedPointer<Track> track_ptr;
typedef QWeakPointer<Track> track_wptr;
typedef QSharedPointer<Source> source_ptr; typedef QSharedPointer<Source> source_ptr;
typedef QSharedPointer<Artist> artist_ptr; typedef QSharedPointer<Artist> artist_ptr;
typedef QWeakPointer<Artist> artist_wptr; typedef QWeakPointer<Artist> artist_wptr;

View File

@@ -661,10 +661,7 @@ TrackView::onCustomContextMenu( const QPoint& pos )
PlayableItem* item = proxyModel()->itemFromIndex( proxyModel()->mapToSource( index ) ); PlayableItem* item = proxyModel()->itemFromIndex( proxyModel()->mapToSource( index ) );
if ( item && !item->query().isNull() ) if ( item && !item->query().isNull() )
{ {
if ( item->query()->numResults() > 0 ) queries << item->query();
queries << item->query()->results().first()->toQuery();
else
queries << item->query();
} }
} }

View File

@@ -60,7 +60,7 @@ SipInfo::SipInfo()
} }
SipInfo::SipInfo(const SipInfo& other) SipInfo::SipInfo( const SipInfo& other )
: QObject() : QObject()
, d( other.d ) , d( other.d )
{ {

View File

@@ -24,8 +24,8 @@
#include <QTimer> #include <QTimer>
SipStatusMessage::SipStatusMessage( SipStatusMessageType statusMessageType, const QString& contactId, const QString& message ) SipStatusMessage::SipStatusMessage( SipStatusMessageType statusMessageType, const QString& contactId, const QString& message )
: m_statusMessageType( statusMessageType ) : m_contactId( contactId )
, m_contactId( contactId ) , m_statusMessageType( statusMessageType )
, m_message( message ) , m_message( message )
{ {
// make this temporary for now, as soon as i know how: add ack button // make this temporary for now, as soon as i know how: add ack button