1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 00:54:20 +02:00

* Fixed the warning mess. Hope I didn't break anything :-)

This commit is contained in:
Christian Muehlhaeuser
2011-06-24 11:38:15 +02:00
parent 26e12157f2
commit 4674ed35f0
13 changed files with 40 additions and 24 deletions

View File

@@ -264,4 +264,5 @@ IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file
ENDIF() ENDIF()
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} ) INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
ENDIF() ENDIF()
#INCLUDE( "CPack.txt" ) #INCLUDE( "CPack.txt" )

View File

@@ -192,7 +192,6 @@ set( libHeaders
result.h result.h
source.h source.h
sourceplaylistinterface.h sourceplaylistinterface.h
viewpage.h
viewmanager.h viewmanager.h
globalactionmanager.h globalactionmanager.h
contextMenu.h contextMenu.h
@@ -306,7 +305,6 @@ set( libHeaders
playlist/dynamic/DynamicPlaylist.h playlist/dynamic/DynamicPlaylist.h
playlist/dynamic/DynamicControl.h playlist/dynamic/DynamicControl.h
playlist/dynamic/GeneratorFactory.h
playlist/dynamic/GeneratorInterface.h playlist/dynamic/GeneratorInterface.h
playlist/dynamic/DynamicView.h playlist/dynamic/DynamicView.h
playlist/dynamic/DynamicModel.h playlist/dynamic/DynamicModel.h
@@ -322,7 +320,6 @@ set( libHeaders
playlist/dynamic/widgets/DynamicSetupWidget.h playlist/dynamic/widgets/DynamicSetupWidget.h
playlist/dynamic/widgets/LoadingSpinner.h playlist/dynamic/widgets/LoadingSpinner.h
utils/tomahawkutils.h
utils/querylabel.h utils/querylabel.h
utils/elidedlabel.h utils/elidedlabel.h
utils/animatedcounterlabel.h utils/animatedcounterlabel.h
@@ -342,14 +339,19 @@ set( libHeaders
widgets/infowidgets/sourceinfowidget.h widgets/infowidgets/sourceinfowidget.h
kdsingleapplicationguard/kdsingleapplicationguard.h kdsingleapplicationguard/kdsingleapplicationguard.h
kdsingleapplicationguard/kdsharedmemorylocker.h
kdsingleapplicationguard/kdtoolsglobal.h
kdsingleapplicationguard/kdlockedsharedmemorypointer.h
) )
set( libHeaders_NoMOC set( libHeaders_NoMOC
playlist/dynamic/GeneratorInterface.h viewpage.h
infosystem/infoplugins/unix/imageconverter.h
playlist/dynamic/GeneratorInterface.h
playlist/dynamic/GeneratorFactory.h
utils/tomahawkutils.h
) )
set( libUI ${libUI} set( libUI ${libUI}
widgets/playlisttypeselectordlg.ui widgets/playlisttypeselectordlg.ui
widgets/newplaylistwidget.ui widgets/newplaylistwidget.ui
@@ -384,8 +386,7 @@ IF( UNIX AND NOT APPLE )
infosystem/infoplugins/unix/imageconverter.cpp ) infosystem/infoplugins/unix/imageconverter.cpp )
SET( libHeaders ${libHeaders} SET( libHeaders ${libHeaders}
infosystem/infoplugins/unix/fdonotifyplugin.h infosystem/infoplugins/unix/fdonotifyplugin.h )
infosystem/infoplugins/unix/imageconverter.h )
ENDIF( UNIX AND NOT APPLE ) ENDIF( UNIX AND NOT APPLE )
IF( WIN32 ) IF( WIN32 )

View File

@@ -19,7 +19,7 @@ namespace {
} }
static Version kdParseQtVersion( const char * const version ) { static Version kdParseQtVersion( const char * const version ) {
if ( !version || qstrlen( version ) < 5 || version[1] != '.' || version[3] != '.' || version[5] != 0 && version[5] != '.' && version[5] != '-' ) if ( !version || qstrlen( version ) < 5 || version[1] != '.' || version[3] != '.' || ( version[5] != 0 && version[5] != '.' && version[5] != '-' ) )
return Version(); // parse error return Version(); // parse error
const Version result = { { version[0] - '0', version[2] - '0', version[4] - '0' } }; const Version result = { { version[0] - '0', version[2] - '0', version[4] - '0' } };
return result; return result;

View File

@@ -40,6 +40,7 @@ AlbumProxyModel::AlbumProxyModel( QObject* parent )
setSourceAlbumModel( 0 ); setSourceAlbumModel( 0 );
} }
void void
AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel ) AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel )
{ {
@@ -48,6 +49,7 @@ AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel )
Q_ASSERT( false ); Q_ASSERT( false );
} }
void void
AlbumProxyModel::setSourceAlbumModel( AlbumModel* sourceModel ) AlbumProxyModel::setSourceAlbumModel( AlbumModel* sourceModel )
{ {

View File

@@ -120,7 +120,7 @@ ArtistView::setTreeModel( TreeModel* model )
if ( m_proxyModel ) if ( m_proxyModel )
{ {
m_proxyModel->setSourceModel( model ); m_proxyModel->setSourceTreeModel( model );
m_proxyModel->sort( 0 ); m_proxyModel->sort( 0 );
} }

View File

@@ -27,7 +27,6 @@ namespace Tomahawk
class StationModelItem; class StationModelItem;
/** /**
* Extends PlaylistModel with support for handling stations * Extends PlaylistModel with support for handling stations
*/ */
@@ -55,6 +54,9 @@ public:
// a batchof static tracks wre generated // a batchof static tracks wre generated
void tracksGenerated( const QList< query_ptr > entries, int limitResolvedTo = -1 ); void tracksGenerated( const QList< query_ptr > entries, int limitResolvedTo = -1 );
using PlaylistModel::loadPlaylist;
signals: signals:
void collapseFromTo( int startRow, int num ); void collapseFromTo( int startRow, int num );
void checkForOverflow(); void checkForOverflow();
@@ -62,6 +64,7 @@ signals:
void trackGenerationFailure( const QString& msg ); void trackGenerationFailure( const QString& msg );
void tracksAdded(); void tracksAdded();
private slots: private slots:
void newTrackGenerated( const Tomahawk::query_ptr& query ); void newTrackGenerated( const Tomahawk::query_ptr& query );
@@ -69,6 +72,7 @@ private slots:
void newTrackLoading(); void newTrackLoading();
void filteringTrackResolved( bool successful ); void filteringTrackResolved( bool successful );
private: private:
void filterUnresolved( const QList< query_ptr >& entries ); void filterUnresolved( const QList< query_ptr >& entries );
void addToPlaylist( const QList< query_ptr >& entries, bool clearFirst ); void addToPlaylist( const QList< query_ptr >& entries, bool clearFirst );

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
* *
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
@@ -47,13 +47,12 @@ QueueProxyModel::siblingItem( int itemsAway )
setCurrentIndex( QModelIndex() ); setCurrentIndex( QModelIndex() );
Tomahawk::result_ptr res = PlaylistProxyModel::siblingItem( itemsAway ); Tomahawk::result_ptr res = PlaylistProxyModel::siblingItem( itemsAway );
qDebug() << "new rowcount:" << rowCount( QModelIndex() );
removeIndex( currentIndex() ); removeIndex( currentIndex() );
return res; return res;
} }
void void
QueueProxyModel::onTrackCountChanged( unsigned int count ) QueueProxyModel::onTrackCountChanged( unsigned int count )
{ {

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
* *
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
@@ -35,6 +35,8 @@ public:
virtual Tomahawk::result_ptr siblingItem( int itemsAway ); virtual Tomahawk::result_ptr siblingItem( int itemsAway );
using PlaylistProxyModel::siblingItem;
private slots: private slots:
void onTrackCountChanged( unsigned int count ); void onTrackCountChanged( unsigned int count );
}; };

