mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-22 16:59:58 +01:00
Merge branch 'master' of git://github.com/tomahawk-player/tomahawk
Conflicts: src/libtomahawk/sip/SipHandler.cpp
This commit is contained in:
commit
968971a3cf
@ -9,10 +9,8 @@ Version 0.1.0:
|
||||
added to or removed from folders; it is not watch individual files as
|
||||
most OSes can't support enough file watches to handle a normal-sized
|
||||
music collection.
|
||||
|
||||
Version 0.0.4:
|
||||
* Fixed crash that could occur when playing a track from a browser.
|
||||
* Fixed a crash situation caused by sources going on- or offline.
|
||||
* Fixed a crash caused by sources going on- or offline.
|
||||
|
||||
Version 0.0.3:
|
||||
* Show spinner while resolving playlists.
|
||||
|
@ -185,7 +185,6 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( !err )
|
||||
@ -195,15 +194,19 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
|
||||
if ( !m_input.isNull() || m_isPlayingHttp )
|
||||
{
|
||||
if ( !m_input.isNull() )
|
||||
{
|
||||
m_input->close();
|
||||
m_input.clear();
|
||||
}
|
||||
|
||||
m_expectStop = true;
|
||||
}
|
||||
|
||||
|
||||
m_mediaObject->currentSource().setAutoDelete( true );
|
||||
|
||||
if ( !isHttpResult( m_currentTrack->url() ) )
|
||||
{
|
||||
m_mediaObject->setCurrentSource( io.data() );
|
||||
m_mediaObject->currentSource().setAutoDelete( false );
|
||||
m_isPlayingHttp = false;
|
||||
}
|
||||
else
|
||||
@ -216,6 +219,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
qDebug() << Q_FUNC_INFO << furl;
|
||||
}
|
||||
m_mediaObject->setCurrentSource( furl );
|
||||
m_mediaObject->currentSource().setAutoDelete( true );
|
||||
m_isPlayingHttp = true;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,8 @@ ControlConnection::~ControlConnection()
|
||||
|
||||
delete m_pingtimer;
|
||||
m_servent->unregisterControlConnection( this );
|
||||
delete m_dbsyncconn;
|
||||
if ( m_dbsyncconn )
|
||||
m_dbsyncconn->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* === 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
|
||||
@ -69,6 +69,7 @@ DBSyncConnection::DBSyncConnection( Servent* s, source_ptr src )
|
||||
DBSyncConnection::~DBSyncConnection()
|
||||
{
|
||||
qDebug() << "DTOR" << Q_FUNC_INFO;
|
||||
m_state = SHUTDOWN;
|
||||
}
|
||||
|
||||
|
||||
@ -83,6 +84,9 @@ DBSyncConnection::idleTimeout()
|
||||
void
|
||||
DBSyncConnection::changeState( State newstate )
|
||||
{
|
||||
if ( m_state == SHUTDOWN )
|
||||
return;
|
||||
|
||||
State s = m_state;
|
||||
m_state = newstate;
|
||||
qDebug() << "DBSYNC State changed from" << s << "to" << newstate;
|
||||
@ -124,6 +128,12 @@ DBSyncConnection::check()
|
||||
qDebug() << "Syncing in progress already.";
|
||||
return;
|
||||
}
|
||||
if ( m_state == SHUTDOWN )
|
||||
{
|
||||
qDebug() << "Aborting sync due to shutdown.";
|
||||
return;
|
||||
}
|
||||
|
||||
m_uscache.clear();
|
||||
m_themcache.clear();
|
||||
m_us.clear();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* === 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
|
||||
@ -41,7 +41,8 @@ public:
|
||||
PARSING,
|
||||
SAVING,
|
||||
SYNCED,
|
||||
SCANNING
|
||||
SCANNING,
|
||||
SHUTDOWN
|
||||
};
|
||||
|
||||
explicit DBSyncConnection( Servent* s, Tomahawk::source_ptr src );
|
||||
@ -81,7 +82,6 @@ private:
|
||||
QString m_lastSentOp;
|
||||
|
||||
QTimer m_timer;
|
||||
|
||||
};
|
||||
|
||||
#endif // DBSYNCCONNECTION_H
|
||||
|
@ -30,16 +30,12 @@
|
||||
#include "network/controlconnection.h"
|
||||
#include "sourcelist.h"
|
||||
#include "tomahawksettings.h"
|
||||
//#include "tomahawk/tomahawkapp.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
//remove
|
||||
#include <QLabel>
|
||||
|
||||
SipHandler* SipHandler::s_instance = 0;
|
||||
|
||||
|
||||
SipHandler*
|
||||
SipHandler::instance()
|
||||
{
|
||||
@ -163,6 +159,7 @@ SipHandler::loadPluginFactories( const QStringList& paths )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SipPlugin*
|
||||
SipHandler::createPlugin( const QString& factoryId )
|
||||
{
|
||||
@ -175,6 +172,7 @@ SipHandler::createPlugin( const QString& factoryId )
|
||||
return sip;
|
||||
}
|
||||
|
||||
|
||||
SipPlugin*
|
||||
SipHandler::loadPlugin( const QString& pluginId )
|
||||
{
|
||||
@ -188,6 +186,7 @@ SipHandler::loadPlugin( const QString& pluginId )
|
||||
return sip;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::removePlugin( SipPlugin* p )
|
||||
{
|
||||
@ -263,6 +262,7 @@ SipHandler::checkSettings()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::addSipPlugin( SipPlugin* p, bool enabled, bool startup )
|
||||
{
|
||||
@ -278,6 +278,7 @@ SipHandler::addSipPlugin( SipPlugin* p, bool enabled, bool startup )
|
||||
emit pluginAdded( p );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::removeSipPlugin( SipPlugin* p )
|
||||
{
|
||||
@ -290,6 +291,7 @@ SipHandler::removeSipPlugin( SipPlugin* p )
|
||||
m_enabledPlugins.removeAll( p );
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SipHandler::hasPluginType( const QString& factoryId ) const
|
||||
{
|
||||
@ -318,6 +320,7 @@ SipHandler::loadFromConfig( bool startup )
|
||||
m_connected = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::connectAll()
|
||||
{
|
||||
@ -339,6 +342,7 @@ SipHandler::disconnectAll()
|
||||
m_connected = false;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::disablePlugin( SipPlugin* p )
|
||||
{
|
||||
@ -350,6 +354,7 @@ SipHandler::disablePlugin( SipPlugin* p )
|
||||
m_enabledPlugins.removeAll( p );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::enablePlugin( SipPlugin* p )
|
||||
{
|
||||
@ -401,24 +406,28 @@ SipHandler::disconnectPlugin( const QString &pluginName )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QList< SipPlugin* >
|
||||
SipHandler::allPlugins() const
|
||||
{
|
||||
return m_allPlugins;
|
||||
}
|
||||
|
||||
|
||||
QList< SipPlugin* >
|
||||
SipHandler::enabledPlugins() const
|
||||
{
|
||||
return m_enabledPlugins;
|
||||
}
|
||||
|
||||
|
||||
QList< SipPlugin* >
|
||||
SipHandler::connectedPlugins() const
|
||||
{
|
||||
return m_connectedPlugins;
|
||||
}
|
||||
|
||||
|
||||
QList< SipPluginFactory* >
|
||||
SipHandler::pluginFactories() const
|
||||
{
|
||||
@ -435,6 +444,7 @@ SipHandler::toggleConnect()
|
||||
connectAll();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::setProxy( const QNetworkProxy& proxy )
|
||||
{
|
||||
@ -500,6 +510,7 @@ SipHandler::onPeerOffline( const QString& jid )
|
||||
qDebug() << "SIP offline:" << jid;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onSipInfo( const QString& peerId, const SipInfo& info )
|
||||
{
|
||||
@ -565,6 +576,7 @@ SipHandler::onError( int code, const QString& msg )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onStateChanged( SipPlugin::ConnectionState state )
|
||||
{
|
||||
@ -619,6 +631,7 @@ SipHandler::onAvatarReceived( const QString& from, const QPixmap& avatar )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onAvatarReceived( const QPixmap& avatar )
|
||||
{
|
||||
@ -633,6 +646,7 @@ SipHandler::factoryFromId( const QString& pluginId ) const
|
||||
return pluginId.split( "_" ).first();
|
||||
}
|
||||
|
||||
|
||||
SipPluginFactory*
|
||||
SipHandler::factoryFromPlugin( SipPlugin* p ) const
|
||||
{
|
||||
|
@ -144,8 +144,8 @@ JabberPlugin::~JabberPlugin()
|
||||
{
|
||||
delete m_avatarManager;
|
||||
delete m_roster;
|
||||
delete m_client;
|
||||
delete m_xmlConsole;
|
||||
delete m_client;
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user