From 4674ed35f09e7c44b6a18b968410a89987223ccf Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 24 Jun 2011 11:38:15 +0200 Subject: [PATCH] * Fixed the warning mess. Hope I didn't break anything :-) --- src/CMakeLists.txt | 1 + src/libtomahawk/CMakeLists.txt | 19 ++++++++++--------- .../kdtoolsglobal.cpp | 2 +- src/libtomahawk/playlist/albumproxymodel.cpp | 2 ++ src/libtomahawk/playlist/artistview.cpp | 2 +- .../playlist/dynamic/DynamicModel.h | 6 +++++- src/libtomahawk/playlist/queueproxymodel.cpp | 5 ++--- src/libtomahawk/playlist/queueproxymodel.h | 4 +++- src/libtomahawk/playlist/treeproxymodel.cpp | 14 +++++++++++--- src/libtomahawk/playlist/treeproxymodel.h | 3 ++- src/sip/jabber/CMakeLists.txt | 2 -- src/sip/jabber/googlewrapper/CMakeLists.txt | 2 -- src/sip/jabber/jabber.h | 2 ++ 13 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2a6c9b127..e9940b50a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -264,4 +264,5 @@ IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file ENDIF() INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} ) ENDIF() + #INCLUDE( "CPack.txt" ) diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index c80ed6547..ee138e099 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -192,7 +192,6 @@ set( libHeaders result.h source.h sourceplaylistinterface.h - viewpage.h viewmanager.h globalactionmanager.h contextMenu.h @@ -306,7 +305,6 @@ set( libHeaders playlist/dynamic/DynamicPlaylist.h playlist/dynamic/DynamicControl.h - playlist/dynamic/GeneratorFactory.h playlist/dynamic/GeneratorInterface.h playlist/dynamic/DynamicView.h playlist/dynamic/DynamicModel.h @@ -322,7 +320,6 @@ set( libHeaders playlist/dynamic/widgets/DynamicSetupWidget.h playlist/dynamic/widgets/LoadingSpinner.h - utils/tomahawkutils.h utils/querylabel.h utils/elidedlabel.h utils/animatedcounterlabel.h @@ -342,14 +339,19 @@ set( libHeaders widgets/infowidgets/sourceinfowidget.h kdsingleapplicationguard/kdsingleapplicationguard.h - kdsingleapplicationguard/kdsharedmemorylocker.h - kdsingleapplicationguard/kdtoolsglobal.h - kdsingleapplicationguard/kdlockedsharedmemorypointer.h ) 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} widgets/playlisttypeselectordlg.ui widgets/newplaylistwidget.ui @@ -384,8 +386,7 @@ IF( UNIX AND NOT APPLE ) infosystem/infoplugins/unix/imageconverter.cpp ) SET( libHeaders ${libHeaders} - infosystem/infoplugins/unix/fdonotifyplugin.h - infosystem/infoplugins/unix/imageconverter.h ) + infosystem/infoplugins/unix/fdonotifyplugin.h ) ENDIF( UNIX AND NOT APPLE ) IF( WIN32 ) diff --git a/src/libtomahawk/kdsingleapplicationguard/kdtoolsglobal.cpp b/src/libtomahawk/kdsingleapplicationguard/kdtoolsglobal.cpp index 5997fe64c..b057614d7 100644 --- a/src/libtomahawk/kdsingleapplicationguard/kdtoolsglobal.cpp +++ b/src/libtomahawk/kdsingleapplicationguard/kdtoolsglobal.cpp @@ -19,7 +19,7 @@ namespace { } 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 const Version result = { { version[0] - '0', version[2] - '0', version[4] - '0' } }; return result; diff --git a/src/libtomahawk/playlist/albumproxymodel.cpp b/src/libtomahawk/playlist/albumproxymodel.cpp index 90541d5df..6bafcdce5 100644 --- a/src/libtomahawk/playlist/albumproxymodel.cpp +++ b/src/libtomahawk/playlist/albumproxymodel.cpp @@ -40,6 +40,7 @@ AlbumProxyModel::AlbumProxyModel( QObject* parent ) setSourceAlbumModel( 0 ); } + void AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel ) { @@ -48,6 +49,7 @@ AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel ) Q_ASSERT( false ); } + void AlbumProxyModel::setSourceAlbumModel( AlbumModel* sourceModel ) { diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp index c6fa45c9e..d2502fd95 100644 --- a/src/libtomahawk/playlist/artistview.cpp +++ b/src/libtomahawk/playlist/artistview.cpp @@ -120,7 +120,7 @@ ArtistView::setTreeModel( TreeModel* model ) if ( m_proxyModel ) { - m_proxyModel->setSourceModel( model ); + m_proxyModel->setSourceTreeModel( model ); m_proxyModel->sort( 0 ); } diff --git a/src/libtomahawk/playlist/dynamic/DynamicModel.h b/src/libtomahawk/playlist/dynamic/DynamicModel.h index ed8f6feeb..5c56d613f 100644 --- a/src/libtomahawk/playlist/dynamic/DynamicModel.h +++ b/src/libtomahawk/playlist/dynamic/DynamicModel.h @@ -27,7 +27,6 @@ namespace Tomahawk class StationModelItem; - /** * Extends PlaylistModel with support for handling stations */ @@ -55,6 +54,9 @@ public: // a batchof static tracks wre generated void tracksGenerated( const QList< query_ptr > entries, int limitResolvedTo = -1 ); + + using PlaylistModel::loadPlaylist; + signals: void collapseFromTo( int startRow, int num ); void checkForOverflow(); @@ -62,6 +64,7 @@ signals: void trackGenerationFailure( const QString& msg ); void tracksAdded(); + private slots: void newTrackGenerated( const Tomahawk::query_ptr& query ); @@ -69,6 +72,7 @@ private slots: void newTrackLoading(); void filteringTrackResolved( bool successful ); + private: void filterUnresolved( const QList< query_ptr >& entries ); void addToPlaylist( const QList< query_ptr >& entries, bool clearFirst ); diff --git a/src/libtomahawk/playlist/queueproxymodel.cpp b/src/libtomahawk/playlist/queueproxymodel.cpp index c52fb2c88..8fbff81b9 100644 --- a/src/libtomahawk/playlist/queueproxymodel.cpp +++ b/src/libtomahawk/playlist/queueproxymodel.cpp @@ -1,5 +1,5 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser * * Tomahawk is free software: you can redistribute it and/or modify @@ -47,13 +47,12 @@ QueueProxyModel::siblingItem( int itemsAway ) setCurrentIndex( QModelIndex() ); Tomahawk::result_ptr res = PlaylistProxyModel::siblingItem( itemsAway ); - qDebug() << "new rowcount:" << rowCount( QModelIndex() ); - removeIndex( currentIndex() ); return res; } + void QueueProxyModel::onTrackCountChanged( unsigned int count ) { diff --git a/src/libtomahawk/playlist/queueproxymodel.h b/src/libtomahawk/playlist/queueproxymodel.h index e7fc1826d..16dd5273e 100644 --- a/src/libtomahawk/playlist/queueproxymodel.h +++ b/src/libtomahawk/playlist/queueproxymodel.h @@ -1,5 +1,5 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser * * Tomahawk is free software: you can redistribute it and/or modify @@ -35,6 +35,8 @@ public: virtual Tomahawk::result_ptr siblingItem( int itemsAway ); + using PlaylistProxyModel::siblingItem; + private slots: void onTrackCountChanged( unsigned int count ); }; diff --git a/src/libtomahawk/playlist/treeproxymodel.cpp b/src/libtomahawk/playlist/treeproxymodel.cpp index 2f04dcb84..b1e3450b5 100644 --- a/src/libtomahawk/playlist/treeproxymodel.cpp +++ b/src/libtomahawk/playlist/treeproxymodel.cpp @@ -37,19 +37,27 @@ TreeProxyModel::TreeProxyModel( QObject* parent ) setSortCaseSensitivity( Qt::CaseInsensitive ); setDynamicSortFilter( true ); - setSourceModel( 0 ); + setSourceTreeModel( 0 ); } 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; if ( m_model && m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 ) connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); - QSortFilterProxyModel::setSourceModel( sourceModel ); } diff --git a/src/libtomahawk/playlist/treeproxymodel.h b/src/libtomahawk/playlist/treeproxymodel.h index 5e33ddcb3..68deab1be 100644 --- a/src/libtomahawk/playlist/treeproxymodel.h +++ b/src/libtomahawk/playlist/treeproxymodel.h @@ -34,7 +34,8 @@ public: explicit TreeProxyModel( QObject* parent = 0 ); 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 void setCurrentIndex( const QModelIndex& index ) { m_model->setCurrentItem( mapToSource( index ) ); } diff --git a/src/sip/jabber/CMakeLists.txt b/src/sip/jabber/CMakeLists.txt index a7cd6992e..98815219c 100644 --- a/src/sip/jabber/CMakeLists.txt +++ b/src/sip/jabber/CMakeLists.txt @@ -16,8 +16,6 @@ set( jabberSources set( jabberHeaders jabber.h - tomahawksipmessage.h - tomahawksipmessagefactory.h avatarmanager.h xmlconsole.h ) diff --git a/src/sip/jabber/googlewrapper/CMakeLists.txt b/src/sip/jabber/googlewrapper/CMakeLists.txt index 3ebd653e0..6f9e310c7 100644 --- a/src/sip/jabber/googlewrapper/CMakeLists.txt +++ b/src/sip/jabber/googlewrapper/CMakeLists.txt @@ -3,8 +3,6 @@ set( googleHeaders ../jabber.h - ../tomahawksipmessage.h - ../tomahawksipmessagefactory.h ../avatarmanager.h ../xmlconsole.h googlewrapper.h ) diff --git a/src/sip/jabber/jabber.h b/src/sip/jabber/jabber.h index f77d6bda3..8462b1092 100644 --- a/src/sip/jabber/jabber.h +++ b/src/sip/jabber/jabber.h @@ -133,6 +133,8 @@ private: bool presenceMeansOnline( Jreen::Presence::Type p ); void handlePeerStatus( const Jreen::JID &jid, Jreen::Presence::Type presenceType ); + using SipPlugin::errorMessage; + QMenu* m_menu; XmlConsole* m_xmlConsole; QString m_currentUsername;