mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
C++11 style fixes
This commit is contained in:
@@ -25,11 +25,11 @@
|
|||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
using namespace Accounts;
|
using namespace Accounts;
|
||||||
|
|
||||||
QPixmap* s_icon = 0;
|
QPixmap* s_icon = nullptr;
|
||||||
|
|
||||||
ZeroconfFactory::ZeroconfFactory()
|
ZeroconfFactory::ZeroconfFactory()
|
||||||
{
|
{
|
||||||
if ( s_icon == 0 )
|
if ( !s_icon )
|
||||||
s_icon = new QPixmap( ":/zeroconf-account/zeroconf-icon.png" );
|
s_icon = new QPixmap( ":/zeroconf-account/zeroconf-icon.png" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ ZeroconfFactory::~ZeroconfFactory()
|
|||||||
if ( s_icon )
|
if ( s_icon )
|
||||||
{
|
{
|
||||||
delete s_icon;
|
delete s_icon;
|
||||||
s_icon = 0;
|
s_icon = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,11 +66,12 @@ ZeroconfAccount::ZeroconfAccount( const QString& accountId )
|
|||||||
setTypes( SipType );
|
setTypes( SipType );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ZeroconfAccount::~ZeroconfAccount()
|
ZeroconfAccount::~ZeroconfAccount()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QPixmap
|
QPixmap
|
||||||
ZeroconfAccount::icon() const
|
ZeroconfAccount::icon() const
|
||||||
{
|
{
|
||||||
@@ -117,7 +118,7 @@ ZeroconfAccount::sipPlugin( bool create )
|
|||||||
{
|
{
|
||||||
if ( m_sipPlugin.isNull() ) {
|
if ( m_sipPlugin.isNull() ) {
|
||||||
if ( !create )
|
if ( !create )
|
||||||
return 0;
|
return nullptr;
|
||||||
|
|
||||||
m_sipPlugin = QPointer< ZeroconfPlugin >( new ZeroconfPlugin( this ) );
|
m_sipPlugin = QPointer< ZeroconfPlugin >( new ZeroconfPlugin( this ) );
|
||||||
}
|
}
|
||||||
|
@@ -41,15 +41,14 @@ public:
|
|||||||
ZeroconfFactory();
|
ZeroconfFactory();
|
||||||
virtual ~ZeroconfFactory();
|
virtual ~ZeroconfFactory();
|
||||||
|
|
||||||
virtual QString factoryId() const { return "zeroconfaccount"; }
|
QString factoryId() const override { return "zeroconfaccount"; }
|
||||||
virtual QString prettyName() const { return tr( "Local Network" ); }
|
QString prettyName() const override { return tr( "Local Network" ); }
|
||||||
QString description() const { return tr( "Automatically connect to Tomahawk users on the same local network." ); }
|
QString description() const override { return tr( "Automatically connect to Tomahawk users on the same local network." ); }
|
||||||
virtual bool isUnique() const { return true; }
|
bool isUnique() const override { return true; }
|
||||||
AccountTypes types() const { return AccountTypes( SipType ); }
|
AccountTypes types() const override { return AccountTypes( SipType ); }
|
||||||
virtual QPixmap icon() const;
|
QPixmap icon() const override;
|
||||||
|
|
||||||
|
Account* createAccount ( const QString& pluginId = QString() ) override;
|
||||||
virtual Account* createAccount ( const QString& pluginId = QString() );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACCOUNTDLLEXPORT ZeroconfAccount : public Account
|
class ACCOUNTDLLEXPORT ZeroconfAccount : public Account
|
||||||
@@ -59,18 +58,18 @@ public:
|
|||||||
ZeroconfAccount( const QString &accountId );
|
ZeroconfAccount( const QString &accountId );
|
||||||
virtual ~ZeroconfAccount();
|
virtual ~ZeroconfAccount();
|
||||||
|
|
||||||
QPixmap icon() const;
|
QPixmap icon() const override;
|
||||||
|
|
||||||
void authenticate();
|
void authenticate() override;
|
||||||
void deauthenticate();
|
void deauthenticate() override;
|
||||||
bool isAuthenticated() const;
|
bool isAuthenticated() const override;
|
||||||
ConnectionState connectionState() const;
|
ConnectionState connectionState() const override;
|
||||||
|
|
||||||
virtual Tomahawk::InfoSystem::InfoPluginPtr infoPlugin() { return Tomahawk::InfoSystem::InfoPluginPtr(); }
|
Tomahawk::InfoSystem::InfoPluginPtr infoPlugin() override { return Tomahawk::InfoSystem::InfoPluginPtr(); }
|
||||||
SipPlugin* sipPlugin( bool create = true );
|
SipPlugin* sipPlugin( bool create = true ) override;
|
||||||
|
|
||||||
AccountConfigWidget* configurationWidget() { return 0; }
|
AccountConfigWidget* configurationWidget() override { return nullptr; }
|
||||||
QWidget* aclWidget() { return 0; }
|
QWidget* aclWidget() override { return nullptr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer< ZeroconfPlugin > m_sipPlugin;
|
QPointer< ZeroconfPlugin > m_sipPlugin;
|
||||||
|
Reference in New Issue
Block a user