mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
More compilation fixes, though settings dialog needs serious reworking. Can't figure out why it isn't linking atm
This commit is contained in:
parent
fb6d9967dc
commit
709a25ce97
@ -9,27 +9,35 @@ add_definitions( -DDLLEXPORT_PRO )
|
||||
set( twitterAccountSources
|
||||
twitteraccount.cpp
|
||||
twitterconfigwidget.cpp
|
||||
tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set( twitterAccountHeaders
|
||||
twitteraccount.h
|
||||
twitterconfigwidget.h
|
||||
tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
set( twitterAccountUI
|
||||
twitterconfigwidget.ui
|
||||
)
|
||||
|
||||
set( tomahawkOAuthTwitterSources
|
||||
tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set( tomahawkOAuthTwitterHeaders
|
||||
tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
||||
${QT_INCLUDE_DIR}
|
||||
${QTWEETLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
qt4_add_resources( RC_SRCS "resources.qrc" )
|
||||
qt4_wrap_cpp( tomahawkOAuthTwitterMoc ${tomahawkOAuthTwitterSources} )
|
||||
add_library( tomahawk_oauth_twitter SHARED ${tomahawkOAuthTwitterSources} ${tomahawkOAuthTwitterMoc} )
|
||||
qt4_wrap_cpp( twitterAccountMoc ${twitterAccountHeaders} )
|
||||
qt4_wrap_ui( twitterAccountUI_H ${twitterAccountUI} )
|
||||
qt4_add_resources( RC_SRCS "resources.qrc" )
|
||||
add_library( tomahawk_account_twitter SHARED ${twitterAccountUI_H} ${twitterAccountSources} ${twitterAccountMoc} ${RC_SRCS} )
|
||||
|
||||
IF( WIN32 )
|
||||
@ -40,7 +48,15 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
)
|
||||
ENDIF( WIN32 )
|
||||
|
||||
target_link_libraries( tomahawk_oauth_twitter
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
target_link_libraries( tomahawk_account_twitter
|
||||
tomahawk_oauth_twitter
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
@ -51,4 +67,5 @@ IF( APPLE )
|
||||
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
||||
ENDIF( APPLE )
|
||||
|
||||
install( TARGETS tomahawk_oauth_twitter DESTINATION lib${LIB_SUFFIX} )
|
||||
install( TARGETS tomahawk_account_twitter DESTINATION lib${LIB_SUFFIX} )
|
||||
|
@ -115,9 +115,9 @@ void DiagnosticsDialog::updateLogView()
|
||||
}
|
||||
log.append(
|
||||
QString(" %2 (%1): %3 (%4)\n")
|
||||
.arg(sip->name())
|
||||
.arg(sip->account()->accountServiceName())
|
||||
.arg(sip->friendlyName())
|
||||
.arg(sip->accountName())
|
||||
.arg(sip->account()->accountFriendlyName())
|
||||
.arg(stateString)
|
||||
);
|
||||
|
||||
|
@ -128,7 +128,7 @@ SettingsDialog::SettingsDialog( QWidget *parent )
|
||||
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( serventReady() ) );
|
||||
}
|
||||
|
||||
setupSipButtons();
|
||||
//setupSipButtons();
|
||||
|
||||
ui->staticHostName->setText( s->externalHostname() );
|
||||
ui->staticPort->setValue( s->externalPort() );
|
||||
@ -309,7 +309,7 @@ SettingsDialog::createIcons()
|
||||
connect( ui->listWidget, SIGNAL( currentItemChanged( QListWidgetItem*, QListWidgetItem* ) ), SLOT( changePage( QListWidgetItem*, QListWidgetItem* ) ) );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void
|
||||
SettingsDialog::setupSipButtons()
|
||||
{
|
||||
@ -329,7 +329,7 @@ SettingsDialog::setupSipButtons()
|
||||
|
||||
connect( ui->removeSipButton, SIGNAL( clicked( bool ) ), this, SLOT( sipPluginDeleted( bool ) ) );
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void
|
||||
SettingsDialog::changePage( QListWidgetItem* current, QListWidgetItem* previous )
|
||||
@ -599,7 +599,7 @@ SettingsDialog::resolverConfigClosed( int value )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void
|
||||
SettingsDialog::sipItemClicked( const QModelIndex& item )
|
||||
{
|
||||
@ -814,7 +814,7 @@ SettingsDialog::sipPluginDeleted( bool )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
ProxyDialog::ProxyDialog( QWidget *parent )
|
||||
: QDialog( parent )
|
||||
|
@ -89,6 +89,7 @@ private slots:
|
||||
#endif
|
||||
|
||||
void openResolverConfig( const QString& );
|
||||
/*
|
||||
void sipItemClicked ( const QModelIndex& );
|
||||
void openSipConfig( SipPlugin* );
|
||||
void factoryActionTriggered ( bool );
|
||||
@ -96,21 +97,22 @@ private slots:
|
||||
void sipContextMenuRequest( const QPoint& );
|
||||
void sipPluginDeleted( bool );
|
||||
void sipPluginRowDeleted( bool );
|
||||
|
||||
void updateScanOptionsView();
|
||||
|
||||
*/
|
||||
// dialog slots
|
||||
void resolverConfigClosed( int value );
|
||||
/*
|
||||
void sipConfigClosed( int value );
|
||||
void sipCreateConfigClosed( int value );
|
||||
|
||||
*/
|
||||
void updateScanOptionsView();
|
||||
|
||||
void changePage( QListWidgetItem*, QListWidgetItem* );
|
||||
void serventReady();
|
||||
|
||||
private:
|
||||
void createIcons();
|
||||
void setupSipButtons();
|
||||
void handleSipPluginAdded( SipPlugin* p, bool added );
|
||||
//void setupSipButtons();
|
||||
//void handleSipPluginAdded( SipPlugin* p, bool added );
|
||||
|
||||
Ui_StackedSettingsDialog* ui;
|
||||
|
||||
|
@ -32,6 +32,8 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
ENDIF( WIN32 )
|
||||
|
||||
target_link_libraries( tomahawk_siptwitter
|
||||
tomahawk_oauth_twitter
|
||||
tomahawk_account_twitter
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <network/servent.h>
|
||||
|
||||
#include "utils/logger.h"
|
||||
#include "accounts/twitter/tomahawkoauthtwitter.h"
|
||||
|
||||
static QString s_gotTomahawkRegex = QString( "^(@[a-zA-Z0-9]+ )?(Got Tomahawk\\?) (\\{[a-fA-F0-9\\-]+\\}) (.*)$" );
|
||||
|
||||
@ -92,13 +93,19 @@ TwitterSipPlugin::connectionState() const
|
||||
}
|
||||
|
||||
|
||||
void TwitterSipPlugin::checkSettings()
|
||||
{
|
||||
//TODO/FIXME: check status and enable/disable?
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TwitterSipPlugin::connectPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( !m_account->enabled() )
|
||||
return;
|
||||
return false;
|
||||
|
||||
m_cachedPeers = m_configuration[ "cachedPeers" ].toHash();
|
||||
QStringList peerList = m_cachedPeers.keys();
|
||||
@ -134,7 +141,7 @@ TwitterSipPlugin::refreshTwitterAuth()
|
||||
|
||||
Q_ASSERT( TomahawkUtils::nam() != 0 );
|
||||
qDebug() << Q_FUNC_INFO << " with nam " << TomahawkUtils::nam();
|
||||
m_twitterAuth = QWeakPointer<TomahawkOAuthTwitter>( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
if( m_twitterAuth.isNull() )
|
||||
return false;
|
||||
@ -191,7 +198,7 @@ TwitterSipPlugin::connectAuthVerifyReply( const QTweetUser &user )
|
||||
m_isAuthed = true;
|
||||
if ( !m_twitterAuth.isNull() )
|
||||
{
|
||||
m_configuration[ "screenName" ] = user.screenName;
|
||||
m_configuration[ "screenName" ] = user.screenName();
|
||||
syncConfig();
|
||||
m_friendsTimeline = QWeakPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_twitterAuth.data(), this ) );
|
||||
m_mentions = QWeakPointer<QTweetMentions>( new QTweetMentions( m_twitterAuth.data(), this ) );
|
||||
|
@ -72,6 +72,8 @@ public slots:
|
||||
Q_UNUSED( msg );
|
||||
}
|
||||
|
||||
void checkSettings();
|
||||
|
||||
private slots:
|
||||
void connectAuthVerifyReply( const QTweetUser &user );
|
||||
void checkTimerFired();
|
||||
@ -90,16 +92,11 @@ private slots:
|
||||
void fetchAvatar( const QString &screenName );
|
||||
void avatarUserDataSlot( const QTweetUser &user );
|
||||
void profilePicReply();
|
||||
|
||||
|
||||
private:
|
||||
inline void syncConfig() { m_account->setCredentials( m_credentials ); m_account->setConfiguration( m_configuration ); m_account->syncConfig(); }
|
||||
bool refreshTwitterAuth();
|
||||
void parseGotTomahawk( const QRegExp ®ex, const QString &screenName, const QString &text );
|
||||
// handle per-plugin config
|
||||
QString twitterOAuthToken() const;
|
||||
void setTwitterOAuthToken( const QString& oauthtoken );
|
||||
QString twitterOAuthTokenSecret() const;
|
||||
void setTwitterOAuthTokenSecret( const QString& oauthtokensecret );
|
||||
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_twitterAuth;
|
||||
QWeakPointer< QTweetFriendsTimeline > m_friendsTimeline;
|
||||
|
Loading…
x
Reference in New Issue
Block a user