mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
* Fixed shutdown blocker in DbSyncConnection.
This commit is contained in:
@@ -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.
|
||||
|
@@ -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()
|
||||
{
|
||||
@@ -157,6 +153,7 @@ SipHandler::loadPluginFactories( const QStringList& paths )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SipPlugin*
|
||||
SipHandler::createPlugin( const QString& factoryId )
|
||||
{
|
||||
@@ -169,6 +166,7 @@ SipHandler::createPlugin( const QString& factoryId )
|
||||
return sip;
|
||||
}
|
||||
|
||||
|
||||
SipPlugin*
|
||||
SipHandler::loadPlugin( const QString& pluginId )
|
||||
{
|
||||
@@ -182,6 +180,7 @@ SipHandler::loadPlugin( const QString& pluginId )
|
||||
return sip;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::removePlugin( SipPlugin* p )
|
||||
{
|
||||
@@ -256,6 +255,7 @@ SipHandler::checkSettings()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::addSipPlugin( SipPlugin* p, bool enabled, bool startup )
|
||||
{
|
||||
@@ -271,6 +271,7 @@ SipHandler::addSipPlugin( SipPlugin* p, bool enabled, bool startup )
|
||||
emit pluginAdded( p );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::removeSipPlugin( SipPlugin* p )
|
||||
{
|
||||
@@ -283,6 +284,7 @@ SipHandler::removeSipPlugin( SipPlugin* p )
|
||||
m_enabledPlugins.removeAll( p );
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SipHandler::hasPluginType( const QString& factoryId ) const
|
||||
{
|
||||
@@ -311,6 +313,7 @@ SipHandler::loadFromConfig( bool startup )
|
||||
m_connected = true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::connectAll()
|
||||
{
|
||||
@@ -332,6 +335,7 @@ SipHandler::disconnectAll()
|
||||
m_connected = false;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::disablePlugin( SipPlugin* p )
|
||||
{
|
||||
@@ -343,6 +347,7 @@ SipHandler::disablePlugin( SipPlugin* p )
|
||||
m_enabledPlugins.removeAll( p );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::enablePlugin( SipPlugin* p )
|
||||
{
|
||||
@@ -394,24 +399,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
|
||||
{
|
||||
@@ -428,6 +437,7 @@ SipHandler::toggleConnect()
|
||||
connectAll();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::setProxy( const QNetworkProxy& proxy )
|
||||
{
|
||||
@@ -493,6 +503,7 @@ SipHandler::onPeerOffline( const QString& jid )
|
||||
qDebug() << "SIP offline:" << jid;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onSipInfo( const QString& peerId, const SipInfo& info )
|
||||
{
|
||||
@@ -528,6 +539,7 @@ SipHandler::onSipInfo( const QString& peerId, const SipInfo& info )
|
||||
m_peersSipInfos.insert( peerId, info );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onMessage( const QString& from, const QString& msg )
|
||||
{
|
||||
@@ -553,6 +565,7 @@ SipHandler::onError( int code, const QString& msg )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onStateChanged( SipPlugin::ConnectionState state )
|
||||
{
|
||||
@@ -607,6 +620,7 @@ SipHandler::onAvatarReceived( const QString& from, const QPixmap& avatar )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SipHandler::onAvatarReceived( const QPixmap& avatar )
|
||||
{
|
||||
@@ -621,6 +635,7 @@ SipHandler::factoryFromId( const QString& pluginId ) const
|
||||
return pluginId.split( "_" ).first();
|
||||
}
|
||||
|
||||
|
||||
SipPluginFactory*
|
||||
SipHandler::factoryFromPlugin( SipPlugin* p ) const
|
||||
{
|
||||
|
@@ -143,8 +143,8 @@ JabberPlugin::~JabberPlugin()
|
||||
{
|
||||
delete m_avatarManager;
|
||||
delete m_roster;
|
||||
delete m_client;
|
||||
delete m_xmlConsole;
|
||||
delete m_client;
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user