mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
Auto-create zeroconf plugin with new installs
Actually save no-config-widget plugins to settings too
This commit is contained in:
@@ -47,6 +47,7 @@ TomahawkSettings::TomahawkSettings( QObject* parent )
|
|||||||
if( !contains( "configversion") )
|
if( !contains( "configversion") )
|
||||||
{
|
{
|
||||||
setValue( "configversion", VERSION );
|
setValue( "configversion", VERSION );
|
||||||
|
doInitialSetup();
|
||||||
}
|
}
|
||||||
else if( value( "configversion" ).toUInt() != VERSION )
|
else if( value( "configversion" ).toUInt() != VERSION )
|
||||||
{
|
{
|
||||||
@@ -72,6 +73,14 @@ TomahawkSettings::~TomahawkSettings()
|
|||||||
s_instance = 0;
|
s_instance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TomahawkSettings::doInitialSetup()
|
||||||
|
{
|
||||||
|
// by default we add a local network resolver
|
||||||
|
addSipPlugin( "sipzeroconf_autocreated" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
||||||
{
|
{
|
||||||
@@ -104,10 +113,6 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
|||||||
remove( "jabber/autoconnect" );
|
remove( "jabber/autoconnect" );
|
||||||
remove( "jabber/server" );
|
remove( "jabber/server" );
|
||||||
remove( "jabber/port" );
|
remove( "jabber/port" );
|
||||||
|
|
||||||
// will be auto-added in the appropriate places
|
|
||||||
// SipPlugin* p = SipHandler::instance()->loadPlugin( "sipjabber_legacy" );
|
|
||||||
// SipHandler::instance()->enablePlugin( p );
|
|
||||||
}
|
}
|
||||||
if( contains( "twitter/ScreenName" ) && contains( "twitter/OAuthToken" ) )
|
if( contains( "twitter/ScreenName" ) && contains( "twitter/OAuthToken" ) )
|
||||||
{
|
{
|
||||||
@@ -127,14 +132,9 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
|||||||
remove( "twitter/CachedFriendsSinceID" );
|
remove( "twitter/CachedFriendsSinceID" );
|
||||||
remove( "twitter/CachedMentionsSinceID" );
|
remove( "twitter/CachedMentionsSinceID" );
|
||||||
remove( "twitter/CachedDirectMessagesSinceID" );
|
remove( "twitter/CachedDirectMessagesSinceID" );
|
||||||
|
|
||||||
// SipPlugin* p = SipHandler::instance()->loadPlugin( "siptwitter_legacy" );
|
|
||||||
// SipHandler::instance()->enablePlugin( p );
|
|
||||||
}
|
}
|
||||||
// create a zeroconf plugin too
|
// create a zeroconf plugin too
|
||||||
addSipPlugin( "sipzeroconf_legacy" );
|
addSipPlugin( "sipzeroconf_legacy" );
|
||||||
// SipPlugin* p = SipHandler::instance()->createPlugin( "sipzeroconf" );
|
|
||||||
// SipHandler::instance()->enablePlugin( p );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -162,6 +162,7 @@ signals:
|
|||||||
void recentlyPlayedPlaylistAdded( const Tomahawk::playlist_ptr& playlist );
|
void recentlyPlayedPlaylistAdded( const Tomahawk::playlist_ptr& playlist );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void doInitialSetup();
|
||||||
void doUpgrade( int oldVersion, int newVersion );
|
void doUpgrade( int oldVersion, int newVersion );
|
||||||
|
|
||||||
static TomahawkSettings* s_instance;
|
static TomahawkSettings* s_instance;
|
||||||
|
@@ -542,6 +542,7 @@ SettingsDialog::sipFactoryClicked( SipPluginFactory* factory )
|
|||||||
} else {
|
} else {
|
||||||
// no config, so just add it
|
// no config, so just add it
|
||||||
added = true;
|
added = true;
|
||||||
|
TomahawkSettings::instance()->addSipPlugin( p->pluginId() );
|
||||||
SipHandler::instance()->addSipPlugin( p );
|
SipHandler::instance()->addSipPlugin( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,8 +26,6 @@ ZeroconfFactory::createPlugin( const QString& pluginId )
|
|||||||
return new ZeroconfPlugin( pluginId.isEmpty() ? generateId() : pluginId );
|
return new ZeroconfPlugin( pluginId.isEmpty() ? generateId() : pluginId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const QString
|
const QString
|
||||||
ZeroconfPlugin::name() const
|
ZeroconfPlugin::name() const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user