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

* Killed a few warnings.

This commit is contained in:
Christian Muehlhaeuser
2011-06-17 05:07:44 +02:00
parent e3a22ba4ee
commit 570913a3b9
14 changed files with 40 additions and 12 deletions

View File

@@ -310,7 +310,7 @@ Servent::readyRead()
ControlConnection* cc = 0; ControlConnection* cc = 0;
bool ok; bool ok;
int pport = 0; // int pport; //FIXME?
QString key, conntype, nodeid, controlid; QString key, conntype, nodeid, controlid;
QVariantMap m = parser.parse( sock->_msg->payload(), &ok ).toMap(); QVariantMap m = parser.parse( sock->_msg->payload(), &ok ).toMap();
if( !ok ) if( !ok )
@@ -320,7 +320,7 @@ Servent::readyRead()
} }
conntype = m.value( "conntype" ).toString(); conntype = m.value( "conntype" ).toString();
key = m.value( "key" ).toString(); key = m.value( "key" ).toString();
pport = m.value( "port" ).toInt(); // pport = m.value( "port" ).toInt();
nodeid = m.value( "nodeid" ).toString(); nodeid = m.value( "nodeid" ).toString();
controlid = m.value( "controlid" ).toString(); controlid = m.value( "controlid" ).toString();

View File

