mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
Make siptwitter optional and rely on system qtweetlib on default
This commit is contained in:
1
thirdparty/CMakeLists.txt
vendored
1
thirdparty/CMakeLists.txt
vendored
@@ -1,5 +1,4 @@
|
||||
ADD_SUBDIRECTORY( jdns )
|
||||
ADD_SUBDIRECTORY( qtweetlib )
|
||||
ADD_SUBDIRECTORY( libportfwd )
|
||||
ADD_SUBDIRECTORY( qxt )
|
||||
ADD_SUBDIRECTORY( liblastfm2 )
|
||||
|
4
thirdparty/qtweetlib/CMakeLists.txt
vendored
4
thirdparty/qtweetlib/CMakeLists.txt
vendored
@@ -88,8 +88,6 @@ set(TOMAHAWK_QTWEETLIB_SOURCES
|
||||
QTweetLib/src/qtweetblockscreate.cpp
|
||||
QTweetLib/src/qtweetblocksdestroy.cpp
|
||||
QTweetLib/src/qtweetblocksexists.cpp
|
||||
|
||||
tomahawk-custom/tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set(TOMAHAWK_QTWEETLIB_HEADERS
|
||||
@@ -166,8 +164,6 @@ set(TOMAHAWK_QTWEETLIB_HEADERS
|
||||
QTweetLib/src/qtweetblockscreate.h
|
||||
QTweetLib/src/qtweetblocksdestroy.h
|
||||
QTweetLib/src/qtweetblocksexists.h
|
||||
|
||||
tomahawk-custom/tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
@@ -1,32 +0,0 @@
|
||||
#include "tomahawkoauthtwitter.h"
|
||||
#include <QInputDialog>
|
||||
#include <QDebug>
|
||||
|
||||
#define CONSUMER_KEY "C4v4Wfa21rfIDck4HMR3A"
|
||||
#define CONSUMER_SECRET "zXSjU6bjrvg6UVMJX4JufqHyjj3iextY14SR9uBEAo"
|
||||
|
||||
TomahawkOAuthTwitter::TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject* parent )
|
||||
: OAuthTwitter( CONSUMER_KEY, CONSUMER_SECRET, parent )
|
||||
{
|
||||
setNetworkAccessManager( nam );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
TomahawkOAuthTwitter::authorizationWidget()
|
||||
{
|
||||
bool ok;
|
||||
int i = QInputDialog::getInt(0, tr( "Twitter PIN" ), tr( "After authenticating on Twitter's web site,\nenter the displayed PIN number here:" ), 0, 0, 2147483647, 1, &ok);
|
||||
if (ok)
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkOAuthTwitter::error()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
setOAuthToken( QString().toLatin1() );
|
||||
setOAuthTokenSecret( QString().toLatin1() );
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
#ifndef TOMAHAWKOAUTHTWITTER
|
||||
#define TOMAHAWKOAUTHTWITTER
|
||||
|
||||
#include <oauthtwitter.h>
|
||||
|
||||
#include "qtweetlib_global.h"
|
||||
|
||||
class QTWEETLIBSHARED_EXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
||||
|
||||
~TomahawkOAuthTwitter() {}
|
||||
|
||||
protected:
|
||||
virtual int authorizationWidget();
|
||||
|
||||
private slots:
|
||||
void error();
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user