1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 18:30:20 +01: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;
bool ok;
int pport = 0;
// int pport; //FIXME?
QString key, conntype, nodeid, controlid;
QVariantMap m = parser.parse( sock->_msg->payload(), &ok ).toMap();
if( !ok )
@ -320,7 +320,7 @@ Servent::readyRead()
}
conntype = m.value( "conntype" ).toString();
key = m.value( "key" ).toString();
pport = m.value( "port" ).toInt();
// pport = m.value( "port" ).toInt();
nodeid = m.value( "nodeid" ).toString();
controlid = m.value( "controlid" ).toString();

View File

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

View File

@ -101,7 +101,16 @@ ArtistView::setProxyModel( TreeProxyModel* model )
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;

View File

@ -45,7 +45,8 @@ public:
TreeProxyModel* proxyModel() const { return m_proxyModel; }
// PlaylistItemDelegate* delegate() { return m_delegate; }
void setModel( TreeModel* model );
void setModel( QAbstractItemModel* model );
void setTreeModel( TreeModel* model );
virtual QWidget* widget() { return this; }
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
QLineEdit* l = qobject_cast<QLineEdit*>( m_input.data() );
Q_ASSERT( l );
Q_UNUSED( l );
// l->setCompleter( new QCompleter( this ) ); // clear
foreach( QNetworkReply* r, m_suggestWorkers ) {

View File

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

View File

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

View File

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

View File

@ -40,7 +40,7 @@ Scrobbler::Scrobbler( QObject* parent )
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
SIGNAL( info( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ),
SLOT( infoSystemInfo( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ) );
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr& ) ),
SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
@ -137,6 +137,7 @@ Scrobbler::scrobble()
void
Scrobbler::infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData )
{
Q_UNUSED( type );
Q_UNUSED( input );
Q_UNUSED( output );
Q_UNUSED( customData );

View File

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

View File

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

View File

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

View File

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

View File

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