@@ -137,8 +137,8 @@ Playlist::Playlist( const source_ptr& author,
, m_lastmodified( 0 ) , m_lastmodified( 0 )
, m_createdOn( 0 ) // will be set by db command , m_createdOn( 0 ) // will be set by db command
, m_shared( shared ) , m_shared( shared )
, m_busy( false )
, m_initEntries( entries ) , m_initEntries( entries )
, m_busy( false )
{ {
qDebug() << Q_FUNC_INFO << "2"; qDebug() << Q_FUNC_INFO << "2";
init(); init();

View File

@@ -101,7 +101,16 @@ ArtistView::setProxyModel( TreeProxyModel* model )
void void
ArtistView::setModel( TreeModel* model ) ArtistView::setModel( QAbstractItemModel* model )
{
Q_UNUSED( model );
qDebug() << "Explicitly use setPlaylistModel instead";
Q_ASSERT( false );
}
void
ArtistView::setTreeModel( TreeModel* model )
{ {
m_model = model; m_model = model;

View File

@@ -45,7 +45,8 @@ public:
TreeProxyModel* proxyModel() const { return m_proxyModel; } TreeProxyModel* proxyModel() const { return m_proxyModel; }
// PlaylistItemDelegate* delegate() { return m_delegate; } // PlaylistItemDelegate* delegate() { return m_delegate; }
void setModel( TreeModel* model ); void setModel( QAbstractItemModel* model );
void setTreeModel( TreeModel* model );
virtual QWidget* widget() { return this; } virtual QWidget* widget() { return this; }
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); } virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }

View File

@@ -564,6 +564,7 @@ Tomahawk::EchonestControl::artistTextEdited( const QString& text )
// if the user is editing an artist field, try to help him out and suggest from echonest // if the user is editing an artist field, try to help him out and suggest from echonest
QLineEdit* l = qobject_cast<QLineEdit*>( m_input.data() ); QLineEdit* l = qobject_cast<QLineEdit*>( m_input.data() );
Q_ASSERT( l ); Q_ASSERT( l );
Q_UNUSED( l );
// l->setCompleter( new QCompleter( this ) ); // clear // l->setCompleter( new QCompleter( this ) ); // clear
foreach( QNetworkReply* r, m_suggestWorkers ) { foreach( QNetworkReply* r, m_suggestWorkers ) {

View File

@@ -187,6 +187,7 @@ SipModel::flags( const QModelIndex& index ) const
void void
SipModel::pluginAdded( SipPlugin* p ) SipModel::pluginAdded( SipPlugin* p )
{ {
Q_UNUSED( p );
// we assume sip plugins are added at the end of the list. // we assume sip plugins are added at the end of the list.
Q_ASSERT( SipHandler::instance()->allPlugins().last() == p ); Q_ASSERT( SipHandler::instance()->allPlugins().last() == p );
int size = SipHandler::instance()->allPlugins().count() - 1; int size = SipHandler::instance()->allPlugins().count() - 1;

View File

@@ -104,7 +104,7 @@ ViewManager::ViewManager( QObject* parent )
m_superCollectionView = new ArtistView(); m_superCollectionView = new ArtistView();
m_superCollectionModel = new TreeModel( m_superCollectionView ); m_superCollectionModel = new TreeModel( m_superCollectionView );
m_superCollectionView->setModel( m_superCollectionModel ); m_superCollectionView->setTreeModel( m_superCollectionModel );
m_superCollectionView->setFrameShape( QFrame::NoFrame ); m_superCollectionView->setFrameShape( QFrame::NoFrame );
m_superCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 ); m_superCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
m_superCollectionView->setShowModes( false ); m_superCollectionView->setShowModes( false );
@@ -308,7 +308,7 @@ ViewManager::show( const Tomahawk::collection_ptr& collection )
{ {
view = new ArtistView(); view = new ArtistView();
TreeModel* model = new TreeModel(); TreeModel* model = new TreeModel();
view->setModel( model ); view->setTreeModel( model );
view->setFrameShape( QFrame::NoFrame ); view->setFrameShape( QFrame::NoFrame );
view->setAttribute( Qt::WA_MacShowFocusRect, 0 ); view->setAttribute( Qt::WA_MacShowFocusRect, 0 );

View File

@@ -103,12 +103,14 @@ ResolversModel::setData( const QModelIndex& index, const QVariant& value, int ro
int int
ResolversModel::rowCount( const QModelIndex& parent ) const ResolversModel::rowCount( const QModelIndex& parent ) const
{ {
Q_UNUSED( parent );
return m_allResolvers.size(); return m_allResolvers.size();
} }
int int
ResolversModel::columnCount(const QModelIndex& parent) const ResolversModel::columnCount(const QModelIndex& parent) const
{ {
Q_UNUSED( parent );
return 1; return 1;
} }

View File

@@ -137,6 +137,7 @@ Scrobbler::scrobble()
void void
Scrobbler::infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData ) Scrobbler::infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData )
{ {
Q_UNUSED( type );
Q_UNUSED( input ); Q_UNUSED( input );
Q_UNUSED( output ); Q_UNUSED( output );
Q_UNUSED( customData ); Q_UNUSED( customData );

View File

@@ -151,7 +151,7 @@ QString AvatarManager::avatarHash(const QString &jid) const
return m_JidsAvatarHashes.key(jid); return m_JidsAvatarHashes.key(jid);
} }
QDir AvatarManager::avatarDir(const QString &avatarHash) const QDir AvatarManager::avatarDir(const QString&) const
{ {
return m_cacheDir; return m_cacheDir;
} }
@@ -167,7 +167,7 @@ bool AvatarManager::isCached(const QString &avatarHash) const
return m_cachedAvatars.contains( avatarHash ); return m_cachedAvatars.contains( avatarHash );
} }
void AvatarManager::onNewAvatar(const QString& jid) void AvatarManager::onNewAvatar(const QString&)
{ {
// qDebug() << Q_FUNC_INFO << "Found new Avatar..." << jid; // qDebug() << Q_FUNC_INFO << "Found new Avatar..." << jid;
} }

View File

@@ -216,6 +216,7 @@ JabberPlugin::icon() const
bool bool
JabberPlugin::connectPlugin( bool startup ) JabberPlugin::connectPlugin( bool startup )
{ {
Q_UNUSED( startup );
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if(m_client->isConnected()) if(m_client->isConnected())

View File

@@ -71,6 +71,8 @@ ZeroconfFactory::icon() const
bool bool
ZeroconfPlugin::connectPlugin( bool startup ) ZeroconfPlugin::connectPlugin( bool startup )
{ {
Q_UNUSED( startup );
delete m_zeroconf; delete m_zeroconf;
m_zeroconf = new TomahawkZeroconf( Servent::instance()->port(), this ); m_zeroconf = new TomahawkZeroconf( Servent::instance()->port(), this );
QObject::connect( m_zeroconf, SIGNAL( tomahawkHostFound( QString, int, QString, QString ) ), QObject::connect( m_zeroconf, SIGNAL( tomahawkHostFound( QString, int, QString, QString ) ),

View File

@@ -62,6 +62,7 @@ GenericPageItem::icon() const
bool bool
GenericPageItem::willAcceptDrag(const QMimeData* data) const GenericPageItem::willAcceptDrag(const QMimeData* data) const
{ {
Q_UNUSED( data );
return false; return false;
} }

View File

@@ -59,6 +59,8 @@ PlaylistItem::playlist() const
void void
PlaylistItem::onPlaylistLoaded( Tomahawk::PlaylistRevision revision ) PlaylistItem::onPlaylistLoaded( Tomahawk::PlaylistRevision revision )
{ {
Q_UNUSED( revision );
m_loaded = true; m_loaded = true;
emit updated(); emit updated();
} }
@@ -118,6 +120,7 @@ PlaylistItem::setLoaded( bool loaded )
bool bool
PlaylistItem::willAcceptDrag( const QMimeData* data ) const PlaylistItem::willAcceptDrag( const QMimeData* data ) const
{ {
Q_UNUSED( data );
return !m_playlist.isNull() && m_playlist->author()->isLocal(); return !m_playlist.isNull() && m_playlist->author()->isLocal();
} }
@@ -125,6 +128,8 @@ PlaylistItem::willAcceptDrag( const QMimeData* data ) const
bool bool
PlaylistItem::dropMimeData( const QMimeData* data, Qt::DropAction action ) PlaylistItem::dropMimeData( const QMimeData* data, Qt::DropAction action )
{ {
Q_UNUSED( action );
QList< Tomahawk::query_ptr > queries; QList< Tomahawk::query_ptr > queries;
if ( data->hasFormat( "application/tomahawk.playlist.id" ) && if ( data->hasFormat( "application/tomahawk.playlist.id" ) &&
@@ -190,9 +195,12 @@ PlaylistItem::icon() const
bool bool
PlaylistItem::setData(const QVariant& v, bool role) PlaylistItem::setData( const QVariant& v, bool role )
{ {
if( m_playlist->author()->isLocal() ) { Q_UNUSED( role );
if ( m_playlist->author()->isLocal() )
{
m_playlist->rename( v.toString() ); m_playlist->rename( v.toString() );
return true; return true;
@@ -318,6 +326,7 @@ DynamicPlaylistItem::text() const
bool bool
DynamicPlaylistItem::willAcceptDrag( const QMimeData* data ) const DynamicPlaylistItem::willAcceptDrag( const QMimeData* data ) const
{ {
Q_UNUSED( data );
return false; return false;
} }