mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-10-04 17:41:42 +02:00
qt5: don't use QWeakPointer to track QObject* anymore
This commit is contained in:
@@ -95,7 +95,7 @@ private:
|
||||
|
||||
Ui::AudioControls* ui;
|
||||
|
||||
QWeakPointer<SocialWidget> m_socialWidget;
|
||||
QPointer<SocialWidget> m_socialWidget;
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::PlaylistModes::RepeatMode m_repeatMode;
|
||||
|
@@ -423,7 +423,7 @@ SettingsDialog::openAccountFactoryConfig( AccountFactory* factory )
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
AccountFactoryWrapper dialog( factory, 0 );
|
||||
QWeakPointer< AccountFactoryWrapper > watcher( &dialog );
|
||||
QPointer< AccountFactoryWrapper > watcher( &dialog );
|
||||
|
||||
dialog.exec();
|
||||
#else
|
||||
|
@@ -185,18 +185,18 @@ TomahawkApp::init()
|
||||
// Cause the creation of the nam, but don't need to address it directly, so prevent warning
|
||||
Q_UNUSED( TomahawkUtils::nam() );
|
||||
|
||||
m_audioEngine = QWeakPointer<AudioEngine>( new AudioEngine );
|
||||
m_audioEngine = QPointer<AudioEngine>( new AudioEngine );
|
||||
|
||||
// init pipeline and resolver factories
|
||||
new Pipeline();
|
||||
|
||||
m_servent = QWeakPointer<Servent>( new Servent( this ) );
|
||||
m_servent = QPointer<Servent>( new Servent( this ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( initSIP() ) );
|
||||
|
||||
tDebug() << "Init Database.";
|
||||
initDatabase();
|
||||
|
||||
m_scanManager = QWeakPointer<ScanManager>( new ScanManager( this ) );
|
||||
m_scanManager = QPointer<ScanManager>( new ScanManager( this ) );
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &QtScriptResolver::factory, _1 ) );
|
||||
@@ -221,7 +221,7 @@ TomahawkApp::init()
|
||||
|
||||
// Register shortcut handler for this platform
|
||||
#ifdef Q_WS_MAC
|
||||
m_shortcutHandler = QWeakPointer<Tomahawk::ShortcutHandler>( new MacShortcutHandler( this ) );
|
||||
m_shortcutHandler = QPointer<Tomahawk::ShortcutHandler>( new MacShortcutHandler( this ) );
|
||||
Tomahawk::setShortcutHandler( static_cast<MacShortcutHandler*>( m_shortcutHandler.data() ) );
|
||||
|
||||
Tomahawk::setApplicationHandler( this );
|
||||
@@ -242,10 +242,10 @@ TomahawkApp::init()
|
||||
}
|
||||
|
||||
tDebug() << "Init InfoSystem.";
|
||||
m_infoSystem = QWeakPointer<Tomahawk::InfoSystem::InfoSystem>( Tomahawk::InfoSystem::InfoSystem::instance() );
|
||||
m_infoSystem = QPointer<Tomahawk::InfoSystem::InfoSystem>( Tomahawk::InfoSystem::InfoSystem::instance() );
|
||||
|
||||
tDebug() << "Init AccountManager.";
|
||||
m_accountManager = QWeakPointer< Tomahawk::Accounts::AccountManager >( new Tomahawk::Accounts::AccountManager( this ) );
|
||||
m_accountManager = QPointer< Tomahawk::Accounts::AccountManager >( new Tomahawk::Accounts::AccountManager( this ) );
|
||||
connect( m_accountManager.data(), SIGNAL( ready() ), SLOT( accountManagerReady() ) );
|
||||
|
||||
Echonest::Config::instance()->setNetworkAccessManager( TomahawkUtils::nam() );
|
||||
@@ -517,7 +517,7 @@ TomahawkApp::initDatabase()
|
||||
}
|
||||
|
||||
tDebug( LOGEXTRA ) << "Using database:" << dbpath;
|
||||
m_database = QWeakPointer<Database>( new Database( dbpath, this ) );
|
||||
m_database = QPointer<Database>( new Database( dbpath, this ) );
|
||||
Pipeline::instance()->databaseReady();
|
||||
}
|
||||
|
||||
@@ -541,8 +541,8 @@ TomahawkApp::initHTTP()
|
||||
return;
|
||||
}
|
||||
|
||||
m_session = QWeakPointer< QxtHttpSessionManager >( new QxtHttpSessionManager() );
|
||||
m_connector = QWeakPointer< QxtHttpServerConnector >( new QxtHttpServerConnector );
|
||||
m_session = QPointer< QxtHttpSessionManager >( new QxtHttpSessionManager() );
|
||||
m_connector = QPointer< QxtHttpServerConnector >( new QxtHttpServerConnector );
|
||||
if ( m_session.isNull() || m_connector.isNull() )
|
||||
{
|
||||
if ( !m_session.isNull() )
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QPointer>
|
||||
|
||||
class AudioEngine;
|
||||
class Database;
|
||||
@@ -124,13 +125,13 @@ private:
|
||||
void initLocalCollection();
|
||||
void initPipeline();
|
||||
|
||||
QWeakPointer<Database> m_database;
|
||||
QWeakPointer<ScanManager> m_scanManager;
|
||||
QWeakPointer<AudioEngine> m_audioEngine;
|
||||
QWeakPointer<Servent> m_servent;
|
||||
QWeakPointer<Tomahawk::InfoSystem::InfoSystem> m_infoSystem;
|
||||
QWeakPointer<Tomahawk::ShortcutHandler> m_shortcutHandler;
|
||||
QWeakPointer< Tomahawk::Accounts::AccountManager > m_accountManager;
|
||||
QPointer<Database> m_database;
|
||||
QPointer<ScanManager> m_scanManager;
|
||||
QPointer<AudioEngine> m_audioEngine;
|
||||
QPointer<Servent> m_servent;
|
||||
QPointer<Tomahawk::InfoSystem::InfoSystem> m_infoSystem;
|
||||
QPointer<Tomahawk::ShortcutHandler> m_shortcutHandler;
|
||||
QPointer< Tomahawk::Accounts::AccountManager > m_accountManager;
|
||||
bool m_scrubFriendlyName;
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
@@ -143,8 +144,8 @@ private:
|
||||
|
||||
bool m_headless, m_loaded;
|
||||
|
||||
QWeakPointer< QxtHttpServerConnector > m_connector;
|
||||
QWeakPointer< QxtHttpSessionManager > m_session;
|
||||
QPointer< QxtHttpServerConnector > m_connector;
|
||||
QPointer< QxtHttpSessionManager > m_session;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE( PairList )
|
||||
|
@@ -924,7 +924,7 @@ TomahawkWindow::loadSpiff()
|
||||
connect( diag, SIGNAL( finished( int ) ), this, SLOT( loadXspfFinished( int ) ) );
|
||||
diag->show();
|
||||
#else
|
||||
QWeakPointer< LoadXSPFDialog > safe( diag );
|
||||
QPointer< LoadXSPFDialog > safe( diag );
|
||||
|
||||
int ret = diag->exec();
|
||||
if ( !safe.isNull() && ret == QDialog::Accepted )
|
||||
|
@@ -54,10 +54,10 @@ TwitterAccount::TwitterAccount( const QString &accountId )
|
||||
|
||||
qDebug() << "Got cached peers:" << configuration() << configuration()[ "cachedpeers" ];
|
||||
|
||||
m_configWidget = QWeakPointer< TwitterConfigWidget >( new TwitterConfigWidget( this, 0 ) );
|
||||
m_configWidget = QPointer< TwitterConfigWidget >( new TwitterConfigWidget( this, 0 ) );
|
||||
connect( m_configWidget.data(), SIGNAL( twitterAuthed( bool ) ), SLOT( configDialogAuthedSignalSlot( bool ) ) );
|
||||
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
m_twitterAuth = QPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
m_onlinePixmap = QPixmap( ":/twitter-icon.png" );
|
||||
m_offlinePixmap = QPixmap( ":/twitter-offline-icon.png" );
|
||||
@@ -97,7 +97,7 @@ TwitterAccount::sipPlugin()
|
||||
if ( m_twitterSipPlugin.isNull() )
|
||||
{
|
||||
qDebug() << "CHECKING:" << configuration() << configuration()[ "cachedpeers" ];
|
||||
m_twitterSipPlugin = QWeakPointer< TwitterSipPlugin >( new TwitterSipPlugin( this ) );
|
||||
m_twitterSipPlugin = QPointer< TwitterSipPlugin >( new TwitterSipPlugin( this ) );
|
||||
|
||||
connect( m_twitterSipPlugin.data(), SIGNAL( stateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), this, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ) );
|
||||
return m_twitterSipPlugin.data();
|
||||
@@ -110,7 +110,7 @@ Tomahawk::InfoSystem::InfoPluginPtr
|
||||
TwitterAccount::infoPlugin()
|
||||
{
|
||||
if ( m_twitterInfoPlugin.isNull() )
|
||||
m_twitterInfoPlugin = QWeakPointer< Tomahawk::InfoSystem::TwitterInfoPlugin >( new Tomahawk::InfoSystem::TwitterInfoPlugin( this ) );
|
||||
m_twitterInfoPlugin = QPointer< Tomahawk::InfoSystem::TwitterInfoPlugin >( new Tomahawk::InfoSystem::TwitterInfoPlugin( this ) );
|
||||
|
||||
return Tomahawk::InfoSystem::InfoPluginPtr( m_twitterInfoPlugin.data() );
|
||||
}
|
||||
@@ -191,7 +191,7 @@ TwitterAccount::refreshTwitterAuth()
|
||||
|
||||
Q_ASSERT( TomahawkUtils::nam() != 0 );
|
||||
tDebug() << Q_FUNC_INFO << " with nam " << TomahawkUtils::nam();
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
m_twitterAuth = QPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
if( m_twitterAuth.isNull() )
|
||||
return false;
|
||||
|
@@ -80,7 +80,7 @@ public:
|
||||
TomahawkOAuthTwitter* twitterAuth() const { return m_twitterAuth.data(); }
|
||||
|
||||
signals:
|
||||
void nowAuthenticated( const QWeakPointer< TomahawkOAuthTwitter >&, const QTweetUser &user );
|
||||
void nowAuthenticated( const QPointer< TomahawkOAuthTwitter >&, const QTweetUser &user );
|
||||
void nowDeauthenticated();
|
||||
|
||||
private slots:
|
||||
@@ -92,10 +92,10 @@ private:
|
||||
QIcon m_icon;
|
||||
bool m_isAuthenticated;
|
||||
bool m_isAuthenticating;
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_twitterAuth;
|
||||
QWeakPointer< TwitterConfigWidget > m_configWidget;
|
||||
QWeakPointer< TwitterSipPlugin > m_twitterSipPlugin;
|
||||
QWeakPointer< Tomahawk::InfoSystem::TwitterInfoPlugin > m_twitterInfoPlugin;
|
||||
QPointer< TomahawkOAuthTwitter > m_twitterAuth;
|
||||
QPointer< TwitterConfigWidget > m_configWidget;
|
||||
QPointer< TwitterSipPlugin > m_twitterSipPlugin;
|
||||
QPointer< Tomahawk::InfoSystem::TwitterInfoPlugin > m_twitterInfoPlugin;
|
||||
|
||||
// for settings access
|
||||
friend class TwitterConfigWidget;
|
||||
|
@@ -82,7 +82,7 @@ TwitterInfoPlugin::refreshTwitterAuth()
|
||||
|
||||
Q_ASSERT( TomahawkUtils::nam() != 0 );
|
||||
tDebug() << Q_FUNC_INFO << "with nam" << TomahawkUtils::nam() << this;
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
m_twitterAuth = QPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
if ( m_twitterAuth.isNull() )
|
||||
return false;
|
||||
|
@@ -68,7 +68,7 @@ namespace Tomahawk {
|
||||
bool isValid() const;
|
||||
|
||||
Tomahawk::Accounts::TwitterAccount* m_account;
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_twitterAuth;
|
||||
QPointer< TomahawkOAuthTwitter > m_twitterAuth;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ TwitterSipPlugin::TwitterSipPlugin( Tomahawk::Accounts::Account* account )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
connect( account, SIGNAL( nowAuthenticated( const QWeakPointer< TomahawkOAuthTwitter > &, const QTweetUser & ) ), SLOT( accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter > &, const QTweetUser & ) ) );
|
||||
connect( account, SIGNAL( nowAuthenticated( const QPointer< TomahawkOAuthTwitter > &, const QTweetUser & ) ), SLOT( accountAuthenticated( const QPointer< TomahawkOAuthTwitter > &, const QTweetUser & ) ) );
|
||||
|
||||
m_configuration = account->configuration();
|
||||
qDebug() << "SIP configuration:" << m_configuration << m_configuration[ "cachedpeers" ];
|
||||
@@ -165,7 +165,7 @@ TwitterSipPlugin::disconnectPlugin()
|
||||
}
|
||||
|
||||
void
|
||||
TwitterSipPlugin::accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter > &twitterAuth, const QTweetUser &user )
|
||||
TwitterSipPlugin::accountAuthenticated( const QPointer< TomahawkOAuthTwitter > &twitterAuth, const QTweetUser &user )
|
||||
{
|
||||
Q_UNUSED( user );
|
||||
|
||||
@@ -174,11 +174,11 @@ TwitterSipPlugin::accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter
|
||||
|
||||
m_cachedTwitterAuth = twitterAuth;
|
||||
|
||||
m_friendsTimeline = QWeakPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_mentions = QWeakPointer<QTweetMentions>( new QTweetMentions( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessages = QWeakPointer<QTweetDirectMessages>( new QTweetDirectMessages( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageNew = QWeakPointer<QTweetDirectMessageNew>( new QTweetDirectMessageNew( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageDestroy = QWeakPointer<QTweetDirectMessageDestroy>( new QTweetDirectMessageDestroy( m_cachedTwitterAuth.data(), this ) );
|
||||
m_friendsTimeline = QPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_mentions = QPointer<QTweetMentions>( new QTweetMentions( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessages = QPointer<QTweetDirectMessages>( new QTweetDirectMessages( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageNew = QPointer<QTweetDirectMessageNew>( new QTweetDirectMessageNew( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageDestroy = QPointer<QTweetDirectMessageDestroy>( new QTweetDirectMessageDestroy( m_cachedTwitterAuth.data(), this ) );
|
||||
connect( m_friendsTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_mentions.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( mentionsStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_directMessages.data(), SIGNAL( parsedDirectMessages(const QList<QTweetDMStatus> &)), SLOT( directMessages(const QList<QTweetDMStatus> &) ) );
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#include <QTweetLib/qtweetdmstatus.h>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public slots:
|
||||
void checkSettings();
|
||||
|
||||
private slots:
|
||||
void accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter > &twitterAuth, const QTweetUser &user );
|
||||
void accountAuthenticated( const QPointer< TomahawkOAuthTwitter > &twitterAuth, const QTweetUser &user );
|
||||
void checkTimerFired();
|
||||
void connectTimerFired();
|
||||
void friendsTimelineStatuses( const QList< QTweetStatus > &statuses );
|
||||
@@ -104,13 +104,13 @@ private:
|
||||
bool refreshTwitterAuth();
|
||||
void parseGotTomahawk( const QRegExp ®ex, const QString &screenName, const QString &text );
|
||||
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_cachedTwitterAuth;
|
||||
QPointer< TomahawkOAuthTwitter > m_cachedTwitterAuth;
|
||||
|
||||
QWeakPointer< QTweetFriendsTimeline > m_friendsTimeline;
|
||||
QWeakPointer< QTweetMentions > m_mentions;
|
||||
QWeakPointer< QTweetDirectMessages > m_directMessages;
|
||||
QWeakPointer< QTweetDirectMessageNew > m_directMessageNew;
|
||||
QWeakPointer< QTweetDirectMessageDestroy > m_directMessageDestroy;
|
||||
QPointer< QTweetFriendsTimeline > m_friendsTimeline;
|
||||
QPointer< QTweetMentions > m_mentions;
|
||||
QPointer< QTweetDirectMessages > m_directMessages;
|
||||
QPointer< QTweetDirectMessageNew > m_directMessageNew;
|
||||
QPointer< QTweetDirectMessageDestroy > m_directMessageDestroy;
|
||||
|
||||
QVariantHash m_configuration;
|
||||
|
||||
|
@@ -44,7 +44,7 @@ XmppAccount::XmppAccount( const QString &accountId )
|
||||
setAccountServiceName( "Jabber (XMPP)" );
|
||||
setTypes( SipType );
|
||||
|
||||
m_configWidget = QWeakPointer< QWidget >( new XmppConfigWidget( this, 0 ) );
|
||||
m_configWidget = QPointer< QWidget >( new XmppConfigWidget( this, 0 ) );
|
||||
|
||||
m_onlinePixmap = QPixmap( ":/xmpp-icon.png" );
|
||||
m_offlinePixmap = QPixmap( ":/xmpp-offline-icon.png" );
|
||||
@@ -119,7 +119,7 @@ XmppAccount::sipPlugin()
|
||||
{
|
||||
if ( m_xmppSipPlugin.isNull() )
|
||||
{
|
||||
m_xmppSipPlugin = QWeakPointer< XmppSipPlugin >( new XmppSipPlugin( this ) );
|
||||
m_xmppSipPlugin = QPointer< XmppSipPlugin >( new XmppSipPlugin( this ) );
|
||||
|
||||
connect( m_xmppSipPlugin.data(), SIGNAL( stateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), this, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ) );
|
||||
connect( m_xmppSipPlugin.data(), SIGNAL( error( int, QString ) ), this, SIGNAL( error( int, QString ) ) );
|
||||
|
@@ -80,9 +80,9 @@ public:
|
||||
virtual Tomahawk::Accounts::Account::ConnectionState connectionState() const;
|
||||
|
||||
protected:
|
||||
QWeakPointer< QWidget > m_configWidget; // so the google wrapper can change the config dialog a bit
|
||||
QWeakPointer< XmppSipPlugin > m_xmppSipPlugin;
|
||||
QWeakPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_xmppInfoPlugin;
|
||||
QPointer< QWidget > m_configWidget; // so the google wrapper can change the config dialog a bit
|
||||
QPointer< XmppSipPlugin > m_xmppSipPlugin;
|
||||
QPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_xmppInfoPlugin;
|
||||
|
||||
QPixmap m_onlinePixmap;
|
||||
QPixmap m_offlinePixmap;
|
||||
|
@@ -55,7 +55,7 @@ namespace Tomahawk {
|
||||
void audioPaused();
|
||||
|
||||
private:
|
||||
QWeakPointer< XmppSipPlugin > m_sipPlugin;
|
||||
QPointer< XmppSipPlugin > m_sipPlugin;
|
||||
QTimer m_pauseTimer;
|
||||
};
|
||||
|
||||
|
@@ -109,7 +109,7 @@ GoogleWrapper::sipPlugin()
|
||||
{
|
||||
if ( m_xmppSipPlugin.isNull() )
|
||||
{
|
||||
m_xmppSipPlugin = QWeakPointer< XmppSipPlugin >( new GoogleWrapperSip( const_cast< GoogleWrapper* >( this ) ) );
|
||||
m_xmppSipPlugin = QPointer< XmppSipPlugin >( new GoogleWrapperSip( const_cast< GoogleWrapper* >( this ) ) );
|
||||
|
||||
connect( m_xmppSipPlugin.data(), SIGNAL( stateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), this, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ) );
|
||||
connect( m_xmppSipPlugin.data(), SIGNAL( error( int, QString ) ), this, SIGNAL( error( int, QString ) ) );
|
||||
|
@@ -73,7 +73,7 @@ public:
|
||||
virtual SipPlugin* sipPlugin();
|
||||
|
||||
private:
|
||||
QWeakPointer< GoogleWrapperSip > m_sipPlugin;
|
||||
QPointer< GoogleWrapperSip > m_sipPlugin;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -202,7 +202,7 @@ InfoSystem::InfoPluginPtr
|
||||
XmppSipPlugin::infoPlugin()
|
||||
{
|
||||
if ( m_infoPlugin.isNull() )
|
||||
m_infoPlugin = QWeakPointer< Tomahawk::InfoSystem::XmppInfoPlugin >( new Tomahawk::InfoSystem::XmppInfoPlugin( this ) );
|
||||
m_infoPlugin = QPointer< Tomahawk::InfoSystem::XmppInfoPlugin >( new Tomahawk::InfoSystem::XmppInfoPlugin( this ) );
|
||||
|
||||
return InfoSystem::InfoPluginPtr( m_infoPlugin.data() );
|
||||
}
|
||||
|
@@ -132,7 +132,7 @@ private:
|
||||
int m_currentPort;
|
||||
QString m_currentResource;
|
||||
|
||||
QWeakPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_infoPlugin;
|
||||
QPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_infoPlugin;
|
||||
Tomahawk::Accounts::Account::ConnectionState m_state;
|
||||
|
||||
// sort out
|
||||
|
@@ -120,7 +120,7 @@ SipPlugin*
|
||||
ZeroconfAccount::sipPlugin()
|
||||
{
|
||||
if ( m_sipPlugin.isNull() )
|
||||
m_sipPlugin = QWeakPointer< ZeroconfPlugin >( new ZeroconfPlugin( this ) );
|
||||
m_sipPlugin = QPointer< ZeroconfPlugin >( new ZeroconfPlugin( this ) );
|
||||
|
||||
return m_sipPlugin.data();
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
QWidget* aclWidget() { return 0; }
|
||||
|
||||
private:
|
||||
QWeakPointer< ZeroconfPlugin > m_sipPlugin;
|
||||
QPointer< ZeroconfPlugin > m_sipPlugin;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ private:
|
||||
uint m_chartsFetchJobs;
|
||||
QList< InfoRequestData > m_cachedRequests;
|
||||
QHash< QString, QString > m_cachedCountries;
|
||||
QWeakPointer< QNetworkAccessManager > m_nam;
|
||||
QPointer< QNetworkAccessManager > m_nam;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ private:
|
||||
uint m_nrFetchJobs;
|
||||
QList< InfoRequestData > m_cachedRequests;
|
||||
QHash< QString, QString > m_cachedCountries;
|
||||
QWeakPointer< QNetworkAccessManager > m_nam;
|
||||
QPointer< QNetworkAccessManager > m_nam;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
class QTimer;
|
||||
|
||||
@@ -80,7 +80,7 @@ private:
|
||||
QUrl m_currentLongUrl;
|
||||
|
||||
QTimer* m_pauseTimer;
|
||||
QWeakPointer<QNetworkAccessManager> m_nam;
|
||||
QPointer<QNetworkAccessManager> m_nam;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -40,14 +40,14 @@ AlbumPlaylistInterface::AlbumPlaylistInterface( Tomahawk::Album* album, Tomahawk
|
||||
, m_databaseLoaded( false )
|
||||
, m_mode( mode )
|
||||
, m_collection( collection )
|
||||
, m_album( QWeakPointer< Tomahawk::Album >( album ) )
|
||||
, m_album( QPointer< Tomahawk::Album >( album ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AlbumPlaylistInterface::~AlbumPlaylistInterface()
|
||||
{
|
||||
m_album.clear();
|
||||
m_album = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ AlbumPlaylistInterface::tracks() const
|
||||
else if ( m_mode == DatabaseMode && !m_databaseLoaded )
|
||||
{
|
||||
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( m_collection );
|
||||
cmd->setAlbum( m_album );
|
||||
cmd->setAlbum( m_album->weakRef() );
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
|
||||
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
|
||||
@@ -216,7 +216,7 @@ AlbumPlaylistInterface::infoSystemFinished( const QString& infoId )
|
||||
if ( m_queries.isEmpty() && m_mode == Mixed )
|
||||
{
|
||||
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( m_collection );
|
||||
cmd->setAlbum( m_album );
|
||||
cmd->setAlbum( m_album->weakRef() );
|
||||
//this takes discnumber into account as well
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#define TOMAHAWKALBUMPLAYLISTINTERFACE_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include "Album.h"
|
||||
#include "Typedefs.h"
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
Tomahawk::ModelMode m_mode;
|
||||
Tomahawk::collection_ptr m_collection;
|
||||
|
||||
QWeakPointer< Tomahawk::Album > m_album;
|
||||
QPointer< Tomahawk::Album > m_album;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
@@ -39,14 +39,14 @@ ArtistPlaylistInterface::ArtistPlaylistInterface( Tomahawk::Artist* artist, Toma
|
||||
, m_databaseLoaded( false )
|
||||
, m_mode( mode )
|
||||
, m_collection( collection )
|
||||
, m_artist( QWeakPointer< Tomahawk::Artist >( artist ) )
|
||||
, m_artist( QPointer< Tomahawk::Artist >( artist ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ArtistPlaylistInterface::~ArtistPlaylistInterface()
|
||||
{
|
||||
m_artist.clear();
|
||||
m_artist = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ ArtistPlaylistInterface::tracks() const
|
||||
else if ( m_mode == DatabaseMode && !m_databaseLoaded )
|
||||
{
|
||||
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( m_collection );
|
||||
cmd->setArtist( m_artist );
|
||||
cmd->setArtist( m_artist->weakRef() );
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
|
||||
|
||||
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
|
||||
@@ -196,7 +196,7 @@ ArtistPlaylistInterface::infoSystemFinished( const QString &infoId )
|
||||
if ( m_queries.isEmpty() && m_mode == Mixed )
|
||||
{
|
||||
DatabaseCommand_AllTracks* cmd = new DatabaseCommand_AllTracks( m_collection );
|
||||
cmd->setArtist( m_artist );
|
||||
cmd->setArtist( m_artist->weakRef() );
|
||||
//this takes discnumber into account as well
|
||||
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#define TOMAHAWKARTISTPLAYLISTINTERFACE_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include "Artist.h"
|
||||
#include "Typedefs.h"
|
||||
@@ -80,7 +80,7 @@ private:
|
||||
Tomahawk::ModelMode m_mode;
|
||||
Tomahawk::collection_ptr m_collection;
|
||||
|
||||
QWeakPointer< Tomahawk::Artist > m_artist;
|
||||
QPointer< Tomahawk::Artist > m_artist;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
@@ -27,7 +27,7 @@ using namespace Tomahawk;
|
||||
|
||||
FuncTimeout::FuncTimeout( int ms, boost::function< void() > func, QObject* besafe )
|
||||
: m_func( func )
|
||||
, m_watch( QWeakPointer< QObject >( besafe ) )
|
||||
, m_watch( QPointer< QObject >( besafe ) )
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO;
|
||||
QTimer::singleShot( ms, this, SLOT( exec() ) );
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#define FUNCTIMEOUT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include "boost/function.hpp"
|
||||
#include "boost/bind.hpp"
|
||||
@@ -51,7 +51,7 @@ public slots:
|
||||
|
||||
private:
|
||||
boost::function<void()> m_func;
|
||||
QWeakPointer< QObject > m_watch;
|
||||
QPointer< QObject > m_watch;
|
||||
};
|
||||
|
||||
}; // ns
|
||||
|
@@ -29,8 +29,6 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <QWeakPointer>
|
||||
|
||||
|
||||
/**
|
||||
* Handles global actions such as parsing and creation of links, mime data handling, etc
|
||||
|
@@ -95,7 +95,7 @@ LatchManager::playlistChanged( Tomahawk::playlistinterface_ptr )
|
||||
// We're current latched, and the user changed playlist, so stop
|
||||
SourcePlaylistInterface* origsourcepi = dynamic_cast< SourcePlaylistInterface* >( m_latchedInterface.data() );
|
||||
Q_ASSERT( origsourcepi );
|
||||
const source_ptr source = origsourcepi->source();
|
||||
const source_ptr source = SourceList::instance()->get( origsourcepi->source()->id() );
|
||||
|
||||
DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction();
|
||||
cmd->setSource( SourceList::instance()->getLocal() );
|
||||
|
@@ -68,7 +68,7 @@ Pipeline::~Pipeline()
|
||||
m_running = false;
|
||||
|
||||
// stop script resolvers
|
||||
foreach ( QWeakPointer< ExternalResolver > r, m_scriptResolvers )
|
||||
foreach ( QPointer< ExternalResolver > r, m_scriptResolvers )
|
||||
if ( !r.isNull() )
|
||||
r.data()->deleteLater();
|
||||
|
||||
@@ -141,7 +141,7 @@ Pipeline::addScriptResolver( const QString& path )
|
||||
if ( !res )
|
||||
continue;
|
||||
|
||||
m_scriptResolvers << QWeakPointer< ExternalResolver >( res );
|
||||
m_scriptResolvers << QPointer< ExternalResolver > ( res );
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ Pipeline::addScriptResolver( const QString& path )
|
||||
void
|
||||
Pipeline::stopScriptResolver( const QString& path )
|
||||
{
|
||||
foreach ( QWeakPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
foreach ( QPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
{
|
||||
if ( res.data()->filePath() == path )
|
||||
res.data()->stop();
|
||||
@@ -164,8 +164,8 @@ Pipeline::stopScriptResolver( const QString& path )
|
||||
void
|
||||
Pipeline::removeScriptResolver( const QString& scriptPath )
|
||||
{
|
||||
QWeakPointer< ExternalResolver > r;
|
||||
foreach ( QWeakPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
QPointer< ExternalResolver > r;
|
||||
foreach ( QPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
{
|
||||
if ( res.isNull() )
|
||||
continue;
|
||||
@@ -186,7 +186,7 @@ Pipeline::removeScriptResolver( const QString& scriptPath )
|
||||
ExternalResolver*
|
||||
Pipeline::resolverForPath( const QString& scriptPath )
|
||||
{
|
||||
foreach ( QWeakPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
foreach ( QPointer< ExternalResolver > res, m_scriptResolvers )
|
||||
{
|
||||
if ( res.data()->filePath() == scriptPath )
|
||||
return res.data();
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
Tomahawk::ExternalResolver* addScriptResolver( const QString& scriptPath );
|
||||
void stopScriptResolver( const QString& scriptPath );
|
||||
void removeScriptResolver( const QString& scriptPath );
|
||||
QList< QWeakPointer< ExternalResolver > > scriptResolvers() const { return m_scriptResolvers; }
|
||||
QList< QPointer< ExternalResolver > > scriptResolvers() const { return m_scriptResolvers; }
|
||||
Tomahawk::ExternalResolver* resolverForPath( const QString& scriptPath );
|
||||
|
||||
void addResolver( Resolver* r );
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
int decQIDState( const Tomahawk::query_ptr& query );
|
||||
|
||||
QList< Resolver* > m_resolvers;
|
||||
QList< QWeakPointer<Tomahawk::ExternalResolver> > m_scriptResolvers;
|
||||
QList< QPointer<Tomahawk::ExternalResolver> > m_scriptResolvers;
|
||||
QList< ResolverFactoryFunc > m_resolverFactories;
|
||||
QMap< QID, bool > m_qidsTimeout;
|
||||
QMap< QID, unsigned int > m_qidsState;
|
||||
|
@@ -36,7 +36,7 @@ PlaylistPlaylistInterface::PlaylistPlaylistInterface( Tomahawk::Playlist* playli
|
||||
|
||||
PlaylistPlaylistInterface::~PlaylistPlaylistInterface()
|
||||
{
|
||||
m_playlist.clear();
|
||||
m_playlist = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "Result.h"
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
PlaylistPlaylistInterface();
|
||||
Q_DISABLE_COPY( PlaylistPlaylistInterface )
|
||||
|
||||
QWeakPointer< Tomahawk::Playlist > m_playlist;
|
||||
QPointer< Tomahawk::Playlist > m_playlist;
|
||||
|
||||
result_ptr m_currentItem;
|
||||
};
|
||||
|
@@ -389,7 +389,7 @@ Query::currentResolver() const
|
||||
int x = m_resolvers.count();
|
||||
while ( --x )
|
||||
{
|
||||
QWeakPointer< Resolver > r = m_resolvers.at( x );
|
||||
QPointer< Resolver > r = m_resolvers.at( x );
|
||||
if ( r.isNull() )
|
||||
continue;
|
||||
|
||||
|
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
QPair< Tomahawk::source_ptr, unsigned int > playedBy() const;
|
||||
Tomahawk::Resolver* currentResolver() const;
|
||||
QList< QWeakPointer< Tomahawk::Resolver > > resolvedBy() const { return m_resolvers; }
|
||||
QList< QPointer< Tomahawk::Resolver > > resolvedBy() const { return m_resolvers; }
|
||||
|
||||
void setArtist( const QString& artist ) { m_artist = artist; updateSortNames(); }
|
||||
void setComposer( const QString& composer ) { m_composer = composer; updateSortNames(); }
|
||||
@@ -255,7 +255,7 @@ private:
|
||||
mutable Tomahawk::album_ptr m_albumPtr;
|
||||
|
||||
QPair< Tomahawk::source_ptr, unsigned int > m_playedBy;
|
||||
QList< QWeakPointer< Tomahawk::Resolver > > m_resolvers;
|
||||
QList< QPointer< Tomahawk::Resolver > > m_resolvers;
|
||||
|
||||
bool m_saveResultHint;
|
||||
|
||||
|
@@ -117,7 +117,7 @@ Result::onResolverRemoved( Tomahawk::Resolver* resolver )
|
||||
{
|
||||
if ( m_resolvedBy.data() == resolver )
|
||||
{
|
||||
m_resolvedBy.clear();
|
||||
m_resolvedBy = 0;
|
||||
emit statusChanged();
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@ Result::resolvedBy() const
|
||||
void
|
||||
Result::setResolvedBy( Tomahawk::Resolver* resolver )
|
||||
{
|
||||
m_resolvedBy = QWeakPointer< Tomahawk::Resolver >( resolver );
|
||||
m_resolvedBy = QPointer< Tomahawk::Resolver >( resolver );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -141,7 +141,7 @@ private:
|
||||
mutable RID m_rid;
|
||||
collection_ptr m_collection;
|
||||
Tomahawk::query_ptr m_query;
|
||||
QWeakPointer< Tomahawk::Resolver > m_resolvedBy;
|
||||
QPointer< Tomahawk::Resolver > m_resolvedBy;
|
||||
|
||||
Tomahawk::artist_ptr m_artist;
|
||||
Tomahawk::album_ptr m_album;
|
||||
|
@@ -46,7 +46,7 @@ SourcePlaylistInterface::SourcePlaylistInterface( Tomahawk::Source* source, Toma
|
||||
|
||||
SourcePlaylistInterface::~SourcePlaylistInterface()
|
||||
{
|
||||
m_source.clear();
|
||||
m_source = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ SourcePlaylistInterface::tracks() const
|
||||
}
|
||||
|
||||
|
||||
QWeakPointer< Tomahawk::Source >
|
||||
QPointer< Tomahawk::Source >
|
||||
SourcePlaylistInterface::source() const
|
||||
{
|
||||
return m_source;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#define TOMAHAWKSOURCEPLAYLISTINTERFACE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "PlaylistInterface.h"
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
virtual bool shuffled() const { return false; }
|
||||
|
||||
virtual QWeakPointer< Tomahawk::Source > source() const;
|
||||
virtual QPointer< Tomahawk::Source > source() const;
|
||||
|
||||
virtual void reset();
|
||||
|
||||
@@ -79,7 +79,7 @@ private slots:
|
||||
void resolvingFinished( bool hasResults );
|
||||
|
||||
private:
|
||||
QWeakPointer< Tomahawk::Source > m_source;
|
||||
QPointer< Tomahawk::Source > m_source;
|
||||
mutable Tomahawk::result_ptr m_currentItem;
|
||||
mutable bool m_gotNextItem;
|
||||
};
|
||||
|
@@ -21,9 +21,11 @@
|
||||
#define TYPEDEFS_H
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
#include <QUuid>
|
||||
#include <QPair>
|
||||
#include <QPersistentModelIndex>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
//template <typename T> class QSharedPointer;
|
||||
@@ -203,7 +205,7 @@ namespace Tomahawk
|
||||
typedef QHash< QString, QString > InfoStringHash;
|
||||
typedef QPair< QVariantMap, QVariant > PushInfoPair;
|
||||
|
||||
typedef QWeakPointer< InfoPlugin > InfoPluginPtr;
|
||||
typedef QPointer< InfoPlugin > InfoPluginPtr;
|
||||
}
|
||||
}; // ns
|
||||
|
||||
|
@@ -739,7 +739,7 @@ ViewManager::currentPage() const
|
||||
Tomahawk::playlist_ptr
|
||||
ViewManager::playlistForInterface( Tomahawk::playlistinterface_ptr interface ) const
|
||||
{
|
||||
foreach ( QWeakPointer<FlexibleView> view, m_playlistViews.values() )
|
||||
foreach ( QPointer<FlexibleView> view, m_playlistViews.values() )
|
||||
{
|
||||
if ( !view.isNull() && view.data()->playlistInterface() == interface )
|
||||
{
|
||||
@@ -754,7 +754,7 @@ ViewManager::playlistForInterface( Tomahawk::playlistinterface_ptr interface ) c
|
||||
Tomahawk::dynplaylist_ptr
|
||||
ViewManager::dynamicPlaylistForInterface( Tomahawk::playlistinterface_ptr interface ) const
|
||||
{
|
||||
foreach ( QWeakPointer<DynamicWidget> view, m_dynamicWidgets.values() )
|
||||
foreach ( QPointer<DynamicWidget> view, m_dynamicWidgets.values() )
|
||||
{
|
||||
if ( !view.isNull() && view.data()->playlistInterface() == interface )
|
||||
{
|
||||
|
@@ -188,13 +188,13 @@ private:
|
||||
|
||||
QList< Tomahawk::collection_ptr > m_superCollections;
|
||||
|
||||
QHash< Tomahawk::dynplaylist_ptr, QWeakPointer<Tomahawk::DynamicWidget> > m_dynamicWidgets;
|
||||
QHash< Tomahawk::collection_ptr, QWeakPointer<TreeView> > m_treeViews;
|
||||
QHash< Tomahawk::artist_ptr, QWeakPointer<ArtistInfoWidget> > m_artistViews;
|
||||
QHash< Tomahawk::album_ptr, QWeakPointer<AlbumInfoWidget> > m_albumViews;
|
||||
QHash< Tomahawk::query_ptr, QWeakPointer<TrackInfoWidget> > m_trackViews;
|
||||
QHash< Tomahawk::playlist_ptr, QWeakPointer<FlexibleView> > m_playlistViews;
|
||||
QHash< Tomahawk::source_ptr, QWeakPointer<SourceInfoWidget> > m_sourceViews;
|
||||
QHash< Tomahawk::dynplaylist_ptr, QPointer<Tomahawk::DynamicWidget> > m_dynamicWidgets;
|
||||
QHash< Tomahawk::collection_ptr, QPointer<TreeView> > m_treeViews;
|
||||
QHash< Tomahawk::artist_ptr, QPointer<ArtistInfoWidget> > m_artistViews;
|
||||
QHash< Tomahawk::album_ptr, QPointer<AlbumInfoWidget> > m_albumViews;
|
||||
QHash< Tomahawk::query_ptr, QPointer<TrackInfoWidget> > m_trackViews;
|
||||
QHash< Tomahawk::playlist_ptr, QPointer<FlexibleView> > m_playlistViews;
|
||||
QHash< Tomahawk::source_ptr, QPointer<SourceInfoWidget> > m_sourceViews;
|
||||
|
||||
QList<Tomahawk::ViewPage*> m_pageHistoryBack;
|
||||
QList<Tomahawk::ViewPage*> m_pageHistoryFwd;
|
||||
|
@@ -127,7 +127,7 @@ ResolverAccount::hookupResolver()
|
||||
{
|
||||
tDebug() << "Hooking up resolver:" << configuration().value( "path" ).toString() << enabled();
|
||||
|
||||
m_resolver = QWeakPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( configuration().value( "path" ).toString() ) ) );
|
||||
m_resolver = QPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( configuration().value( "path" ).toString() ) ) );
|
||||
connect( m_resolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
|
||||
// What resolver do we have here? Should only be types that are 'real' resolvers
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include "accounts/Account.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
namespace Tomahawk {
|
||||
|
||||
class ExternalResolverGui;
|
||||
@@ -93,7 +95,7 @@ protected:
|
||||
|
||||
void hookupResolver();
|
||||
|
||||
QWeakPointer<ExternalResolverGui> m_resolver;
|
||||
QPointer<ExternalResolverGui> m_resolver;
|
||||
|
||||
private:
|
||||
void init( const QString& path );
|
||||
|
@@ -141,7 +141,7 @@ QWidget*
|
||||
LastFmAccount::configurationWidget()
|
||||
{
|
||||
if ( m_configWidget.isNull() )
|
||||
m_configWidget = QWeakPointer<LastFmConfig>( new LastFmConfig( this ) );
|
||||
m_configWidget = QPointer<LastFmConfig>( new LastFmConfig( this ) );
|
||||
|
||||
return m_configWidget.data();
|
||||
}
|
||||
@@ -165,7 +165,7 @@ InfoPluginPtr
|
||||
LastFmAccount::infoPlugin()
|
||||
{
|
||||
if ( m_infoPlugin.isNull() )
|
||||
m_infoPlugin = QWeakPointer< LastFmInfoPlugin >( new LastFmInfoPlugin( this ) );
|
||||
m_infoPlugin = QPointer< LastFmInfoPlugin >( new LastFmInfoPlugin( this ) );
|
||||
|
||||
return InfoPluginPtr( m_infoPlugin.data() );
|
||||
}
|
||||
@@ -286,7 +286,7 @@ LastFmAccount::hookupResolver()
|
||||
|
||||
const AtticaManager::Resolver data = AtticaManager::instance()->resolverData( res.id() );
|
||||
|
||||
m_resolver = QWeakPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( data.scriptPath ) ) );
|
||||
m_resolver = QPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( data.scriptPath ) ) );
|
||||
connect( m_resolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
}
|
||||
|
||||
|
@@ -104,9 +104,9 @@ private slots:
|
||||
private:
|
||||
void hookupResolver();
|
||||
|
||||
QWeakPointer<Tomahawk::ExternalResolverGui> m_resolver;
|
||||
QWeakPointer<Tomahawk::InfoSystem::LastFmInfoPlugin> m_infoPlugin;
|
||||
QWeakPointer<LastFmConfig> m_configWidget;
|
||||
QPointer<Tomahawk::ExternalResolverGui> m_resolver;
|
||||
QPointer<Tomahawk::InfoSystem::LastFmInfoPlugin> m_infoPlugin;
|
||||
QPointer<LastFmConfig> m_configWidget;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ private:
|
||||
|
||||
void dataError( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
||||
QWeakPointer< Accounts::LastFmAccount > m_account;
|
||||
QPointer< Accounts::LastFmAccount > m_account;
|
||||
QList<lastfm::Track> parseTrackList( QNetworkReply* reply );
|
||||
|
||||
lastfm::MutableTrack m_track;
|
||||
|
@@ -217,7 +217,7 @@ SpotifyAccount::hookupResolver()
|
||||
// Since the resolver in 0.4.x used an incompatible version of kdsingleappguard, we can't auto-kill old resolvers on the
|
||||
// 0.4.x->0.5.x upgrade. So we do it manually for a while
|
||||
killExistingResolvers();
|
||||
m_spotifyResolver = QWeakPointer< ScriptResolver >( qobject_cast< ScriptResolver* >( Pipeline::instance()->addScriptResolver( path ) ) );
|
||||
m_spotifyResolver = QPointer< ScriptResolver >( qobject_cast< ScriptResolver* >( Pipeline::instance()->addScriptResolver( path ) ) );
|
||||
m_spotifyResolver.data()->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::SpotifyIcon ) );
|
||||
|
||||
connect( m_spotifyResolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
@@ -352,7 +352,7 @@ SpotifyAccount::infoPlugin()
|
||||
{
|
||||
if ( m_infoPlugin.isNull() )
|
||||
{
|
||||
m_infoPlugin = QWeakPointer< InfoSystem::SpotifyInfoPlugin >( new InfoSystem::SpotifyInfoPlugin( this ) );
|
||||
m_infoPlugin = QPointer< InfoSystem::SpotifyInfoPlugin >( new InfoSystem::SpotifyInfoPlugin( this ) );
|
||||
}
|
||||
|
||||
return InfoSystem::InfoPluginPtr( m_infoPlugin.data() );
|
||||
@@ -1112,7 +1112,7 @@ SpotifyAccount::configurationWidget()
|
||||
{
|
||||
if ( m_configWidget.isNull() )
|
||||
{
|
||||
m_configWidget = QWeakPointer< SpotifyAccountConfig >( new SpotifyAccountConfig( this ) );
|
||||
m_configWidget = QPointer< SpotifyAccountConfig >( new SpotifyAccountConfig( this ) );
|
||||
connect( m_configWidget.data(), SIGNAL( login( QString,QString ) ), this, SLOT( login( QString,QString ) ) );
|
||||
connect( m_configWidget.data(), SIGNAL( logout() ), this, SLOT( logout() ) );
|
||||
m_configWidget.data()->setPlaylists( m_allSpotifyPlaylists.values() );
|
||||
@@ -1141,7 +1141,7 @@ SpotifyAccount::aboutWidget()
|
||||
l->addWidget( pm );
|
||||
l->addWidget( text );
|
||||
w->setLayout( l );
|
||||
m_aboutWidget = QWeakPointer< QWidget >( w );
|
||||
m_aboutWidget = QPointer< QWidget >( w );
|
||||
}
|
||||
|
||||
return m_aboutWidget.data();
|
||||
|
@@ -163,10 +163,10 @@ private:
|
||||
SpotifyPlaylistUpdater* getPlaylistUpdater( QObject* sender );
|
||||
static SpotifyAccount* s_instance;
|
||||
|
||||
QWeakPointer<SpotifyAccountConfig> m_configWidget;
|
||||
QWeakPointer<QWidget> m_aboutWidget;
|
||||
QWeakPointer<ScriptResolver> m_spotifyResolver;
|
||||
QWeakPointer< InfoSystem::SpotifyInfoPlugin > m_infoPlugin;
|
||||
QPointer<SpotifyAccountConfig> m_configWidget;
|
||||
QPointer<QWidget> m_aboutWidget;
|
||||
QPointer<ScriptResolver> m_spotifyResolver;
|
||||
QPointer< InfoSystem::SpotifyInfoPlugin > m_infoPlugin;
|
||||
|
||||
QMap<QString, QPair<QObject*, QString> > m_qidToSlotMap;
|
||||
QMap<QString, QVariant > m_qidToExtraData;
|
||||
|
@@ -22,13 +22,14 @@
|
||||
#include "utils/Closure.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
||||
using namespace Tomahawk;
|
||||
using namespace Tomahawk::InfoSystem;
|
||||
|
||||
|
||||
SpotifyInfoPlugin::SpotifyInfoPlugin( Accounts::SpotifyAccount* account )
|
||||
: InfoPlugin()
|
||||
, m_account( QWeakPointer< Accounts::SpotifyAccount >( account ) )
|
||||
, m_account( QPointer< Accounts::SpotifyAccount >( account ) )
|
||||
{
|
||||
if ( !m_account.isNull() )
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
@@ -62,7 +62,8 @@ private:
|
||||
void dataError( InfoRequestData );
|
||||
void trackListResult( const QStringList& trackNameList, const Tomahawk::InfoSystem::InfoRequestData& requestData );
|
||||
void sendLoveSong( const InfoType type, QVariant input );
|
||||
QWeakPointer< Tomahawk::Accounts::SpotifyAccount > m_account;
|
||||
|
||||
QPointer< Tomahawk::Accounts::SpotifyAccount > m_account;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ private:
|
||||
static QVariant queryToVariant( const Tomahawk::query_ptr& query );
|
||||
static QList< Tomahawk::query_ptr > variantToQueries( const QVariantList& list );
|
||||
|
||||
QWeakPointer<Tomahawk::Accounts::SpotifyAccount> m_spotify;
|
||||
QPointer<Tomahawk::Accounts::SpotifyAccount> m_spotify;
|
||||
QString m_latestRev, m_spotifyId;
|
||||
QList< Tomahawk::plentry_ptr > m_waitingForIds;
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
virtual QString type() const { return "spotify"; }
|
||||
|
||||
private:
|
||||
QWeakPointer<Tomahawk::Accounts::SpotifyAccount> m_account;
|
||||
QPointer<Tomahawk::Accounts::SpotifyAccount> m_account;
|
||||
};
|
||||
|
||||
#endif // SPOTIFYPLAYLISTUPDATER_H
|
||||
|
@@ -64,7 +64,7 @@ Database::Database( const QString& dbname, QObject* parent )
|
||||
|
||||
while ( m_workerThreads.count() < m_maxConcurrentThreads )
|
||||
{
|
||||
QWeakPointer< DatabaseWorkerThread > workerThread( new DatabaseWorkerThread( this, false ) );
|
||||
QPointer< DatabaseWorkerThread > workerThread( new DatabaseWorkerThread( this, false ) );
|
||||
Q_ASSERT( workerThread );
|
||||
workerThread.data()->start();
|
||||
m_workerThreads << workerThread;
|
||||
@@ -82,7 +82,7 @@ Database::~Database()
|
||||
|
||||
if ( m_workerRW )
|
||||
m_workerRW.data()->quit();
|
||||
foreach ( QWeakPointer< DatabaseWorkerThread > workerThread, m_workerThreads )
|
||||
foreach ( QPointer< DatabaseWorkerThread > workerThread, m_workerThreads )
|
||||
{
|
||||
if ( workerThread && workerThread.data()->worker() )
|
||||
workerThread.data()->quit();
|
||||
@@ -93,7 +93,7 @@ Database::~Database()
|
||||
m_workerRW.data()->wait( 60000 );
|
||||
delete m_workerRW.data();
|
||||
}
|
||||
foreach ( QWeakPointer< DatabaseWorkerThread > workerThread, m_workerThreads )
|
||||
foreach ( QPointer< DatabaseWorkerThread > workerThread, m_workerThreads )
|
||||
{
|
||||
if ( workerThread )
|
||||
{
|
||||
@@ -140,8 +140,8 @@ Database::enqueue( const QSharedPointer<DatabaseCommand>& lc )
|
||||
{
|
||||
// find thread for commandname with lowest amount of outstanding jobs and enqueue job
|
||||
int busyThreads = 0;
|
||||
QWeakPointer< DatabaseWorkerThread > workerThread;
|
||||
QWeakPointer< DatabaseWorker > happyWorker;
|
||||
QPointer< DatabaseWorkerThread > workerThread;
|
||||
QPointer< DatabaseWorker > happyWorker;
|
||||
for ( int i = 0; i < m_workerThreads.count(); i++ )
|
||||
{
|
||||
workerThread = m_workerThreads.at( i );
|
||||
|
@@ -77,8 +77,8 @@ private:
|
||||
bool m_ready;
|
||||
|
||||
DatabaseImpl* m_impl;
|
||||
QWeakPointer< DatabaseWorkerThread > m_workerRW;
|
||||
QList< QWeakPointer< DatabaseWorkerThread > > m_workerThreads;
|
||||
QPointer< DatabaseWorkerThread > m_workerRW;
|
||||
QList< QPointer< DatabaseWorkerThread > > m_workerThreads;
|
||||
IdThreadWorker* m_idWorker;
|
||||
int m_maxConcurrentThreads;
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "DatabaseCommand.h"
|
||||
#include "DllMacro.h"
|
||||
#include <QPointer>
|
||||
|
||||
class IndexingJobItem;
|
||||
|
||||
@@ -36,7 +37,7 @@ public:
|
||||
virtual void exec( DatabaseImpl* db );
|
||||
|
||||
private:
|
||||
QWeakPointer<IndexingJobItem> m_statusJob;
|
||||
QPointer<IndexingJobItem> m_statusJob;
|
||||
};
|
||||
|
||||
#endif // DATABASECOMMAND_UPDATESEARCHINDEX_H
|
||||
|
@@ -47,7 +47,7 @@ void
|
||||
DatabaseWorkerThread::run()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "DatabaseWorkerThread starting...";
|
||||
m_worker = QWeakPointer< DatabaseWorker >( new DatabaseWorker( m_db, m_mutates ) );
|
||||
m_worker = QPointer< DatabaseWorker >( new DatabaseWorker( m_db, m_mutates ) );
|
||||
exec();
|
||||
tDebug() << Q_FUNC_INFO << "DatabaseWorkerThread finishing...";
|
||||
if ( m_worker )
|
||||
@@ -60,7 +60,7 @@ DatabaseWorkerThread::~DatabaseWorkerThread()
|
||||
}
|
||||
|
||||
|
||||
QWeakPointer< DatabaseWorker >
|
||||
QPointer< DatabaseWorker >
|
||||
DatabaseWorkerThread::worker() const
|
||||
{
|
||||
return m_worker;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/serializer.h>
|
||||
@@ -71,13 +71,13 @@ public:
|
||||
DatabaseWorkerThread( Database* db, bool mutates );
|
||||
~DatabaseWorkerThread();
|
||||
|
||||
QWeakPointer< DatabaseWorker > worker() const;
|
||||
QPointer< DatabaseWorker > worker() const;
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
private:
|
||||
QWeakPointer< DatabaseWorker > m_worker;
|
||||
QPointer< DatabaseWorker > m_worker;
|
||||
Database* m_db;
|
||||
bool m_mutates;
|
||||
};
|
||||
|
@@ -184,7 +184,7 @@ MusicScanner::scan()
|
||||
|
||||
m_dirListerThreadController = new QThread( this );
|
||||
|
||||
m_dirLister = QWeakPointer< DirLister >( new DirLister( m_paths ) );
|
||||
m_dirLister = QPointer< DirLister >( new DirLister( m_paths ) );
|
||||
m_dirLister.data()->moveToThread( m_dirListerThreadController );
|
||||
|
||||
connect( m_dirLister.data(), SIGNAL( fileToScan( QFileInfo ) ),
|
||||
|
@@ -37,7 +37,6 @@
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QMutexLocker>
|
||||
#include <QtCore/QWeakPointer>
|
||||
#include <database/Database.h>
|
||||
|
||||
// descend dir tree comparing dir mtimes to last known mtime
|
||||
@@ -125,7 +124,7 @@ private:
|
||||
QVariantList m_filesToDelete;
|
||||
quint32 m_batchsize;
|
||||
|
||||
QWeakPointer< DirLister > m_dirLister;
|
||||
QPointer< DirLister > m_dirLister;
|
||||
QThread* m_dirListerThreadController;
|
||||
};
|
||||
|
||||
|
@@ -255,7 +255,7 @@ ScanManager::runScan()
|
||||
|
||||
if ( m_musicScannerThreadController && m_scanner.isNull() )
|
||||
{
|
||||
m_scanner = QWeakPointer< MusicScanner >( new MusicScanner( m_currScanMode, paths ) );
|
||||
m_scanner = QPointer< MusicScanner >( new MusicScanner( m_currScanMode, paths ) );
|
||||
m_scanner.data()->moveToThread( m_musicScannerThreadController );
|
||||
connect( m_scanner.data(), SIGNAL( finished() ), SLOT( scannerFinished() ) );
|
||||
m_musicScannerThreadController->start( QThread::IdlePriority );
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QWeakPointer>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QSet>
|
||||
|
||||
class MusicScanner;
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
static ScanManager* s_instance;
|
||||
|
||||
ScanMode m_currScanMode;
|
||||
QWeakPointer< MusicScanner > m_scanner;
|
||||
QPointer< MusicScanner > m_scanner;
|
||||
QThread* m_musicScannerThreadController;
|
||||
QSet< QString > m_currScannerPaths;
|
||||
QStringList m_cachedScannerDirs;
|
||||
|
@@ -294,13 +294,13 @@ InfoSystem::removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin )
|
||||
}
|
||||
|
||||
|
||||
QWeakPointer< QThread >
|
||||
QPointer< QThread >
|
||||
InfoSystem::workerThread() const
|
||||
{
|
||||
if ( m_infoSystemWorkerThreadController->isRunning() && m_infoSystemWorkerThreadController->worker() )
|
||||
return QWeakPointer< QThread >( m_infoSystemWorkerThreadController->worker()->thread() );
|
||||
return QPointer< QThread >( m_infoSystemWorkerThreadController->worker()->thread() );
|
||||
|
||||
return QWeakPointer< QThread >();
|
||||
return QPointer< QThread >();
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ InfoSystemCacheThread::~InfoSystemCacheThread()
|
||||
void
|
||||
InfoSystemCacheThread::InfoSystemCacheThread::run()
|
||||
{
|
||||
m_cache = QWeakPointer< InfoSystemCache >( new InfoSystemCache() );
|
||||
m_cache = QPointer< InfoSystemCache >( new InfoSystemCache() );
|
||||
exec();
|
||||
if ( !m_cache.isNull() )
|
||||
delete m_cache.data();
|
||||
@@ -350,7 +350,7 @@ InfoSystemWorkerThread::~InfoSystemWorkerThread()
|
||||
void
|
||||
InfoSystemWorkerThread::InfoSystemWorkerThread::run()
|
||||
{
|
||||
m_worker = QWeakPointer< InfoSystemWorker >( new InfoSystemWorker() );
|
||||
m_worker = QPointer< InfoSystemWorker >( new InfoSystemWorker() );
|
||||
exec();
|
||||
if( !m_worker.isNull() )
|
||||
delete m_worker.data();
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QWeakPointer>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QUrl>
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
InfoSystemCache* cache() const;
|
||||
|
||||
private:
|
||||
QWeakPointer< InfoSystemCache > m_cache;
|
||||
QPointer< InfoSystemCache > m_cache;
|
||||
};
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
InfoSystemWorker* worker() const;
|
||||
|
||||
private:
|
||||
QWeakPointer< InfoSystemWorker > m_worker;
|
||||
QPointer< InfoSystemWorker > m_worker;
|
||||
};
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
bool pushInfo( InfoPushData pushData );
|
||||
bool pushInfo( const QString &caller, const InfoTypeMap &input, const PushInfoFlags pushFlags );
|
||||
|
||||
QWeakPointer< QThread > workerThread() const;
|
||||
QPointer< QThread > workerThread() const;
|
||||
|
||||
public slots:
|
||||
// InfoSystem takes ownership of InfoPlugins
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QtDebug>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QWeakPointer>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QVariant>
|
||||
|
@@ -92,7 +92,7 @@ LatchedStatusManager::sourceOffline()
|
||||
|
||||
if ( m_jobs.contains( s->userName() ) )
|
||||
{
|
||||
QWeakPointer< LatchedStatusItem> job = m_jobs.take( s->userName() ).data();
|
||||
QPointer< LatchedStatusItem> job = m_jobs.take( s->userName() ).data();
|
||||
if ( !job.isNull() )
|
||||
job.data()->stop();
|
||||
}
|
||||
@@ -107,7 +107,7 @@ LatchedStatusManager::latchedOff( const Tomahawk::source_ptr& from, const Tomaha
|
||||
|
||||
if ( to->isLocal() && m_jobs.contains( from->userName() ) )
|
||||
{
|
||||
QWeakPointer< LatchedStatusItem > item = m_jobs.take( from->userName() );
|
||||
QPointer< LatchedStatusItem > item = m_jobs.take( from->userName() );
|
||||
if ( !item.isNull() )
|
||||
item.data()->stop();
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ private slots:
|
||||
void sourceOffline();
|
||||
|
||||
private:
|
||||
QHash< QString, QWeakPointer< LatchedStatusItem > > m_jobs;
|
||||
QHash< QString, QPointer< LatchedStatusItem > > m_jobs;
|
||||
};
|
||||
|
||||
#endif // LATCHEDSTATUSITEM_H
|
||||
|
@@ -101,7 +101,7 @@ PipelineStatusManager::resolving( const Tomahawk::query_ptr& p )
|
||||
if ( m_curItem.isNull() )
|
||||
{
|
||||
// No current query item and we're resolving something, so show it
|
||||
m_curItem = QWeakPointer< PipelineStatusItem >( new PipelineStatusItem( p ) );
|
||||
m_curItem = QPointer< PipelineStatusItem >( new PipelineStatusItem( p ) );
|
||||
JobStatusView::instance()->model()->addJob( m_curItem.data() );
|
||||
}
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include "Query.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPointer>
|
||||
|
||||
class PipelineStatusItem : public JobStatusItem
|
||||
{
|
||||
@@ -58,7 +59,7 @@ private slots:
|
||||
void resolving( const Tomahawk::query_ptr& p );
|
||||
|
||||
private:
|
||||
QWeakPointer<PipelineStatusItem> m_curItem;
|
||||
QPointer<PipelineStatusItem> m_curItem;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
TransferStatusItem::TransferStatusItem( TransferStatusManager* p, StreamConnection* sc )
|
||||
: m_parent( p )
|
||||
, m_stream( QWeakPointer< StreamConnection >( sc ) )
|
||||
, m_stream( QPointer< StreamConnection >( sc ) )
|
||||
{
|
||||
if ( m_stream.data()->type() == StreamConnection::RECEIVING )
|
||||
m_type = "receive";
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include "JobStatusItem.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
@@ -58,7 +60,7 @@ private slots:
|
||||
private:
|
||||
TransferStatusManager* m_parent;
|
||||
QString m_type, m_main, m_right;
|
||||
QWeakPointer< StreamConnection > m_stream;
|
||||
QPointer< StreamConnection > m_stream;
|
||||
};
|
||||
|
||||
#endif // TRANSFERSTATUSITEM_H
|
||||
|
@@ -45,7 +45,7 @@ PortFwdThread::~PortFwdThread()
|
||||
void
|
||||
PortFwdThread::run()
|
||||
{
|
||||
m_worker = QWeakPointer< PortFwdWorker >( new PortFwdWorker( m_port ) );
|
||||
m_worker = QPointer< PortFwdWorker >( new PortFwdWorker( m_port ) );
|
||||
Q_ASSERT( m_worker );
|
||||
connect( m_worker.data(), SIGNAL( externalAddressDetected( QHostAddress, unsigned int ) ), this, SIGNAL( externalAddressDetected( QHostAddress, unsigned int ) ) );
|
||||
QTimer::singleShot( 0, m_worker.data(), SLOT( work() ) );
|
||||
@@ -62,7 +62,7 @@ PortFwdThread::run()
|
||||
}
|
||||
|
||||
|
||||
QWeakPointer< PortFwdWorker >
|
||||
QPointer< PortFwdWorker >
|
||||
PortFwdThread::worker() const
|
||||
{
|
||||
return m_worker;
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QHostAddress>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
class Portfwd;
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
explicit PortFwdThread( unsigned int port );
|
||||
~PortFwdThread();
|
||||
|
||||
QWeakPointer< PortFwdWorker > worker() const;
|
||||
QPointer< PortFwdWorker > worker() const;
|
||||
|
||||
signals:
|
||||
void externalAddressDetected( QHostAddress ha, unsigned int port );
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
void run();
|
||||
|
||||
private:
|
||||
QWeakPointer< PortFwdWorker > m_worker;
|
||||
QPointer< PortFwdWorker > m_worker;
|
||||
unsigned int m_port;
|
||||
};
|
||||
|
||||
|
@@ -150,7 +150,7 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
||||
}
|
||||
// TODO check if we have a public/internet IP on this machine directly
|
||||
tLog() << "External address mode set to upnp...";
|
||||
m_portfwd = QWeakPointer< PortFwdThread >( new PortFwdThread( m_port ) );
|
||||
m_portfwd = QPointer< PortFwdThread >( new PortFwdThread( m_port ) );
|
||||
Q_ASSERT( m_portfwd );
|
||||
connect( m_portfwd.data(), SIGNAL( externalAddressDetected( QHostAddress, unsigned int ) ),
|
||||
SLOT( setExternalAddress( QHostAddress, unsigned int ) ) );
|
||||
@@ -243,7 +243,7 @@ Servent::setExternalAddress( QHostAddress ha, unsigned int port )
|
||||
void
|
||||
Servent::registerOffer( const QString& key, Connection* conn )
|
||||
{
|
||||
m_offers[key] = QWeakPointer<Connection>(conn);
|
||||
m_offers[key] = QPointer<Connection>(conn);
|
||||
}
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ void
|
||||
Servent::readyRead()
|
||||
{
|
||||
Q_ASSERT( this->thread() == QThread::currentThread() );
|
||||
QWeakPointer< QTcpSocketExtra > sock = (QTcpSocketExtra*)sender();
|
||||
QPointer< QTcpSocketExtra > sock = (QTcpSocketExtra*)sender();
|
||||
|
||||
if( sock.isNull() || sock.data()->_disowned )
|
||||
{
|
||||
@@ -667,7 +667,7 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
||||
|
||||
if( m_offers.contains( key ) )
|
||||
{
|
||||
QWeakPointer<Connection> conn = m_offers.value( key );
|
||||
QPointer<Connection> conn = m_offers.value( key );
|
||||
if( conn.isNull() )
|
||||
{
|
||||
// This can happen if it's a streamconnection, but the audioengine has
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
QTimer::singleShot( AUTH_TIMEOUT, this, SLOT( authTimeout() ) ) ;
|
||||
}
|
||||
|
||||
QWeakPointer<Connection> _conn;
|
||||
QPointer<Connection> _conn;
|
||||
bool _outbound;
|
||||
bool _disowned;
|
||||
msg_ptr _msg;
|
||||
@@ -159,7 +159,7 @@ private:
|
||||
|
||||
QJson::Parser parser;
|
||||
QList< ControlConnection* > m_controlconnections; // canonical list of authed peers
|
||||
QMap< QString, QWeakPointer< Connection > > m_offers;
|
||||
QMap< QString, QPointer< Connection > > m_offers;
|
||||
QStringList m_connectedNodes;
|
||||
|
||||
int m_port, m_externalPort;
|
||||
@@ -174,7 +174,7 @@ private:
|
||||
|
||||
QMap< QString,boost::function< QSharedPointer< QIODevice >(Tomahawk::result_ptr) > > m_iofactories;
|
||||
|
||||
QWeakPointer< PortFwdThread > m_portfwd;
|
||||
QPointer< PortFwdThread > m_portfwd;
|
||||
static Servent* s_instance;
|
||||
};
|
||||
|
||||
|
@@ -46,7 +46,7 @@ PlayableProxyModelPlaylistInterface::PlayableProxyModelPlaylistInterface( Playab
|
||||
PlayableProxyModelPlaylistInterface::~PlayableProxyModelPlaylistInterface()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
m_proxyModel.clear();
|
||||
m_proxyModel = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -20,13 +20,14 @@
|
||||
#ifndef TRACKPROXYMODELPLAYLISTINTERFACE_H
|
||||
#define TRACKPROXYMODELPLAYLISTINTERFACE_H
|
||||
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
|
||||
#include "PlaylistInterface.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QPointer>
|
||||
|
||||
class PlayableProxyModel;
|
||||
|
||||
namespace Tomahawk {
|
||||
@@ -65,7 +66,7 @@ private slots:
|
||||
void onCurrentIndexChanged();
|
||||
|
||||
protected:
|
||||
QWeakPointer< PlayableProxyModel > m_proxyModel;
|
||||
QPointer< PlayableProxyModel > m_proxyModel;
|
||||
|
||||
PlaylistModes::RepeatMode m_repeatMode;
|
||||
bool m_shuffled;
|
||||
|
@@ -43,7 +43,7 @@ TreeProxyModelPlaylistInterface::TreeProxyModelPlaylistInterface( TreeProxyModel
|
||||
|
||||
TreeProxyModelPlaylistInterface::~TreeProxyModelPlaylistInterface()
|
||||
{
|
||||
m_proxyModel.clear();
|
||||
m_proxyModel = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -67,7 +67,7 @@ public slots:
|
||||
virtual void setShuffled( bool enabled ) { m_shuffled = enabled; emit shuffleModeChanged( enabled ); }
|
||||
|
||||
private:
|
||||
QWeakPointer< TreeProxyModel > m_proxyModel;
|
||||
QPointer< TreeProxyModel > m_proxyModel;
|
||||
|
||||
PlaylistModes::RepeatMode m_repeatMode;
|
||||
bool m_shuffled;
|
||||
|
@@ -62,8 +62,8 @@ namespace Tomahawk
|
||||
// utility
|
||||
void calculateSummary();
|
||||
|
||||
QWeakPointer< QWidget > m_input;
|
||||
QWeakPointer< QWidget > m_match;
|
||||
QPointer< QWidget > m_input;
|
||||
QPointer< QWidget > m_match;
|
||||
QString m_matchData;
|
||||
QString m_matchString;
|
||||
QString m_summary;
|
||||
|
@@ -181,8 +181,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
m_data.first = m_currentType;
|
||||
} else if( selectedType() == "Artist Description" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::Description;
|
||||
@@ -200,8 +200,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
m_data.first = m_currentType;
|
||||
} else if( selectedType() == "User Radio" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::SourceCatalog;
|
||||
@@ -229,8 +229,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
combo->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( combo );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( combo );
|
||||
} else if( selectedType() == "Song" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::SongId;
|
||||
|
||||
@@ -248,8 +248,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
m_data.first = m_currentType;
|
||||
} else if( selectedType() == "Variety" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::Variety;
|
||||
@@ -269,8 +269,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
m_data.first = m_currentType;
|
||||
} else if( selectedType() == "Adventurousness" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::Adventurousness;
|
||||
@@ -291,8 +291,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
m_data.first = m_currentType;
|
||||
} else if( selectedType() == "Tempo" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::MinTempo;
|
||||
@@ -354,8 +354,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
combo->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( combo );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( combo );
|
||||
} else if( selectedType() == "Key" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::Key;
|
||||
|
||||
@@ -383,8 +383,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
combo->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( combo );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( combo );
|
||||
} else if( selectedType() == "Sorting" ) {
|
||||
m_currentType = Echonest::DynamicPlaylist::Sort;
|
||||
|
||||
@@ -416,8 +416,8 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
combo->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( combo );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( combo );
|
||||
} else if( selectedType() == "Mood" || selectedType() == "Style" ) {
|
||||
if( selectedType() == "Mood" )
|
||||
m_currentType = Echonest::DynamicPlaylist::Mood;
|
||||
@@ -437,13 +437,13 @@ Tomahawk::EchonestControl::updateWidgets()
|
||||
|
||||
match->hide();
|
||||
combo->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( combo );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( combo );
|
||||
|
||||
insertMoodsAndStyles();
|
||||
} else {
|
||||
m_match = QWeakPointer<QWidget>( new QWidget );
|
||||
m_input = QWeakPointer<QWidget>( new QWidget );
|
||||
m_match = QPointer<QWidget>( new QWidget );
|
||||
m_input = QPointer<QWidget>( new QWidget );
|
||||
}
|
||||
updateData();
|
||||
calculateSummary();
|
||||
@@ -472,8 +472,8 @@ Tomahawk::EchonestControl::setupMinMaxWidgets( Echonest::DynamicPlaylist::Playli
|
||||
|
||||
match->hide();
|
||||
input->hide();
|
||||
m_match = QWeakPointer< QWidget >( match );
|
||||
m_input = QWeakPointer< QWidget >( input );
|
||||
m_match = QPointer< QWidget >( match );
|
||||
m_input = QPointer< QWidget >( input );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <echonest/Playlist.h>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
@@ -81,8 +82,8 @@ private:
|
||||
Echonest::DynamicPlaylist::PlaylistParam m_currentType;
|
||||
int m_overrideType;
|
||||
|
||||
QWeakPointer< QWidget > m_input;
|
||||
QWeakPointer< QWidget > m_match;
|
||||
QPointer< QWidget > m_input;
|
||||
QPointer< QWidget > m_match;
|
||||
QString m_matchData;
|
||||
QString m_matchString;
|
||||
QString m_summary;
|
||||
|
@@ -40,12 +40,12 @@ DynamicControlWrapper::DynamicControlWrapper( const Tomahawk::dyncontrol_ptr& co
|
||||
, m_minusButton( 0 )
|
||||
, m_control( control )
|
||||
, m_typeSelector( 0 )
|
||||
, m_layout( QWeakPointer< QGridLayout >( layout ) )
|
||||
, m_layout( QPointer< QGridLayout >( layout ) )
|
||||
{
|
||||
m_typeSelector = new QComboBox( m_parent );
|
||||
|
||||
m_matchSelector = QWeakPointer<QWidget>( control->matchSelector() );
|
||||
m_entryWidget = QWeakPointer<QWidget>( control->inputField() );
|
||||
m_matchSelector = QPointer<QWidget>( control->matchSelector() );
|
||||
m_entryWidget = QPointer<QWidget>( control->inputField() );
|
||||
|
||||
m_minusButton = initButton( m_parent );
|
||||
m_minusButton->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::ListRemove ) );
|
||||
@@ -157,12 +157,12 @@ DynamicControlWrapper::typeSelectorChanged( const QString& type, bool firstLoad
|
||||
|
||||
|
||||
if( m_control->matchSelector() ) {
|
||||
m_matchSelector = QWeakPointer<QWidget>( m_control->matchSelector() );
|
||||
m_matchSelector = QPointer<QWidget>( m_control->matchSelector() );
|
||||
m_layout.data()->addWidget( m_matchSelector.data(), m_row, 1, Qt::AlignCenter );
|
||||
m_matchSelector.data()->show();
|
||||
}
|
||||
if( m_control->inputField() ) {
|
||||
m_entryWidget = QWeakPointer<QWidget>( m_control->inputField() );
|
||||
m_entryWidget = QPointer<QWidget>( m_control->inputField() );
|
||||
m_layout.data()->addWidget( m_entryWidget.data(), m_row, 2 );
|
||||
m_entryWidget.data()->show();
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#define DYNAMIC_CONTROL_WRAPPER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
@@ -70,9 +71,9 @@ private:
|
||||
|
||||
dyncontrol_ptr m_control;
|
||||
QComboBox* m_typeSelector;
|
||||
QWeakPointer<QWidget> m_matchSelector;
|
||||
QWeakPointer<QWidget> m_entryWidget;
|
||||
QWeakPointer<QGridLayout> m_layout;
|
||||
QPointer<QWidget> m_matchSelector;
|
||||
QPointer<QWidget> m_entryWidget;
|
||||
QPointer<QGridLayout> m_layout;
|
||||
};
|
||||
|
||||
};
|
||||
|
@@ -523,7 +523,7 @@ QtScriptResolver::loadUi()
|
||||
if( m.contains( "images" ) )
|
||||
uiData = fixDataImagePaths( uiData, compressed, images );
|
||||
|
||||
m_configWidget = QWeakPointer< QWidget >( widgetFromData( uiData, 0 ) );
|
||||
m_configWidget = QPointer< QWidget >( widgetFromData( uiData, 0 ) );
|
||||
|
||||
emit changed();
|
||||
}
|
||||
|
@@ -176,7 +176,7 @@ private:
|
||||
ExternalResolver::ErrorState m_error;
|
||||
|
||||
QtScriptResolverHelper* m_resolverHelper;
|
||||
QWeakPointer< QWidget > m_configWidget;
|
||||
QPointer< QWidget > m_configWidget;
|
||||
QList< QVariant > m_dataWidgets;
|
||||
};
|
||||
|
||||
|
@@ -427,7 +427,7 @@ ScriptResolver::setupConfWidget( const QVariantMap& m )
|
||||
|
||||
if ( m.contains( "images" ) )
|
||||
uiData = fixDataImagePaths( uiData, compressed, m[ "images" ].toMap() );
|
||||
m_configWidget = QWeakPointer< QWidget >( widgetFromData( uiData, 0 ) );
|
||||
m_configWidget = QPointer< QWidget >( widgetFromData( uiData, 0 ) );
|
||||
|
||||
emit changed();
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ private:
|
||||
QString m_name;
|
||||
QPixmap m_icon;
|
||||
unsigned int m_weight, m_preference, m_timeout, m_num_restarts;
|
||||
QWeakPointer< QWidget > m_configWidget;
|
||||
QPointer< QWidget > m_configWidget;
|
||||
|
||||
quint32 m_msgsize;
|
||||
QByteArray m_msg;
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QDebug>
|
||||
#include <QPointer>
|
||||
|
||||
class QToolbarTabDialogPrivate : public QObject {
|
||||
Q_OBJECT
|
||||
@@ -45,8 +46,8 @@ public slots:
|
||||
}
|
||||
|
||||
public:
|
||||
QWeakPointer<QDialog> dialog;
|
||||
QWeakPointer<QToolbarTabDialog> q;
|
||||
QPointer<QDialog> dialog;
|
||||
QPointer<QToolbarTabDialog> q;
|
||||
|
||||
QVBoxLayout* layout;
|
||||
QToolBar* toolbar;
|
||||
|
@@ -27,7 +27,7 @@ BinaryInstallerHelper::BinaryInstallerHelper( QTemporaryFile* tempFile, const QS
|
||||
, m_tempFile( tempFile )
|
||||
, m_resolverId( resolverId )
|
||||
, m_createAccount( createAccount )
|
||||
, m_manager( QWeakPointer< AtticaManager >( manager ) )
|
||||
, m_manager( QPointer< AtticaManager >( manager ) )
|
||||
{
|
||||
Q_ASSERT( m_tempFile );
|
||||
Q_ASSERT( !m_resolverId.isEmpty() );
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "AtticaManager.h"
|
||||
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
class QTemporaryFile;
|
||||
class BinaryInstallerHelper : public QObject
|
||||
@@ -39,7 +39,7 @@ private:
|
||||
QTemporaryFile* m_tempFile;
|
||||
QString m_resolverId;
|
||||
bool m_createAccount;
|
||||
QWeakPointer<AtticaManager> m_manager;
|
||||
QPointer<AtticaManager> m_manager;
|
||||
};
|
||||
|
||||
#endif
|
@@ -111,7 +111,7 @@ createAccountFromFactory( Tomahawk::Accounts::AccountFactory* factory, QWidget*
|
||||
dialog->show();
|
||||
#else
|
||||
DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QObject::tr( "%1 Config" ).arg( account->accountFriendlyName() ), parent );
|
||||
QWeakPointer< DelegateConfigWrapper > watcher( &dialog );
|
||||
QPointer< DelegateConfigWrapper > watcher( &dialog );
|
||||
|
||||
if( account->configurationWidget()->metaObject()->indexOfSignal( "dataError(bool)" ) > -1 )
|
||||
QObject::connect( account->configurationWidget(), SIGNAL( dataError( bool ) ), &dialog, SLOT( toggleOkButton( bool ) ), Qt::UniqueConnection );
|
||||
@@ -141,7 +141,7 @@ openAccountConfig( Tomahawk::Accounts::Account* account, QWidget* parent, bool s
|
||||
#ifndef Q_OS_MAC
|
||||
DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QObject::tr("%1 Configuration" ).arg( account->accountFriendlyName() ), parent );
|
||||
dialog.setShowDelete( showDelete );
|
||||
QWeakPointer< DelegateConfigWrapper > watcher( &dialog );
|
||||
QPointer< DelegateConfigWrapper > watcher( &dialog );
|
||||
int ret = dialog.exec();
|
||||
if ( !watcher.isNull() && dialog.deleted() )
|
||||
{
|
||||
|
@@ -31,14 +31,14 @@
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
QWeakPointer< TomahawkUtils::SharedTimeLine > PixmapDelegateFader::s_stlInstance = QWeakPointer< TomahawkUtils::SharedTimeLine >();
|
||||
QPointer< TomahawkUtils::SharedTimeLine > PixmapDelegateFader::s_stlInstance = QPointer< TomahawkUtils::SharedTimeLine >();
|
||||
|
||||
|
||||
QWeakPointer< TomahawkUtils::SharedTimeLine >
|
||||
QPointer< TomahawkUtils::SharedTimeLine >
|
||||
PixmapDelegateFader::stlInstance()
|
||||
{
|
||||
if ( s_stlInstance.isNull() )
|
||||
s_stlInstance = QWeakPointer< TomahawkUtils::SharedTimeLine> ( new TomahawkUtils::SharedTimeLine() );
|
||||
s_stlInstance = QPointer< TomahawkUtils::SharedTimeLine> ( new TomahawkUtils::SharedTimeLine() );
|
||||
|
||||
return s_stlInstance;
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include <QObject>
|
||||
#include <QTimeLine>
|
||||
#include <QQueue>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class PixmapDelegateFader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
static QWeakPointer< TomahawkUtils::SharedTimeLine > stlInstance();
|
||||
static QPointer< TomahawkUtils::SharedTimeLine > stlInstance();
|
||||
|
||||
public:
|
||||
PixmapDelegateFader( const artist_ptr& artist, const QSize& size, TomahawkUtils::ImageMode mode = TomahawkUtils::Original, bool forceLoad = true );
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
|
||||
QPixmap m_currentReference, m_oldReference, m_current;
|
||||
|
||||
static QWeakPointer< TomahawkUtils::SharedTimeLine > s_stlInstance;
|
||||
static QPointer< TomahawkUtils::SharedTimeLine > s_stlInstance;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ WidgetDragFilter::WidgetDragFilter( QObject* parent )
|
||||
, m_dragStarted( false )
|
||||
{
|
||||
Q_ASSERT( parent->isWidgetType() );
|
||||
m_target = QWeakPointer<QWidget>(static_cast<QWidget*>(parent));
|
||||
m_target = QPointer<QWidget>(static_cast<QWidget*>(parent));
|
||||
m_target.data()->installEventFilter( this );
|
||||
}
|
||||
|
||||
|
@@ -19,11 +19,12 @@
|
||||
#ifndef WIDGET_DRAG_FILTER_H
|
||||
#define WIDGET_DRAG_FILTER_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include <QPointer>
|
||||
|
||||
class QMouseEvent;
|
||||
class QEvent;
|
||||
@@ -42,7 +43,7 @@ public:
|
||||
private:
|
||||
bool canDrag( QObject* obj, QMouseEvent* ev ) const;
|
||||
|
||||
QWeakPointer<QWidget> m_target; // in case it's deleted under us
|
||||
QPointer<QWidget> m_target; // in case it's deleted under us
|
||||
QPoint m_dragPoint;
|
||||
bool m_dragStarted;
|
||||
};
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <QTimeLine>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QEasingCurve>
|
||||
#include <cmath>
|
||||
#include <QPointer>
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
unsigned int m_val, m_oldval;
|
||||
|
||||
QString m_format;
|
||||
QWeakPointer<QLabel> m_diff;
|
||||
QPointer<QLabel> m_diff;
|
||||
};
|
||||
|
||||
#endif // ANIMATEDCOUNTERLABEL_H
|
||||
|
@@ -27,13 +27,13 @@
|
||||
|
||||
#define ANIMATION_TIME 1000
|
||||
|
||||
QWeakPointer< TomahawkUtils::SharedTimeLine > FadingPixmap::s_stlInstance = QWeakPointer< TomahawkUtils::SharedTimeLine >();
|
||||
QPointer< TomahawkUtils::SharedTimeLine > FadingPixmap::s_stlInstance = QPointer< TomahawkUtils::SharedTimeLine >();
|
||||
|
||||
QWeakPointer< TomahawkUtils::SharedTimeLine >
|
||||
QPointer< TomahawkUtils::SharedTimeLine >
|
||||
FadingPixmap::stlInstance()
|
||||
{
|
||||
if ( s_stlInstance.isNull() )
|
||||
s_stlInstance = QWeakPointer< TomahawkUtils::SharedTimeLine> ( new TomahawkUtils::SharedTimeLine() );
|
||||
s_stlInstance = QPointer< TomahawkUtils::SharedTimeLine> ( new TomahawkUtils::SharedTimeLine() );
|
||||
|
||||
return s_stlInstance;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include <QLabel>
|
||||
#include <QPaintEvent>
|
||||
#include <QTimeLine>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
@@ -38,7 +38,7 @@ class DLLEXPORT FadingPixmap : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
static QWeakPointer< TomahawkUtils::SharedTimeLine > stlInstance();
|
||||
static QPointer< TomahawkUtils::SharedTimeLine > stlInstance();
|
||||
|
||||
public:
|
||||
FadingPixmap( QWidget* parent = 0 );
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
int m_startFrame;
|
||||
bool m_isDefault;
|
||||
|
||||
static QWeakPointer< TomahawkUtils::SharedTimeLine > s_stlInstance;
|
||||
static QPointer< TomahawkUtils::SharedTimeLine > s_stlInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user