1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

* Removed include/ folder and did some clean-ups.

This commit is contained in:
Christian Muehlhaeuser
2011-05-18 04:06:03 +02:00
parent 917f904cbf
commit 3cee48dc15
19 changed files with 67 additions and 106 deletions

View File

@@ -1,31 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PLUGIN_INCLUDES_H
#define PLUGIN_INCLUDES_H
// all the stuff a plugin needs
#include "tomahawk/resolver.h"
#include "tomahawk/pluginapi.h"
#include "tomahawk/typedefs.h"
#include "tomahawk/tomahawkplugin.h"
#include "tomahawk/collection.h"
#include "tomahawk/source.h"
#endif // PLUGIN_INCLUDES_H

View File

@@ -17,7 +17,6 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( TOMAHAWK_INC_DIR "${CMAKE_SOURCE_DIR}/include/" )
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" ) IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
MESSAGE( "Building in debug mode, enabling all debug updates" ) MESSAGE( "Building in debug mode, enabling all debug updates" )
SET( DEBUG_BUILD ON ) SET( DEBUG_BUILD ON )
@@ -73,8 +72,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
) )
SET( tomahawkHeaders ${tomahawkHeaders} SET( tomahawkHeaders ${tomahawkHeaders}
"${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h" tomahawkapp.h
web/api_v1.h web/api_v1.h
@@ -128,7 +126,6 @@ SET( tomahawkUI ${tomahawkUI}
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
. .
${TOMAHAWK_INC_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src ${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src

View File

@@ -355,7 +355,6 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
${PHONON_INCLUDES} ${PHONON_INCLUDES}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src ${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
../../include
playlist playlist
${THIRDPARTY_DIR}/libportfwd/include ${THIRDPARTY_DIR}/libportfwd/include

View File

@@ -185,6 +185,7 @@ Servent::createConnectionKey( const QString& name, const QString &nodeid, const
if( !nodeid.isEmpty() ) if( !nodeid.isEmpty() )
cc->setId( nodeid ); cc->setId( nodeid );
cc->setOnceOnly( onceOnly ); cc->setOnceOnly( onceOnly );
qDebug() << "Creating connection key with name of " << cc->name() << " and id of " << cc->id() << " and key of " << _key << "; key is once only? : " << (onceOnly ? "true" : "false"); qDebug() << "Creating connection key with name of " << cc->name() << " and id of " << cc->id() << " and key of " << _key << "; key is once only? : " << (onceOnly ? "true" : "false");
registerOffer( _key, cc ); registerOffer( _key, cc );
return _key; return _key;
@@ -439,7 +440,6 @@ void Servent::handoverSocket( Connection* conn, QTcpSocketExtra* sock )
disconnect( sock, SIGNAL( error( QAbstractSocket::SocketError ) ), disconnect( sock, SIGNAL( error( QAbstractSocket::SocketError ) ),
this, SLOT( socketError( QAbstractSocket::SocketError ) ) ); this, SLOT( socketError( QAbstractSocket::SocketError ) ) );
sock->_disowned = true; sock->_disowned = true;
conn->setOutbound( sock->_outbound ); conn->setOutbound( sock->_outbound );
conn->setPeerPort( sock->peerPort() ); conn->setPeerPort( sock->peerPort() );

View File

@@ -344,70 +344,67 @@ Playlist::setNewRevision( const QString& rev,
foreach( const plentry_ptr& p, m_entries ) foreach( const plentry_ptr& p, m_entries )
entriesmap.insert( p->guid(), p ); entriesmap.insert( p->guid(), p );
QList<plentry_ptr> entries;
foreach( const QString& id, neworderedguids )
{
qDebug() << "id:" << id;
qDebug() << "newordered:" << neworderedguids.count() << neworderedguids;
qDebug() << "entriesmap:" << entriesmap.count() << entriesmap;
qDebug() << "addedmap:" << addedmap.count() << addedmap;
qDebug() << "m_entries" << m_entries;
QList<plentry_ptr> entries; if( entriesmap.contains( id ) )
foreach( const QString& id, neworderedguids )
{ {
//qDebug() << "id:" << id; entries.append( entriesmap.value( id ) );
//qDebug() << "newordered:" << neworderedguids.count() << neworderedguids;
//qDebug() << "entriesmap:" << entriesmap.count() << entriesmap;
//qDebug() << "addedmap:" << addedmap.count() << addedmap;
//qDebug() << "m_entries" << m_entries;
if( entriesmap.contains( id ) )
{
entries.append( entriesmap.value( id ) );
}
else if( addedmap.contains( id ) )
{
entries.append( addedmap.value( id ) );
if( is_newest_rev )
m_entries.append( addedmap.value( id ) );
}
else
{
Q_ASSERT( false ); // XXX
}
} }
else if( addedmap.contains( id ) )
//qDebug() << Q_FUNC_INFO << rev << entries.length() << applied;
PlaylistRevision pr;
pr.oldrevisionguid = m_currentrevision;
pr.revisionguid = rev;
// entries that have been removed:
QSet<QString> removedguids = oldorderedguids.toSet().subtract( neworderedguids.toSet() );
//qDebug() << "Removedguids:" << removedguids << "oldorederedguids" << oldorderedguids << "newog" << neworderedguids;
foreach( QString remid, removedguids )
{ {
// NB: entriesmap will contain old/removed entries only if the removal was done entries.append( addedmap.value( id ) );
// in the same session - after a restart, history is not in memory. if( is_newest_rev )
if( entriesmap.contains( remid ) ) m_entries.append( addedmap.value( id ) );
}
else
{
Q_ASSERT( false ); // XXX
}
}
//qDebug() << Q_FUNC_INFO << rev << entries.length() << applied;
PlaylistRevision pr;
pr.oldrevisionguid = m_currentrevision;
pr.revisionguid = rev;
// entries that have been removed:
QSet<QString> removedguids = oldorderedguids.toSet().subtract( neworderedguids.toSet() );
//qDebug() << "Removedguids:" << removedguids << "oldorederedguids" << oldorderedguids << "newog" << neworderedguids;
foreach( QString remid, removedguids )
{
// NB: entriesmap will contain old/removed entries only if the removal was done
// in the same session - after a restart, history is not in memory.
if( entriesmap.contains( remid ) )
{
pr.removed << entriesmap.value( remid );
if( is_newest_rev )
{ {
pr.removed << entriesmap.value( remid ); //qDebug() << "Removing from m_entries" << remid;
if( is_newest_rev ) for( int k = 0 ; k < m_entries.length(); ++k )
{ {
//qDebug() << "Removing from m_entries" << remid; if( m_entries.at( k )->guid() == remid )
for( int k = 0 ; k < m_entries.length(); ++k )
{ {
if( m_entries.at( k )->guid() == remid ) //qDebug() << "removed at" << k;
{ m_entries.removeAt( k );
//qDebug() << "removed at" << k; break;
m_entries.removeAt( k );
break;
}
} }
} }
} }
} }
}
pr.added = addedmap.values(); pr.added = addedmap.values();
pr.newlist = entries;
pr.newlist = entries; return pr;
return pr;
} }

View File

@@ -19,7 +19,6 @@
#include "SipModel.h" #include "SipModel.h"
#include "tomahawksettings.h" #include "tomahawksettings.h"
#include "tomahawk/tomahawkapp.h"
#include "sip/SipHandler.h" #include "sip/SipHandler.h"
#include "sip/SipPlugin.h" #include "sip/SipPlugin.h"

View File

@@ -16,7 +16,7 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "tomahawk/tomahawkapp.h" #include "tomahawkapp.h"
#include "kdsingleapplicationguard/kdsingleapplicationguard.h" #include "kdsingleapplicationguard/kdsingleapplicationguard.h"

View File

@@ -18,7 +18,9 @@
#include "musicscanner.h" #include "musicscanner.h"
#include "tomahawk/tomahawkapp.h" #include <QCoreApplication>
#include "utils/tomahawkutils.h"
#include "tomahawksettings.h" #include "tomahawksettings.h"
#include "sourcelist.h" #include "sourcelist.h"
#include "database/database.h" #include "database/database.h"

View File

@@ -20,7 +20,6 @@
#include "resolverconfigdelegate.h" #include "resolverconfigdelegate.h"
#include "resolversmodel.h" #include "resolversmodel.h"
#include "tomahawk/tomahawkapp.h"
#include <QApplication> #include <QApplication>
#include <QPainter> #include <QPainter>
@@ -28,6 +27,7 @@
#define PADDING 4 #define PADDING 4
#define ICONSIZE 24 #define ICONSIZE 24
ResolverConfigDelegate::ResolverConfigDelegate( QObject* parent ) ResolverConfigDelegate::ResolverConfigDelegate( QObject* parent )
: ConfigDelegateBase( parent ) : ConfigDelegateBase( parent )
{ {

View File

@@ -16,11 +16,12 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "resolversmodel.h" #include "resolversmodel.h"
#include <QFileInfo> #include <QFileInfo>
#include <tomahawksettings.h> #include <tomahawksettings.h>
#include <tomahawk/tomahawkapp.h> #include <tomahawkapp.h>
ResolversModel::ResolversModel( const QStringList& allResolvers, const QStringList& enabledResolvers, QObject* parent ) ResolversModel::ResolversModel( const QStringList& allResolvers, const QStringList& enabledResolvers, QObject* parent )

View File

@@ -33,12 +33,12 @@
#endif #endif
#include "settingsdialog.h" #include "settingsdialog.h"
#include "ui_proxydialog.h"
#include "tomahawk/tomahawkapp.h" #include "tomahawkapp.h"
#include "musicscanner.h" #include "musicscanner.h"
#include "tomahawksettings.h" #include "tomahawksettings.h"
#include "sip/SipHandler.h" #include "sip/SipHandler.h"
#include <database/database.h> #include "database/database.h"
#include "scanmanager.h" #include "scanmanager.h"
#include "resolverconfigdelegate.h" #include "resolverconfigdelegate.h"
#include "resolversmodel.h" #include "resolversmodel.h"
@@ -46,6 +46,7 @@
#include "sip/SipModel.h" #include "sip/SipModel.h"
#include "sipconfigdelegate.h" #include "sipconfigdelegate.h"
#include "ui_proxydialog.h"
#include "ui_stackedsettingsdialog.h" #include "ui_stackedsettingsdialog.h"
static QString static QString

View File

@@ -16,8 +16,8 @@
#include "categoryitems.h" #include "categoryitems.h"
#include "tomahawkapp.h"
#include "utils/tomahawkutils.h" #include "utils/tomahawkutils.h"
#include "tomahawk/tomahawkapp.h"
#include "widgets/newplaylistwidget.h" #include "widgets/newplaylistwidget.h"
#include "viewmanager.h" #include "viewmanager.h"
#include "viewpage.h" #include "viewpage.h"

View File

@@ -15,7 +15,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "sourcetree/sourcesmodel.h" #include "sourcetree/sourcesmodel.h"
#include "sourcetree/items/sourcetreeitem.h" #include "sourcetree/items/sourcetreeitem.h"
@@ -25,7 +24,6 @@
#include "playlist.h" #include "playlist.h"
#include "collection.h" #include "collection.h"
#include "source.h" #include "source.h"
#include "tomahawk/tomahawkapp.h"
#include "viewmanager.h" #include "viewmanager.h"
#include <boost/bind.hpp> #include <boost/bind.hpp>

View File

@@ -24,9 +24,9 @@
#include "sourcelist.h" #include "sourcelist.h"
#include "sourcetree/items/playlistitems.h" #include "sourcetree/items/playlistitems.h"
#include "sourcetree/items/collectionitem.h" #include "sourcetree/items/collectionitem.h"
#include "tomahawk/tomahawkapp.h"
#include <QAction> #include <QAction>
#include <QApplication>
#include <QContextMenuEvent> #include <QContextMenuEvent>
#include <QDragEnterEvent> #include <QDragEnterEvent>
#include <QHeaderView> #include <QHeaderView>

View File

@@ -16,7 +16,7 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "tomahawk/tomahawkapp.h" #include "tomahawkapp.h"
#include "config.h" #include "config.h"

View File

@@ -20,10 +20,10 @@
#include <QWheelEvent> #include <QWheelEvent>
#include "tomahawk/tomahawkapp.h"
#include "artist.h" #include "artist.h"
#include "audio/audioengine.h" #include "audio/audioengine.h"
#include "tomahawkapp.h"
#include "tomahawkwindow.h" #include "tomahawkwindow.h"

View File

@@ -32,7 +32,6 @@
#include <QTimer> #include <QTimer>
#include <QToolBar> #include <QToolBar>
#include "tomahawk/tomahawkapp.h"
#include "playlist.h" #include "playlist.h"
#include "query.h" #include "query.h"
#include "artist.h" #include "artist.h"
@@ -275,7 +274,7 @@ TomahawkWindow::setupSignals()
connect( ui->actionCreateAutomaticPlaylist, SIGNAL( triggered() ), SLOT( createAutomaticPlaylist() )); connect( ui->actionCreateAutomaticPlaylist, SIGNAL( triggered() ), SLOT( createAutomaticPlaylist() ));
connect( ui->actionCreate_New_Station, SIGNAL( triggered() ), SLOT( createStation() )); connect( ui->actionCreate_New_Station, SIGNAL( triggered() ), SLOT( createStation() ));
connect( ui->actionAboutTomahawk, SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) ); connect( ui->actionAboutTomahawk, SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) );
connect( ui->actionExit, SIGNAL( triggered() ), APP, SLOT( quit() ) ); connect( ui->actionExit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
#if defined( Q_OS_DARWIN ) #if defined( Q_OS_DARWIN )
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) ); connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) ); connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );

View File

@@ -21,7 +21,6 @@
#include <QHeaderView> #include <QHeaderView>
#include <QVBoxLayout> #include <QVBoxLayout>
#include "tomahawk/tomahawkapp.h"
#include "artist.h" #include "artist.h"
#include "source.h" #include "source.h"
#include "network/streamconnection.h" #include "network/streamconnection.h"