mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Remove compile warnings
This commit is contained in:
@@ -177,7 +177,6 @@ GetNewStuffDelegate::paint( QPainter* painter, const QStyleOptionViewItem& optio
|
||||
int rating = index.data( GetNewStuffModel::RatingRole ).toInt();
|
||||
const int paddingBetweenStars = 2;
|
||||
const int ratingWidth = 5 * ( m_ratingStarPositive.width() + paddingBetweenStars );
|
||||
const int ratingY = ( btnRect.y() - ( btnRect.top() - opt.rect.y() ) / 2 ) - m_ratingStarNegative.height() / 2;
|
||||
int runningEdge = ( btnRect.right() - btnRect.width() / 2 ) - ratingWidth / 2;
|
||||
for ( int i = 1; i < 6; i++ )
|
||||
{
|
||||
@@ -230,12 +229,15 @@ GetNewStuffDelegate::paint( QPainter* painter, const QStyleOptionViewItem& optio
|
||||
QSize
|
||||
GetNewStuffDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
Q_UNUSED( option );
|
||||
Q_UNUSED( index );
|
||||
return QSize( 200, SIZEHINT_HEIGHT );
|
||||
}
|
||||
|
||||
bool
|
||||
GetNewStuffDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
|
||||
{
|
||||
Q_UNUSED( option );
|
||||
if ( event->type() == QEvent::MouseButtonRelease && m_cachedButtonRects.contains( QPair<int, int>( index.row(), index.column() ) ) )
|
||||
{
|
||||
QRect rect = m_cachedButtonRects[ QPair<int, int>( index.row(), index.column() ) ];
|
||||
|
@@ -101,12 +101,15 @@ GetNewStuffModel::data( const QModelIndex& index, int role ) const
|
||||
int
|
||||
GetNewStuffModel::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
Q_UNUSED( parent );
|
||||
return m_contentList.count();
|
||||
}
|
||||
|
||||
bool
|
||||
GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int role )
|
||||
{
|
||||
Q_UNUSED( value );
|
||||
Q_UNUSED( role );
|
||||
if ( !hasIndex( index.row(), index.column(), index.parent() ) )
|
||||
return false;
|
||||
|
||||
@@ -132,6 +135,9 @@ GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int
|
||||
case AtticaManager::NeedsUpgrade:
|
||||
AtticaManager::instance()->upgradeResolver( resolver );
|
||||
break;
|
||||
default:
|
||||
//FIXME -- this handles e.g. Failed
|
||||
break;
|
||||
};
|
||||
emit dataChanged( index, index );
|
||||
|
||||
|
@@ -67,6 +67,7 @@ DropJob::mimeTypes()
|
||||
bool
|
||||
DropJob::acceptsMimeData( const QMimeData* data, DropJob::DropTypes acceptedType, DropJob::DropAction acceptedAction )
|
||||
{
|
||||
Q_UNUSED( acceptedAction );
|
||||
if ( data->hasFormat( "application/tomahawk.query.list" )
|
||||
|| data->hasFormat( "application/tomahawk.plentry.list" )
|
||||
|| data->hasFormat( "application/tomahawk.result.list" )
|
||||
|
@@ -434,6 +434,8 @@ MprisPlugin::Stop()
|
||||
void
|
||||
MprisPlugin::getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
Q_UNUSED( requestId );
|
||||
Q_UNUSED( requestData );
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
return;
|
||||
@@ -442,6 +444,7 @@ MprisPlugin::getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requ
|
||||
void
|
||||
MprisPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input )
|
||||
{
|
||||
Q_UNUSED( caller );
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
bool isPlayingInfo = false;
|
||||
|
||||
@@ -476,7 +479,8 @@ MprisPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVar
|
||||
void
|
||||
MprisPlugin::stateChanged( AudioState newState, AudioState oldState )
|
||||
{
|
||||
|
||||
Q_UNUSED( newState );
|
||||
Q_UNUSED( oldState );
|
||||
}
|
||||
|
||||
/** Audio state slots */
|
||||
@@ -504,6 +508,7 @@ MprisPlugin::audioStarted( const QVariant &input )
|
||||
void
|
||||
MprisPlugin::audioFinished( const QVariant &input )
|
||||
{
|
||||
Q_UNUSED( input );
|
||||
//qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
|
@@ -63,6 +63,7 @@ JobStatusModel::addJob( JobStatusItem* item )
|
||||
Qt::ItemFlags
|
||||
JobStatusModel::flags( const QModelIndex& index ) const
|
||||
{
|
||||
Q_UNUSED( index );
|
||||
// Don't let the items be selectable
|
||||
return Qt::ItemIsEnabled;
|
||||
}
|
||||
@@ -102,6 +103,7 @@ JobStatusModel::data( const QModelIndex& index, int role ) const
|
||||
int
|
||||
JobStatusModel::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
Q_UNUSED( parent );
|
||||
return m_items.count();
|
||||
}
|
||||
|
||||
|
@@ -73,6 +73,7 @@ PipelineStatusManager::PipelineStatusManager( QObject* parent )
|
||||
void
|
||||
PipelineStatusManager::resolving( const Tomahawk::query_ptr& p )
|
||||
{
|
||||
Q_UNUSED( p );
|
||||
if ( m_curItem.isNull() )
|
||||
{
|
||||
// No current query item and we're resolving something, so show it
|
||||
|
@@ -40,6 +40,7 @@ DatabaseControl::DatabaseControl( const QString& sql, const QString& summary, co
|
||||
, m_sql( sql )
|
||||
, m_sqlSummary( summary )
|
||||
{
|
||||
Q_UNUSED( parent );
|
||||
setType( "database" );
|
||||
}
|
||||
|
||||
@@ -72,6 +73,7 @@ QString DatabaseControl::matchString() const
|
||||
|
||||
void DatabaseControl::setInput ( const QString& input )
|
||||
{
|
||||
Q_UNUSED( input );
|
||||
// TODO
|
||||
updateWidgets();
|
||||
}
|
||||
|
@@ -68,6 +68,8 @@ ToggleButton::mouseReleaseEvent( QMouseEvent* event )
|
||||
void
|
||||
ToggleButton::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
Q_UNUSED( event );
|
||||
|
||||
QPainter p( this );
|
||||
|
||||
p.save();
|
||||
|
@@ -34,10 +34,10 @@
|
||||
|
||||
BreadcrumbBar::BreadcrumbBar( BreadcrumbButtonFactory *buttonFactory, QWidget *parent )
|
||||
: QWidget( parent )
|
||||
, m_buttonFactory( buttonFactory )
|
||||
, m_model( 0 )
|
||||
, m_selectionModel( 0 )
|
||||
, m_layout( new QHBoxLayout( this ) )
|
||||
, m_buttonFactory(buttonFactory)
|
||||
, m_useAnimation( false )
|
||||
|
||||
{
|
||||
@@ -57,10 +57,10 @@ BreadcrumbBar::BreadcrumbBar(BreadcrumbButtonFactory *buttonFactory, QWidget *pa
|
||||
|
||||
BreadcrumbBar::BreadcrumbBar( QWidget *parent )
|
||||
: QWidget( parent )
|
||||
, m_buttonFactory( 0 )
|
||||
, m_model( 0 )
|
||||
, m_selectionModel( 0 )
|
||||
, m_layout( new QHBoxLayout( this ) )
|
||||
, m_buttonFactory(0)
|
||||
, m_useAnimation( false )
|
||||
|
||||
{
|
||||
@@ -339,5 +339,6 @@ void BreadcrumbBar::currentChangedTriggered(QModelIndex const& index)
|
||||
|
||||
void BreadcrumbBar::resizeEvent ( QResizeEvent * event )
|
||||
{
|
||||
Q_UNUSED( event );
|
||||
collapseButtons();
|
||||
}
|
||||
|
@@ -59,6 +59,7 @@ QModelIndex SiblingCrumbButton::index() const
|
||||
|
||||
void SiblingCrumbButton::setActive( bool active )
|
||||
{
|
||||
Q_UNUSED( active );
|
||||
}
|
||||
|
||||
bool SiblingCrumbButton::isActive() const
|
||||
|
@@ -149,7 +149,7 @@ void
|
||||
WelcomeWidget::onPlaybackFinished( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
int count = m_tracksModel->trackCount();
|
||||
int playtime = query->playedBy().second;
|
||||
unsigned int playtime = query->playedBy().second;
|
||||
|
||||
if ( count )
|
||||
{
|
||||
|
@@ -285,6 +285,7 @@ WhatsHotWidget::changeEvent( QEvent* e )
|
||||
QStandardItem*
|
||||
WhatsHotWidget::parseNode(QStandardItem* parentItem, const QString &label, const QVariant &data)
|
||||
{
|
||||
Q_UNUSED( parentItem );
|
||||
tDebug( LOGVERBOSE ) << "WhatsHot:: parsing " << label;
|
||||
|
||||
QStandardItem *sourceItem = new QStandardItem(label);
|
||||
|
@@ -550,6 +550,7 @@ SettingsDialog::getMoreResolvers()
|
||||
#elif defined(LIBATTICA_FOUND)
|
||||
GetNewStuffDialog diag( this );
|
||||
int ret = diag.exec();
|
||||
Q_UNUSED( ret );
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -584,7 +585,7 @@ SettingsDialog::scriptSelectionChanged()
|
||||
void
|
||||
SettingsDialog::getMoreResolversFinished( int ret )
|
||||
{
|
||||
|
||||
Q_UNUSED( ret );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -401,6 +401,7 @@ SourceTreeView::doLatchOff( const source_ptr& source )
|
||||
void
|
||||
SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
|
||||
{
|
||||
Q_UNUSED( newInterface );
|
||||
// If we were latched on and changed, send the listening along stop
|
||||
if ( m_latch.isNull() )
|
||||
{
|
||||
|
@@ -511,6 +511,9 @@ TomahawkWindow::onXSPFError( XSPFLoader::XSPFErrorCode error )
|
||||
case XSPFLoader::InvalidTrackError:
|
||||
QMessageBox::warning( this, tr( "Failed to save tracks" ), tr( "Some tracks in the playlist do not contain an artist and a title. They will be ignored." ), QMessageBox::Ok );
|
||||
break;
|
||||
default:
|
||||
//FIXME: This includes FetchError
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user