mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-02 10:24:01 +02:00
Switch around when the oauthtwitter gets its nam and add some debug
This commit is contained in:
@@ -142,16 +142,18 @@ TwitterPlugin::connectPlugin( bool /*startup*/ )
|
|||||||
bool
|
bool
|
||||||
TwitterPlugin::refreshTwitterAuth()
|
TwitterPlugin::refreshTwitterAuth()
|
||||||
{
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO << " begin";
|
||||||
if( !m_twitterAuth.isNull() )
|
if( !m_twitterAuth.isNull() )
|
||||||
delete m_twitterAuth.data();
|
delete m_twitterAuth.data();
|
||||||
m_twitterAuth = QWeakPointer<TomahawkOAuthTwitter>( new TomahawkOAuthTwitter( this ) );
|
|
||||||
|
qDebug() << Q_FUNC_INFO << " with nam " << TomahawkUtils::nam();
|
||||||
|
m_twitterAuth = QWeakPointer<TomahawkOAuthTwitter>( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||||
|
|
||||||
if( m_twitterAuth.isNull() )
|
if( m_twitterAuth.isNull() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TomahawkSettings *settings = TomahawkSettings::instance();
|
TomahawkSettings *settings = TomahawkSettings::instance();
|
||||||
|
|
||||||
m_twitterAuth.data()->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
m_twitterAuth.data()->setOAuthToken( settings->twitterOAuthToken().toLatin1() );
|
m_twitterAuth.data()->setOAuthToken( settings->twitterOAuthToken().toLatin1() );
|
||||||
m_twitterAuth.data()->setOAuthTokenSecret( settings->twitterOAuthTokenSecret().toLatin1() );
|
m_twitterAuth.data()->setOAuthTokenSecret( settings->twitterOAuthTokenSecret().toLatin1() );
|
||||||
|
|
||||||
|
@@ -94,8 +94,7 @@ void
|
|||||||
TwitterConfigWidget::authenticateTwitter()
|
TwitterConfigWidget::authenticateTwitter()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( TomahawkUtils::nam(), this );
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->authorizePin();
|
twitAuth->authorizePin();
|
||||||
|
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
TomahawkSettings* s = TomahawkSettings::instance();
|
||||||
@@ -207,8 +206,7 @@ TwitterConfigWidget::startPostGotTomahawkStatus()
|
|||||||
emit twitterAuthed( false );
|
emit twitterAuthed( false );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( TomahawkUtils::nam(), this );
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
||||||
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
||||||
QTweetAccountVerifyCredentials *credVerifier = new QTweetAccountVerifyCredentials( twitAuth, this );
|
QTweetAccountVerifyCredentials *credVerifier = new QTweetAccountVerifyCredentials( twitAuth, this );
|
||||||
@@ -227,8 +225,7 @@ TwitterConfigWidget::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &use
|
|||||||
}
|
}
|
||||||
TomahawkSettings* s = TomahawkSettings::instance();
|
TomahawkSettings* s = TomahawkSettings::instance();
|
||||||
s->setTwitterScreenName( user.screenName() );
|
s->setTwitterScreenName( user.screenName() );
|
||||||
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( this );
|
TomahawkOAuthTwitter *twitAuth = new TomahawkOAuthTwitter( TomahawkUtils::nam(), this );
|
||||||
twitAuth->setNetworkAccessManager( TomahawkUtils::nam() );
|
|
||||||
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
twitAuth->setOAuthToken( s->twitterOAuthToken().toLatin1() );
|
||||||
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
twitAuth->setOAuthTokenSecret( s->twitterOAuthTokenSecret().toLatin1() );
|
||||||
if ( m_postGTtype != "Direct Message" )
|
if ( m_postGTtype != "Direct Message" )
|
||||||
|
2
thirdparty/liblastfm2/src/ws/ws.cpp
vendored
2
thirdparty/liblastfm2/src/ws/ws.cpp
vendored
@@ -206,7 +206,7 @@ lastfm::nam()
|
|||||||
NetworkAccessManager* newNam = new NetworkAccessManager();
|
NetworkAccessManager* newNam = new NetworkAccessManager();
|
||||||
threadNamHash[thread] = newNam;
|
threadNamHash[thread] = newNam;
|
||||||
ourNamHash[thread] = true;
|
ourNamHash[thread] = true;
|
||||||
qDebug() << Q_FUNC_INFO << " returning " << dynamic_cast<QNetworkAccessManager*>(newNam);
|
qDebug() << Q_FUNC_INFO << " returning " << threadNamHash[thread];
|
||||||
return newNam;
|
return newNam;
|
||||||
}
|
}
|
||||||
qDebug() << Q_FUNC_INFO << " found a nam, is " << threadNamHash[thread];
|
qDebug() << Q_FUNC_INFO << " found a nam, is " << threadNamHash[thread];
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
TomahawkOAuthTwitter::TomahawkOAuthTwitter( QObject* parent )
|
TomahawkOAuthTwitter::TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject* parent )
|
||||||
: OAuthTwitter( parent )
|
: OAuthTwitter( nam, parent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ class QTWEETLIBSHARED_EXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TomahawkOAuthTwitter( QObject *parent = 0 );
|
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
||||||
|
|
||||||
~TomahawkOAuthTwitter() {}
|
~TomahawkOAuthTwitter() {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user