From d4109d8575d348fc8c60ada477fbb944be738433 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 3 May 2011 19:40:51 +0200 Subject: [PATCH] Remove warnings (aka make it compile with -Werror) --- src/resolverconfigdelegate.cpp | 2 ++ src/sourcetree/items/categoryitems.cpp | 2 ++ src/sourcetree/sourcesmodel.cpp | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/resolverconfigdelegate.cpp b/src/resolverconfigdelegate.cpp index 0f98e49f8..3c8c7bd41 100644 --- a/src/resolverconfigdelegate.cpp +++ b/src/resolverconfigdelegate.cpp @@ -132,6 +132,8 @@ ResolverConfigDelegate::sizeHint( const QStyleOptionViewItem& option, const QMod bool ResolverConfigDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) { + Q_UNUSED(style); + // qDebug() << "EDITOR EVENT!" << ( event->type() == QEvent::MouseButtonRelease ); QStyleOptionViewItemV4 viewOpt( option ); diff --git a/src/sourcetree/items/categoryitems.cpp b/src/sourcetree/items/categoryitems.cpp index 2ba177d20..86158ee66 100644 --- a/src/sourcetree/items/categoryitems.cpp +++ b/src/sourcetree/items/categoryitems.cpp @@ -161,6 +161,8 @@ CategoryItem::insertItem( SourceTreeItem* item ) void CategoryItem::insertItems( QList< SourceTreeItem* > items ) { + Q_UNUSED(index); + // add the items to the category, and connect to the signals int curCount = children().size(); if( m_showAdd ) // if there's an add item, add it before that diff --git a/src/sourcetree/sourcesmodel.cpp b/src/sourcetree/sourcesmodel.cpp index 4577b3264..524979d23 100644 --- a/src/sourcetree/sourcesmodel.cpp +++ b/src/sourcetree/sourcesmodel.cpp @@ -39,6 +39,8 @@ SourcesModel::SourcesModel( QObject* parent ) : QAbstractItemModel( parent ) , m_viewPageDelayedCacheItem( 0 ) { + Q_UNUSED(recent); + m_rootItem = new SourceTreeItem( this, 0, Invalid ); appendItem( source_ptr() ); @@ -193,6 +195,7 @@ SourcesModel::flags( const QModelIndex& index ) const void SourcesModel::appendItem( const Tomahawk::source_ptr& source ) { + Q_UNUSED(item); beginInsertRows( QModelIndex(), rowCount(), rowCount() ); // append to end @@ -339,7 +342,7 @@ SourcesModel::linkSourceItemToPage( SourceTreeItem* item, ViewPage* p ) // TODO handle removal m_sourceTreeLinks[ p ] = item; - if( m_viewPageDelayedCacheItem = p ) + if( m_viewPageDelayedCacheItem == p ) emit selectRequest( indexFromItem( item ) ); m_viewPageDelayedCacheItem = 0;