View File

@@ -37,19 +37,27 @@ TreeProxyModel::TreeProxyModel( QObject* parent )
setSortCaseSensitivity( Qt::CaseInsensitive ); setSortCaseSensitivity( Qt::CaseInsensitive );
setDynamicSortFilter( true ); setDynamicSortFilter( true );
setSourceModel( 0 ); setSourceTreeModel( 0 );
} }
void void
TreeProxyModel::setSourceModel( TreeModel* sourceModel ) TreeProxyModel::setSourceModel( QAbstractItemModel* sourceModel )
{
Q_UNUSED( sourceModel );
qDebug() << "Explicitly use setSourceTreeModel instead";
Q_ASSERT( false );
}
void
TreeProxyModel::setSourceTreeModel( TreeModel* sourceModel )
{ {
m_model = sourceModel; m_model = sourceModel;
if ( m_model && m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 ) if ( m_model && m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 )
connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), SIGNAL( sourceTrackCountChanged( unsigned int ) ) );
QSortFilterProxyModel::setSourceModel( sourceModel ); QSortFilterProxyModel::setSourceModel( sourceModel );
} }

View File

@@ -34,7 +34,8 @@ public:
explicit TreeProxyModel( QObject* parent = 0 ); explicit TreeProxyModel( QObject* parent = 0 );
virtual TreeModel* sourceModel() const { return m_model; } virtual TreeModel* sourceModel() const { return m_model; }
virtual void setSourceModel( TreeModel* sourceModel ); virtual void setSourceTreeModel( TreeModel* sourceModel );
virtual void setSourceModel( QAbstractItemModel* sourceModel );
virtual QPersistentModelIndex currentIndex() const { return mapFromSource( m_model->currentItem() ); } virtual QPersistentModelIndex currentIndex() const { return mapFromSource( m_model->currentItem() ); }
virtual void setCurrentIndex( const QModelIndex& index ) { m_model->setCurrentItem( mapToSource( index ) ); } virtual void setCurrentIndex( const QModelIndex& index ) { m_model->setCurrentItem( mapToSource( index ) ); }

View File

@@ -16,8 +16,6 @@ set( jabberSources
set( jabberHeaders set( jabberHeaders
jabber.h jabber.h
tomahawksipmessage.h
tomahawksipmessagefactory.h
avatarmanager.h avatarmanager.h
xmlconsole.h xmlconsole.h
) )

View File

@@ -3,8 +3,6 @@
set( googleHeaders set( googleHeaders
../jabber.h ../jabber.h
../tomahawksipmessage.h
../tomahawksipmessagefactory.h
../avatarmanager.h ../avatarmanager.h
../xmlconsole.h ../xmlconsole.h
googlewrapper.h ) googlewrapper.h )

View File

@@ -133,6 +133,8 @@ private:
bool presenceMeansOnline( Jreen::Presence::Type p ); bool presenceMeansOnline( Jreen::Presence::Type p );
void handlePeerStatus( const Jreen::JID &jid, Jreen::Presence::Type presenceType ); void handlePeerStatus( const Jreen::JID &jid, Jreen::Presence::Type presenceType );
using SipPlugin::errorMessage;
QMenu* m_menu; QMenu* m_menu;
XmlConsole* m_xmlConsole; XmlConsole* m_xmlConsole;
QString m_currentUsername; QString m_currentUsername;