1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 09:19:41 +01: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

@ -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

@ -17,7 +17,6 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_LIBRARY_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" )
MESSAGE( "Building in debug mode, enabling all debug updates" )
SET( DEBUG_BUILD ON )
@ -73,8 +72,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
)
SET( tomahawkHeaders ${tomahawkHeaders}
"${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h"
tomahawkapp.h
web/api_v1.h
@ -128,7 +126,6 @@ SET( tomahawkUI ${tomahawkUI}
INCLUDE_DIRECTORIES(
.
${TOMAHAWK_INC_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src

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

@ -185,6 +185,7 @@ Servent::createConnectionKey( const QString& name, const QString &nodeid, const
if( !nodeid.isEmpty() )
cc->setId( nodeid );
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");
registerOffer( _key, cc );
return _key;
@ -439,7 +440,6 @@ void Servent::handoverSocket( Connection* conn, QTcpSocketExtra* sock )
disconnect( sock, SIGNAL( error( QAbstractSocket::SocketError ) ),
this, SLOT( socketError( QAbstractSocket::SocketError ) ) );
sock->_disowned = true;
conn->setOutbound( sock->_outbound );
conn->setPeerPort( sock->peerPort() );

@ -344,70 +344,67 @@ Playlist::setNewRevision( const QString& rev,
foreach( const plentry_ptr& p, m_entries )
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;
foreach( const QString& id, neworderedguids )
if( entriesmap.contains( id ) )
{
//qDebug() << "id:" << 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
}
entries.append( entriesmap.value( 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 )
else if( addedmap.contains( id ) )
{
// 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 ) )
entries.append( addedmap.value( id ) );
if( is_newest_rev )
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 );
if( is_newest_rev )
//qDebug() << "Removing from m_entries" << remid;
for( int k = 0 ; k < m_entries.length(); ++k )
{
//qDebug() << "Removing from m_entries" << remid;
for( int k = 0 ; k < m_entries.length(); ++k )
if( m_entries.at( k )->guid() == remid )
{
if( m_entries.at( k )->guid() == remid )
{
//qDebug() << "removed at" << k;
m_entries.removeAt( k );
break;
}
//qDebug() << "removed at" << k;
m_entries.removeAt( k );
break;
}
}
}
}
}
pr.added = addedmap.values();
pr.added = addedmap.values();
pr.newlist = entries;
return pr;
pr.newlist = entries;
return pr;
}

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

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

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

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

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

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

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

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

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

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

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

@ -32,7 +32,6 @@
#include <QTimer>
#include <QToolBar>
#include "tomahawk/tomahawkapp.h"
#include "playlist.h"
#include "query.h"
#include "artist.h"
@ -275,7 +274,7 @@ TomahawkWindow::setupSignals()
connect( ui->actionCreateAutomaticPlaylist, SIGNAL( triggered() ), SLOT( createAutomaticPlaylist() ));
connect( ui->actionCreate_New_Station, SIGNAL( triggered() ), SLOT( createStation() ));
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 )
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );

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