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