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();
|
int rating = index.data( GetNewStuffModel::RatingRole ).toInt();
|
||||||
const int paddingBetweenStars = 2;
|
const int paddingBetweenStars = 2;
|
||||||
const int ratingWidth = 5 * ( m_ratingStarPositive.width() + paddingBetweenStars );
|
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;
|
int runningEdge = ( btnRect.right() - btnRect.width() / 2 ) - ratingWidth / 2;
|
||||||
for ( int i = 1; i < 6; i++ )
|
for ( int i = 1; i < 6; i++ )
|
||||||
{
|
{
|
||||||
@@ -230,12 +229,15 @@ GetNewStuffDelegate::paint( QPainter* painter, const QStyleOptionViewItem& optio
|
|||||||
QSize
|
QSize
|
||||||
GetNewStuffDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
GetNewStuffDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( option );
|
||||||
|
Q_UNUSED( index );
|
||||||
return QSize( 200, SIZEHINT_HEIGHT );
|
return QSize( 200, SIZEHINT_HEIGHT );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
GetNewStuffDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
|
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() ) ) )
|
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() ) ];
|
QRect rect = m_cachedButtonRects[ QPair<int, int>( index.row(), index.column() ) ];
|
||||||
|
@@ -101,12 +101,15 @@ GetNewStuffModel::data( const QModelIndex& index, int role ) const
|
|||||||
int
|
int
|
||||||
GetNewStuffModel::rowCount( const QModelIndex& parent ) const
|
GetNewStuffModel::rowCount( const QModelIndex& parent ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( parent );
|
||||||
return m_contentList.count();
|
return m_contentList.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int role )
|
GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int role )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( value );
|
||||||
|
Q_UNUSED( role );
|
||||||
if ( !hasIndex( index.row(), index.column(), index.parent() ) )
|
if ( !hasIndex( index.row(), index.column(), index.parent() ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -132,6 +135,9 @@ GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int
|
|||||||
case AtticaManager::NeedsUpgrade:
|
case AtticaManager::NeedsUpgrade:
|
||||||
AtticaManager::instance()->upgradeResolver( resolver );
|
AtticaManager::instance()->upgradeResolver( resolver );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
//FIXME -- this handles e.g. Failed
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
emit dataChanged( index, index );
|
emit dataChanged( index, index );
|
||||||
|
|
||||||
|
@@ -67,6 +67,7 @@ DropJob::mimeTypes()
|
|||||||
bool
|
bool
|
||||||
DropJob::acceptsMimeData( const QMimeData* data, DropJob::DropTypes acceptedType, DropJob::DropAction acceptedAction )
|
DropJob::acceptsMimeData( const QMimeData* data, DropJob::DropTypes acceptedType, DropJob::DropAction acceptedAction )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( acceptedAction );
|
||||||
if ( data->hasFormat( "application/tomahawk.query.list" )
|
if ( data->hasFormat( "application/tomahawk.query.list" )
|
||||||
|| data->hasFormat( "application/tomahawk.plentry.list" )
|
|| data->hasFormat( "application/tomahawk.plentry.list" )
|
||||||
|| data->hasFormat( "application/tomahawk.result.list" )
|
|| data->hasFormat( "application/tomahawk.result.list" )
|
||||||
|
@@ -434,6 +434,8 @@ MprisPlugin::Stop()
|
|||||||
void
|
void
|
||||||
MprisPlugin::getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requestData )
|
MprisPlugin::getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( requestId );
|
||||||
|
Q_UNUSED( requestData );
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -442,6 +444,7 @@ MprisPlugin::getInfo( uint requestId, Tomahawk::InfoSystem::InfoRequestData requ
|
|||||||
void
|
void
|
||||||
MprisPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input )
|
MprisPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( caller );
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
bool isPlayingInfo = false;
|
bool isPlayingInfo = false;
|
||||||
|
|
||||||
@@ -476,7 +479,8 @@ MprisPlugin::pushInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVar
|
|||||||
void
|
void
|
||||||
MprisPlugin::stateChanged( AudioState newState, AudioState oldState )
|
MprisPlugin::stateChanged( AudioState newState, AudioState oldState )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( newState );
|
||||||
|
Q_UNUSED( oldState );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Audio state slots */
|
/** Audio state slots */
|
||||||
@@ -504,6 +508,7 @@ MprisPlugin::audioStarted( const QVariant &input )
|
|||||||
void
|
void
|
||||||
MprisPlugin::audioFinished( const QVariant &input )
|
MprisPlugin::audioFinished( const QVariant &input )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( input );
|
||||||
//qDebug() << Q_FUNC_INFO;
|
//qDebug() << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,77 +44,77 @@ public:
|
|||||||
|
|
||||||
// org.mpris.MediaPlayer2
|
// org.mpris.MediaPlayer2
|
||||||
|
|
||||||
Q_PROPERTY(bool CanQuit READ canQuit)
|
Q_PROPERTY( bool CanQuit READ canQuit )
|
||||||
bool canQuit() const;
|
bool canQuit() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanRaise READ canRaise)
|
Q_PROPERTY( bool CanRaise READ canRaise )
|
||||||
bool canRaise() const;
|
bool canRaise() const;
|
||||||
|
|
||||||
Q_PROPERTY(QString DesktopEntry READ desktopEntry)
|
Q_PROPERTY( QString DesktopEntry READ desktopEntry )
|
||||||
QString desktopEntry() const;
|
QString desktopEntry() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool HasTrackList READ hasTrackList)
|
Q_PROPERTY( bool HasTrackList READ hasTrackList )
|
||||||
bool hasTrackList() const;
|
bool hasTrackList() const;
|
||||||
|
|
||||||
Q_PROPERTY(QString Identity READ identity)
|
Q_PROPERTY( QString Identity READ identity )
|
||||||
QString identity() const;
|
QString identity() const;
|
||||||
|
|
||||||
Q_PROPERTY(QStringList SupportedMimeTypes READ supportedMimeTypes)
|
Q_PROPERTY( QStringList SupportedMimeTypes READ supportedMimeTypes )
|
||||||
QStringList supportedMimeTypes() const;
|
QStringList supportedMimeTypes() const;
|
||||||
|
|
||||||
Q_PROPERTY(QStringList SupportedUriSchemes READ supportedUriSchemes)
|
Q_PROPERTY( QStringList SupportedUriSchemes READ supportedUriSchemes )
|
||||||
QStringList supportedUriSchemes() const;
|
QStringList supportedUriSchemes() const;
|
||||||
|
|
||||||
// org.mpris.MediaPlayer2.Player
|
// org.mpris.MediaPlayer2.Player
|
||||||
|
|
||||||
Q_PROPERTY(bool CanControl READ canControl)
|
Q_PROPERTY( bool CanControl READ canControl )
|
||||||
bool canControl() const;
|
bool canControl() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanGoNext READ canGoNext)
|
Q_PROPERTY( bool CanGoNext READ canGoNext )
|
||||||
bool canGoNext() const;
|
bool canGoNext() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanGoPrevious READ canGoPrevious)
|
Q_PROPERTY( bool CanGoPrevious READ canGoPrevious )
|
||||||
bool canGoPrevious() const;
|
bool canGoPrevious() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanPause READ canPause)
|
Q_PROPERTY( bool CanPause READ canPause )
|
||||||
bool canPause() const;
|
bool canPause() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanPlay READ canPlay)
|
Q_PROPERTY( bool CanPlay READ canPlay )
|
||||||
bool canPlay() const;
|
bool canPlay() const;
|
||||||
|
|
||||||
Q_PROPERTY(bool CanSeek READ canSeek)
|
Q_PROPERTY( bool CanSeek READ canSeek )
|
||||||
bool canSeek() const;
|
bool canSeek() const;
|
||||||
|
|
||||||
Q_PROPERTY(QString LoopStatus READ loopStatus WRITE setLoopStatus)
|
Q_PROPERTY( QString LoopStatus READ loopStatus WRITE setLoopStatus )
|
||||||
QString loopStatus() const;
|
QString loopStatus() const;
|
||||||
void setLoopStatus(const QString &value);
|
void setLoopStatus( const QString &value );
|
||||||
|
|
||||||
Q_PROPERTY(double MaximumRate READ maximumRate)
|
Q_PROPERTY( double MaximumRate READ maximumRate )
|
||||||
double maximumRate() const;
|
double maximumRate() const;
|
||||||
|
|
||||||
Q_PROPERTY(QVariantMap Metadata READ metadata)
|
Q_PROPERTY( QVariantMap Metadata READ metadata )
|
||||||
QVariantMap metadata() const;
|
QVariantMap metadata() const;
|
||||||
|
|
||||||
Q_PROPERTY(double MinimumRate READ minimumRate)
|
Q_PROPERTY( double MinimumRate READ minimumRate )
|
||||||
double minimumRate() const;
|
double minimumRate() const;
|
||||||
|
|
||||||
Q_PROPERTY(QString PlaybackStatus READ playbackStatus)
|
Q_PROPERTY( QString PlaybackStatus READ playbackStatus )
|
||||||
QString playbackStatus() const;
|
QString playbackStatus() const;
|
||||||
|
|
||||||
Q_PROPERTY(qlonglong Position READ position)
|
Q_PROPERTY( qlonglong Position READ position )
|
||||||
qlonglong position() const;
|
qlonglong position() const;
|
||||||
|
|
||||||
Q_PROPERTY(double Rate READ rate WRITE setRate)
|
Q_PROPERTY( double Rate READ rate WRITE setRate )
|
||||||
double rate() const;
|
double rate() const;
|
||||||
void setRate(double value);
|
void setRate( double value );
|
||||||
|
|
||||||
Q_PROPERTY(bool Shuffle READ shuffle WRITE setShuffle)
|
Q_PROPERTY( bool Shuffle READ shuffle WRITE setShuffle )
|
||||||
bool shuffle() const;
|
bool shuffle() const;
|
||||||
void setShuffle(bool value);
|
void setShuffle( bool value );
|
||||||
|
|
||||||
Q_PROPERTY(double Volume READ volume WRITE setVolume)
|
Q_PROPERTY( double Volume READ volume WRITE setVolume )
|
||||||
double volume() const;
|
double volume() const;
|
||||||
void setVolume(double value);
|
void setVolume( double value );
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void namChangedSlot( QNetworkAccessManager* /*nam*/ ) {} // unused
|
void namChangedSlot( QNetworkAccessManager* /*nam*/ ) {} // unused
|
||||||
@@ -132,13 +132,13 @@ public slots:
|
|||||||
|
|
||||||
// org.mpris.MediaPlayer2.Player
|
// org.mpris.MediaPlayer2.Player
|
||||||
void Next();
|
void Next();
|
||||||
void OpenUri(const QString &Uri);
|
void OpenUri( const QString &Uri );
|
||||||
void Pause();
|
void Pause();
|
||||||
void Play();
|
void Play();
|
||||||
void PlayPause();
|
void PlayPause();
|
||||||
void Previous();
|
void Previous();
|
||||||
void Seek(qlonglong Offset);
|
void Seek( qlonglong Offset );
|
||||||
void SetPosition(const QDBusObjectPath &TrackId, qlonglong Position);
|
void SetPosition( const QDBusObjectPath &TrackId, qlonglong Position );
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
|
|
||||||
|
@@ -63,6 +63,7 @@ JobStatusModel::addJob( JobStatusItem* item )
|
|||||||
Qt::ItemFlags
|
Qt::ItemFlags
|
||||||
JobStatusModel::flags( const QModelIndex& index ) const
|
JobStatusModel::flags( const QModelIndex& index ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( index );
|
||||||
// Don't let the items be selectable
|
// Don't let the items be selectable
|
||||||
return Qt::ItemIsEnabled;
|
return Qt::ItemIsEnabled;
|
||||||
}
|
}
|
||||||
@@ -102,6 +103,7 @@ JobStatusModel::data( const QModelIndex& index, int role ) const
|
|||||||
int
|
int
|
||||||
JobStatusModel::rowCount( const QModelIndex& parent ) const
|
JobStatusModel::rowCount( const QModelIndex& parent ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( parent );
|
||||||
return m_items.count();
|
return m_items.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ PipelineStatusItem::resolving( const Tomahawk::query_ptr& query )
|
|||||||
}
|
}
|
||||||
|
|
||||||
PipelineStatusManager::PipelineStatusManager( QObject* parent )
|
PipelineStatusManager::PipelineStatusManager( QObject* parent )
|
||||||
: QObject(parent)
|
: QObject( parent )
|
||||||
{
|
{
|
||||||
connect( Tomahawk::Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), this, SLOT( resolving( Tomahawk::query_ptr ) ) );
|
connect( Tomahawk::Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), this, SLOT( resolving( Tomahawk::query_ptr ) ) );
|
||||||
}
|
}
|
||||||
@@ -73,6 +73,7 @@ PipelineStatusManager::PipelineStatusManager( QObject* parent )
|
|||||||
void
|
void
|
||||||
PipelineStatusManager::resolving( const Tomahawk::query_ptr& p )
|
PipelineStatusManager::resolving( const Tomahawk::query_ptr& p )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( p );
|
||||||
if ( m_curItem.isNull() )
|
if ( m_curItem.isNull() )
|
||||||
{
|
{
|
||||||
// No current query item and we're resolving something, so show it
|
// 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_sql( sql )
|
||||||
, m_sqlSummary( summary )
|
, m_sqlSummary( summary )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( parent );
|
||||||
setType( "database" );
|
setType( "database" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ QString DatabaseControl::matchString() const
|
|||||||
|
|
||||||
void DatabaseControl::setInput ( const QString& input )
|
void DatabaseControl::setInput ( const QString& input )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( input );
|
||||||
// TODO
|
// TODO
|
||||||
updateWidgets();
|
updateWidgets();
|
||||||
}
|
}
|
||||||
|
@@ -68,6 +68,8 @@ ToggleButton::mouseReleaseEvent( QMouseEvent* event )
|
|||||||
void
|
void
|
||||||
ToggleButton::paintEvent( QPaintEvent* event )
|
ToggleButton::paintEvent( QPaintEvent* event )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( event );
|
||||||
|
|
||||||
QPainter p( this );
|
QPainter p( this );
|
||||||
|
|
||||||
p.save();
|
p.save();
|
||||||
|
@@ -32,48 +32,48 @@
|
|||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
|
|
||||||
|
|
||||||
BreadcrumbBar::BreadcrumbBar(BreadcrumbButtonFactory *buttonFactory, QWidget *parent)
|
BreadcrumbBar::BreadcrumbBar( BreadcrumbButtonFactory *buttonFactory, QWidget *parent )
|
||||||
: QWidget(parent)
|
: QWidget( parent )
|
||||||
, m_model(0)
|
, m_buttonFactory( buttonFactory )
|
||||||
, m_selectionModel(0)
|
, m_model( 0 )
|
||||||
, m_layout(new QHBoxLayout(this))
|
, m_selectionModel( 0 )
|
||||||
, m_buttonFactory(buttonFactory)
|
, m_layout( new QHBoxLayout( this ) )
|
||||||
, m_useAnimation(false)
|
, m_useAnimation( false )
|
||||||
|
|
||||||
{
|
{
|
||||||
m_layout->setSpacing(0);
|
m_layout->setSpacing( 0 );
|
||||||
m_layout->setMargin(0);
|
m_layout->setMargin( 0 );
|
||||||
m_layout->setAlignment(Qt::AlignLeft);
|
m_layout->setAlignment( Qt::AlignLeft );
|
||||||
|
|
||||||
setAutoFillBackground(false);
|
setAutoFillBackground( false );
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
|
|
||||||
setLayoutDirection(Qt::LeftToRight);
|
setLayoutDirection( Qt::LeftToRight );
|
||||||
setLayout(m_layout);
|
setLayout( m_layout );
|
||||||
setMinimumWidth(100);
|
setMinimumWidth( 100 );
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BreadcrumbBar::BreadcrumbBar(QWidget *parent)
|
BreadcrumbBar::BreadcrumbBar( QWidget *parent )
|
||||||
: QWidget(parent)
|
: QWidget( parent )
|
||||||
, m_model(0)
|
, m_buttonFactory( 0 )
|
||||||
, m_selectionModel(0)
|
, m_model( 0 )
|
||||||
, m_layout(new QHBoxLayout(this))
|
, m_selectionModel( 0 )
|
||||||
, m_buttonFactory(0)
|
, m_layout( new QHBoxLayout( this ) )
|
||||||
, m_useAnimation(false)
|
, m_useAnimation( false )
|
||||||
|
|
||||||
{
|
{
|
||||||
m_layout->setSpacing(0);
|
m_layout->setSpacing( 0 );
|
||||||
m_layout->setMargin(0);
|
m_layout->setMargin( 0 );
|
||||||
m_layout->setAlignment(Qt::AlignLeft);
|
m_layout->setAlignment( Qt::AlignLeft );
|
||||||
|
|
||||||
setAutoFillBackground(false);
|
setAutoFillBackground( false );
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
|
|
||||||
setLayoutDirection(Qt::LeftToRight);
|
setLayoutDirection( Qt::LeftToRight );
|
||||||
setLayout(m_layout);
|
setLayout( m_layout );
|
||||||
setMinimumWidth(100);
|
setMinimumWidth( 100 );
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,5 +339,6 @@ void BreadcrumbBar::currentChangedTriggered(QModelIndex const& index)
|
|||||||
|
|
||||||
void BreadcrumbBar::resizeEvent ( QResizeEvent * event )
|
void BreadcrumbBar::resizeEvent ( QResizeEvent * event )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( event );
|
||||||
collapseButtons();
|
collapseButtons();
|
||||||
}
|
}
|
||||||
|
@@ -44,10 +44,10 @@ SiblingCrumbButton::SiblingCrumbButton(
|
|||||||
// QTimer::singleShot(0, this, SLOT(activateSelf()));
|
// QTimer::singleShot(0, this, SLOT(activateSelf()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SiblingCrumbButton::setIndex(QModelIndex index)
|
void SiblingCrumbButton::setIndex( QModelIndex index )
|
||||||
{
|
{
|
||||||
m_index = index;
|
m_index = index;
|
||||||
setText(index.data().toString());
|
setText( index.data().toString() );
|
||||||
qDebug() << "i am " << text();
|
qDebug() << "i am " << text();
|
||||||
fillCombo();
|
fillCombo();
|
||||||
}
|
}
|
||||||
@@ -57,8 +57,9 @@ QModelIndex SiblingCrumbButton::index() const
|
|||||||
return m_index;
|
return m_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SiblingCrumbButton::setActive(bool active)
|
void SiblingCrumbButton::setActive( bool active )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( active );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SiblingCrumbButton::isActive() const
|
bool SiblingCrumbButton::isActive() const
|
||||||
@@ -70,19 +71,19 @@ QSize SiblingCrumbButton::sizeHint() const
|
|||||||
{
|
{
|
||||||
// our width = width of combo + 20px for right-arrow and spacing
|
// our width = width of combo + 20px for right-arrow and spacing
|
||||||
const int padding = hasChildren() ? 20 : 5;
|
const int padding = hasChildren() ? 20 : 5;
|
||||||
return m_combo->sizeHint() + QSize(padding,0);
|
return m_combo->sizeHint() + QSize( padding, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SiblingCrumbButton::paintEvent(QPaintEvent *event)
|
void SiblingCrumbButton::paintEvent( QPaintEvent *event )
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
Q_UNUSED( event );
|
||||||
|
|
||||||
QPainter p(this);
|
QPainter p( this );
|
||||||
QStyleOption opt;
|
QStyleOption opt;
|
||||||
opt.initFrom(this);
|
opt.initFrom( this );
|
||||||
QRect r = opt.rect;
|
QRect r = opt.rect;
|
||||||
|
|
||||||
StyleHelper::horizontalHeader(&p, r); // draw the background
|
StyleHelper::horizontalHeader( &p, r ); // draw the background
|
||||||
|
|
||||||
if( !hasChildren() )
|
if( !hasChildren() )
|
||||||
return;
|
return;
|
||||||
@@ -93,31 +94,31 @@ void SiblingCrumbButton::paintEvent(QPaintEvent *event)
|
|||||||
int left = !reverse ? r.right()-rightSpacing - menuButtonWidth : r.left();
|
int left = !reverse ? r.right()-rightSpacing - menuButtonWidth : r.left();
|
||||||
int right = !reverse ? r.right()-rightSpacing : r.left() + menuButtonWidth;
|
int right = !reverse ? r.right()-rightSpacing : r.left() + menuButtonWidth;
|
||||||
int height = sizeHint().height();
|
int height = sizeHint().height();
|
||||||
QRect arrowRect((left + right) / 2 + (reverse ? 6 : -6), 0, height, height);
|
QRect arrowRect( ( left + right ) / 2 + ( reverse ? 6 : -6 ), 0, height, height );
|
||||||
|
|
||||||
QStyleOption arrowOpt = opt;
|
QStyleOption arrowOpt = opt;
|
||||||
arrowOpt.rect = arrowRect;
|
arrowOpt.rect = arrowRect;
|
||||||
|
|
||||||
|
|
||||||
QLine l1(left, 0, right, height/2);
|
QLine l1( left, 0, right, height/2 );
|
||||||
QLine l2(left, height, right, height/2);
|
QLine l2( left, height, right, height/2 );
|
||||||
|
|
||||||
|
|
||||||
p.setRenderHint(QPainter::Antialiasing, true);
|
p.setRenderHint( QPainter::Antialiasing, true );
|
||||||
|
|
||||||
// Draw the shadow
|
// Draw the shadow
|
||||||
QColor shadow(0, 0, 0, 100);
|
QColor shadow( 0, 0, 0, 100 );
|
||||||
p.translate(0, -1);
|
p.translate( 0, -1 );
|
||||||
p.setPen(shadow);
|
p.setPen( shadow );
|
||||||
p.drawLine(l1);
|
p.drawLine( l1 );
|
||||||
p.drawLine(l2);
|
p.drawLine( l2 );
|
||||||
|
|
||||||
// Draw the main arrow
|
// Draw the main arrow
|
||||||
QColor foreGround("#747474");
|
QColor foreGround( "#747474" );
|
||||||
p.translate(0, 1);
|
p.translate( 0, 1 );
|
||||||
p.setPen(foreGround);
|
p.setPen( foreGround );
|
||||||
p.drawLine(l1);
|
p.drawLine( l1 );
|
||||||
p.drawLine(l2);
|
p.drawLine( l2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SiblingCrumbButton::fillCombo()
|
void SiblingCrumbButton::fillCombo()
|
||||||
|
@@ -149,7 +149,7 @@ void
|
|||||||
WelcomeWidget::onPlaybackFinished( const Tomahawk::query_ptr& query )
|
WelcomeWidget::onPlaybackFinished( const Tomahawk::query_ptr& query )
|
||||||
{
|
{
|
||||||
int count = m_tracksModel->trackCount();
|
int count = m_tracksModel->trackCount();
|
||||||
int playtime = query->playedBy().second;
|
unsigned int playtime = query->playedBy().second;
|
||||||
|
|
||||||
if ( count )
|
if ( count )
|
||||||
{
|
{
|
||||||
|
@@ -285,6 +285,7 @@ WhatsHotWidget::changeEvent( QEvent* e )
|
|||||||
QStandardItem*
|
QStandardItem*
|
||||||
WhatsHotWidget::parseNode(QStandardItem* parentItem, const QString &label, const QVariant &data)
|
WhatsHotWidget::parseNode(QStandardItem* parentItem, const QString &label, const QVariant &data)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( parentItem );
|
||||||
tDebug( LOGVERBOSE ) << "WhatsHot:: parsing " << label;
|
tDebug( LOGVERBOSE ) << "WhatsHot:: parsing " << label;
|
||||||
|
|
||||||
QStandardItem *sourceItem = new QStandardItem(label);
|
QStandardItem *sourceItem = new QStandardItem(label);
|
||||||
|
@@ -550,6 +550,7 @@ SettingsDialog::getMoreResolvers()
|
|||||||
#elif defined(LIBATTICA_FOUND)
|
#elif defined(LIBATTICA_FOUND)
|
||||||
GetNewStuffDialog diag( this );
|
GetNewStuffDialog diag( this );
|
||||||
int ret = diag.exec();
|
int ret = diag.exec();
|
||||||
|
Q_UNUSED( ret );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -584,7 +585,7 @@ SettingsDialog::scriptSelectionChanged()
|
|||||||
void
|
void
|
||||||
SettingsDialog::getMoreResolversFinished( int ret )
|
SettingsDialog::getMoreResolversFinished( int ret )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -401,6 +401,7 @@ SourceTreeView::doLatchOff( const source_ptr& source )
|
|||||||
void
|
void
|
||||||
SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
|
SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( newInterface );
|
||||||
// If we were latched on and changed, send the listening along stop
|
// If we were latched on and changed, send the listening along stop
|
||||||
if ( m_latch.isNull() )
|
if ( m_latch.isNull() )
|
||||||
{
|
{
|
||||||
|
@@ -511,6 +511,9 @@ TomahawkWindow::onXSPFError( XSPFLoader::XSPFErrorCode error )
|
|||||||
case XSPFLoader::InvalidTrackError:
|
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 );
|
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;
|
break;
|
||||||
|
default:
|
||||||
|
//FIXME: This includes FetchError
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user