1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

warnings--

This commit is contained in:
Dominik Schmidt
2012-05-20 15:47:02 +02:00
parent 717b04623f
commit edb34eef59
19 changed files with 39 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ macro(add_tomahawk_plugin)
list(APPEND PLUGIN_SOURCES ${PLUGIN_UI_SOURCES})
endif()
if(EXISTS "resources.qrc")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/resources.qrc")
qt4_add_resources(PLUGIN_RC_SOURCES "resources.qrc")
list(APPEND PLUGIN_SOURCES ${PLUGIN_RC_SOURCES})
unset(PLUGIN_RC_SOURCES)

View File

@@ -193,6 +193,9 @@ SocialWidget::paintEvent( QPaintEvent* event )
void
SocialWidget::onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const QVariant& callbackObj )
{
Q_UNUSED( longUrl );
Q_UNUSED( callbackObj );
if ( m_query->album().isEmpty() )
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 and loving it! %3" ).arg( m_query->track() ).arg( m_query->artist() ).arg( shortUrl.toString() ) );
else

View File

@@ -874,7 +874,7 @@ SpotifyAccount::unregisterUpdater( const QString& plid )
void
SpotifyAccount::fetchFullPlaylist( SpotifyPlaylistInfo* playlist )
{
Q_UNUSED( playlist );
}

View File

@@ -51,6 +51,8 @@ SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account )
void
SpotifyAccountConfig::showEvent( QShowEvent *event )
{
Q_UNUSED( event );
loadFromConfig();
m_loggedInManually = false;
}

View File

@@ -58,7 +58,10 @@ public:
bool pixmapDirty;
Resolver( const QString& v, const QString& path, int userR, ResolverState s, bool resolver )
: version( v ), scriptPath( path ), userRating( userR ), state( s ), pixmap( 0 ), binary( false ), pixmapDirty( false ) {}
: version( v ), scriptPath( path ), userRating( userR ), state( s ), pixmap( 0 ), binary( false ), pixmapDirty( false )
{
Q_UNUSED( resolver );
}
Resolver() : userRating( -1 ), state( Uninstalled ), pixmap( 0 ), binary( false ), pixmapDirty( false ) {}
};

View File

@@ -469,6 +469,9 @@ Playlist::setNewRevision( const QString& rev,
bool is_newest_rev,
const QMap< QString, Tomahawk::plentry_ptr >& addedmap )
{
Q_UNUSED( oldorderedguids );
Q_UNUSED( is_newest_rev );
// build up correctly ordered new list of plentry_ptrs from
// existing ones, and the ones that have been added
QMap<QString, plentry_ptr> entriesmap;

View File

@@ -405,6 +405,8 @@ AccountManager::hookupAccount( Account* account ) const
void
AccountManager::hookupAndEnable( Account* account, bool startup )
{
Q_UNUSED( startup );
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
SipPlugin* p = account->sipPlugin();
if ( p )

View File

@@ -93,8 +93,8 @@ AccountModel::loadData()
if ( acct )
{
m_accounts << new AccountModelNode( acct );
const int removed = allAccounts.removeAll( acct );
#if ACCOUNTMODEL_DEBUG
const int removed = allAccounts.removeAll( acct );
qDebug() << "Removed custom account from misc accounts list, found:" << removed;
qDebug() << "All accounts after remove:";
foreach ( Account* acct, allAccounts )

View File

@@ -324,6 +324,8 @@ InfoBar::createTile( int w )
void
InfoBar::paintEvent( QPaintEvent* e )
{
Q_UNUSED( e );
if ( m_bgTile.isNull() || width() > m_bgTile.width() )
createTile( width() );

View File

@@ -65,6 +65,7 @@ AclJobDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
const QString text = QString( tr( "Allow %1 to\nconnect and stream from you?" ) ).arg( item->username() );
const int w = fm.width( text );
Q_UNUSED( w ); // looks obsolete
const QRect rRect( opt.rect.left() + PADDING, ROW_HEIGHT + PADDING, opt.rect.width() - 2*PADDING, opt.rect.height() - 2*PADDING );
painter->drawText( rRect, Qt::AlignCenter, text );

View File

@@ -206,6 +206,7 @@ AlbumView::resizeEvent( QResizeEvent* event )
int rectWidth = contentsRect().width() - scrollbar - 3;
int itemWidth = 160;
QSize itemSize = m_proxyModel->data( QModelIndex(), Qt::SizeHintRole ).toSize();
Q_UNUSED( itemSize ); // looks obsolete
int itemsPerRow = qMax( 1, qFloor( rectWidth / itemWidth ) );
// int rightSpacing = rectWidth - ( itemsPerRow * ( itemSize.width() + 16 ) );

View File

@@ -669,6 +669,8 @@ TreeModel::addAlbums( const QModelIndex& parent, const QList<Tomahawk::album_ptr
void
TreeModel::addTracks( const album_ptr& album, const QModelIndex& parent, bool autoRefetch )
{
Q_UNUSED( autoRefetch );
emit loadingStarted();
connect( album.data(), SIGNAL( tracksAdded( QList<Tomahawk::query_ptr>, Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),

View File

@@ -23,9 +23,9 @@
BinaryInstallerHelper::BinaryInstallerHelper( const QString& resolverId, bool createAccount, AtticaManager* manager )
: QObject( manager )
, m_manager( QWeakPointer< AtticaManager >( manager ) )
, m_resolverId( resolverId )
, m_createAccount( createAccount )
, m_manager( QWeakPointer< AtticaManager >( manager ) )
{
Q_ASSERT( !m_resolverId.isEmpty() );
Q_ASSERT( !m_manager.isNull() );

View File

@@ -848,6 +848,11 @@ unzipFileInFolder( const QString &zipFileName, const QDir &folder )
void
extractBinaryResolver( const QString& zipFilename, QObject* receiver )
{
#ifndef Q_OS_MAC
Q_UNUSED( zipFilename );
Q_UNUSED( receiver );
#endif
#if !defined(Q_OS_MAC) && !defined (Q_OS_WIN)
Q_ASSERT( false );
qWarning() << "NO SUPPORT YET FOR LINUX BINARY RESOLVERS!";

View File

@@ -394,6 +394,8 @@ defaultPixmap( ImageType type, ImageMode mode, const QSize& size )
void
prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, TrackModelItem* item )
{
Q_UNUSED( index );
if ( item->isPlaying() )
{
option->palette.setColor( QPalette::Highlight, option->palette.color( QPalette::Mid ) );

View File

@@ -155,6 +155,8 @@ AlbumInfoWidget::load( const album_ptr& album )
void
AlbumInfoWidget::loadAlbums( bool autoRefetch )
{
Q_UNUSED( autoRefetch );
m_albumsModel->clear();
connect( m_album->artist().data(), SIGNAL( albumsAdded( QList<Tomahawk::album_ptr>, Tomahawk::ModelMode ) ),

View File

@@ -193,6 +193,8 @@ ArtistInfoWidget::load( const artist_ptr& artist )
void
ArtistInfoWidget::onAlbumsFound( const QList<Tomahawk::album_ptr>& albums, ModelMode mode )
{
Q_UNUSED( mode );
m_albumsModel->addAlbums( albums );
}

View File

@@ -201,7 +201,7 @@ TrackInfoWidget::onStatsLoaded()
void
TrackInfoWidget::onSimilarArtistsLoaded()
{
Artist* artist = qobject_cast<Artist*>( sender() );
// Artist* artist = qobject_cast<Artist*>( sender() );
// m_albumsModel->addArtists( artist->similarArtists() );
}

View File

@@ -78,9 +78,9 @@ lastfm::TrackData::TrackData()
rating( 0 ),
fpid( -1 ),
loved( false ),
null( false ),
scrobbleStatus( Track::Null ),
scrobbleError( Track::None )
scrobbleError( Track::None ),
null( false )
{}
lastfm::Track::Track()