mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Merge remote branch 'origin/master' into watchforchanges-ng
This commit is contained in:
commit
345d6858ff
@ -61,23 +61,30 @@ macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://develo
|
||||
IF( INTERNAL_JREEN )
|
||||
ADD_SUBDIRECTORY( thirdparty/jreen )
|
||||
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.so )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
IF( APPLE )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.dylib )
|
||||
ENDIF( APPLE )
|
||||
IF( WIN32 )
|
||||
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.dll )
|
||||
ENDIF( WIN32 )
|
||||
|
||||
SET( LIBJREEN_LIBRARY jreen )
|
||||
SET( LIBJREEN_LIBRARIES ${LIBJREEN_LIBRARY} )
|
||||
SET( LIBJREEN_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
ELSE( INTERNAL_JREEN )
|
||||
macro_optional_find_package(Jreen)
|
||||
ENDIF( INTERNAL_JREEN )
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!")
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!\n")
|
||||
|
||||
# this installs headers and such and should really be handled in a separate package by packagers
|
||||
IF( INTERNAL_QTWEETLIB )
|
||||
ADD_SUBDIRECTORY( thirdparty/qtweetlib )
|
||||
# copy headers to build/QTweetLib so we can use proper includes inside the code
|
||||
FILE( COPY ${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src/ DESTINATION ${CMAKE_BINARY_DIR}/QTweetLib )
|
||||
SET( QTWEETLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR} )
|
||||
SET( QTWEETLIB_LIBRARY tomahawk_qtweetlib )
|
||||
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} )
|
||||
SET( QTWEETLIB_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libQTweetLib: ${QTWEETLIB_INCLUDE_DIR}, ${QTWEETLIB_LIBRARY}")
|
||||
ELSE( INTERNAL_QTWEETLIB )
|
||||
macro_optional_find_package(QTweetLib)
|
||||
ENDIF( INTERNAL_QTWEETLIB )
|
||||
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin. \n\n Use -DINTERNAL_QTWEETLIB=ON to build the git submodule inside Tomahawk \n")
|
||||
|
||||
|
||||
# we need pthreads too
|
||||
find_package(Threads)
|
||||
|
31
CMakeModules/FindQTweetLib.cmake
Normal file
31
CMakeModules/FindQTweetLib.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# - Try to find QTweetLib
|
||||
#
|
||||
# QTWEETLIB_FOUND - system has QTweetLib
|
||||
# QTWEETLIB_INCLUDE_DIRS - the QTweetLib include directories
|
||||
# QTWEETLIB_LIBRARIES - link these to use QTweetLib
|
||||
#
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
# Dependencies
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
# Include dir
|
||||
find_path(QTWEETLIB_INCLUDE_DIR
|
||||
NAMES QTweetLib/qtweetlib_global.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(QTWEETLIB_LIBRARY
|
||||
NAMES QTweetLib
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} ${QJSON_LIBRARIES} )
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTweetLib DEFAULT_MSG QTWEETLIB_LIBRARY QTWEETLIB_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(QTWEETLIB_LIBRARIES QTWEETLIB_INCLUDE_DIR)
|
||||
|
@ -225,10 +225,8 @@ TARGET_LINK_LIBRARIES( tomahawk
|
||||
${MAC_EXTRA_LIBS}
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QXTWEB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QJSON_LIBRARIES}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,6 @@ ADD_DEFINITIONS( -static-libgcc )
|
||||
|
||||
|
||||
SET( TOMAHAWK_LIBRARIES ${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll )
|
||||
SET( QTWEETLIB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll )
|
||||
SET( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libqxtweb-standalone.dll )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
|
@ -364,7 +364,6 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
|
||||
${THIRDPARTY_DIR}/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdnsshared
|
||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
)
|
||||
|
||||
@ -421,12 +420,12 @@ add_library( tomahawklib SHARED ${libSources} ${libMoc} )
|
||||
target_link_libraries( tomahawklib
|
||||
# Internal
|
||||
tomahawk_jdns
|
||||
tomahawk_qtweetlib
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
portfwd
|
||||
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${PHONON_LIBS}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
|
@ -88,13 +88,15 @@ DatabaseCommand_Resolve::exec( DatabaseImpl* lib )
|
||||
"file.source, "
|
||||
"file_join.albumpos, "
|
||||
"artist.id as artid, "
|
||||
"album.id as albid "
|
||||
"FROM file, file_join, artist, track "
|
||||
"album.id as albid, "
|
||||
"track_attributes.v as year "
|
||||
"FROM file, file_join, artist, track, track_attributes "
|
||||
"LEFT JOIN album ON album.id = file_join.album "
|
||||
"WHERE "
|
||||
"artist.id = file_join.artist AND "
|
||||
"track.id = file_join.track AND "
|
||||
"file.id = file_join.file AND "
|
||||
"file.id = track_attributes.id AND "
|
||||
"file_join.artist IN (%1) AND "
|
||||
"file_join.track IN (%2)" )
|
||||
.arg( artsl.join( "," ) )
|
||||
@ -140,6 +142,7 @@ DatabaseCommand_Resolve::exec( DatabaseImpl* lib )
|
||||
result->setRID( uuid() );
|
||||
result->setAlbumPos( files_query.value( 14 ).toUInt() );
|
||||
result->setId( files_query.value( 9 ).toUInt() );
|
||||
result->setYear( files_query.value( 17 ).toUInt() );
|
||||
|
||||
float score = how_similar( m_query, result );
|
||||
result->setScore( score );
|
||||
|
@ -580,14 +580,16 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
|
||||
"file.source, "
|
||||
"file_join.albumpos, "
|
||||
"artist.id as artid, "
|
||||
"album.id as albid "
|
||||
"FROM file, file_join, artist, track "
|
||||
"album.id as albid, "
|
||||
"track_attributes.v as year "
|
||||
"FROM file, file_join, artist, track, track_attributes "
|
||||
"LEFT JOIN album ON album.id = file_join.album "
|
||||
"WHERE "
|
||||
"artist.id = file_join.artist AND "
|
||||
"track.id = file_join.track AND "
|
||||
"file.source %1 AND "
|
||||
"file_join.file = file.id AND "
|
||||
"file.id = track_attributes.id AND "
|
||||
"file.url = ?"
|
||||
).arg( searchlocal ? "IS NULL" : QString( "= %1" ).arg( s->id() ) );
|
||||
|
||||
@ -632,6 +634,7 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
|
||||
res->setRID( uuid() );
|
||||
res->setId( query.value( 9 ).toUInt() );
|
||||
res->setCollection( s->collection() );
|
||||
res->setYear( query.value( 17 ).toUInt() );
|
||||
}
|
||||
|
||||
return res;
|
||||
|
@ -87,6 +87,7 @@ public:
|
||||
void setSize( unsigned int size ) { m_size = size; }
|
||||
void setAlbumPos( unsigned int albumpos ) { m_albumpos = albumpos; }
|
||||
void setModificationTime( unsigned int modtime ) { m_modtime = modtime; }
|
||||
void setYear( unsigned int year ) { m_year = year; }
|
||||
|
||||
QVariantMap attributes() const { return m_attributes; }
|
||||
void setAttributes( const QVariantMap& map ) { m_attributes = map; updateAttributes(); }
|
||||
|
@ -2,5 +2,8 @@ IF( LIBJREEN_FOUND )
|
||||
ADD_SUBDIRECTORY( jabber )
|
||||
ENDIF( LIBJREEN_FOUND )
|
||||
|
||||
ADD_SUBDIRECTORY( twitter )
|
||||
IF( QTWEETLIB_FOUND )
|
||||
ADD_SUBDIRECTORY( twitter )
|
||||
ENDIF( QTWEETLIB_FOUND )
|
||||
|
||||
ADD_SUBDIRECTORY( zeroconf )
|
||||
|
@ -9,11 +9,13 @@ add_definitions( -DSIPDLLEXPORT_PRO )
|
||||
set( twitterSources
|
||||
twitter.cpp
|
||||
twitterconfigwidget.cpp
|
||||
tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set( twitterHeaders
|
||||
twitter.h
|
||||
twitterconfigwidget.h
|
||||
tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
set( twitterUI
|
||||
@ -22,8 +24,7 @@ set( twitterUI
|
||||
|
||||
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
||||
${QT_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/tomahawk-custom
|
||||
${QTWEETLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
qt4_add_resources( RC_SRCS "resources.qrc" )
|
||||
@ -36,15 +37,14 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
"winmm.dll"
|
||||
"iphlpapi.a"
|
||||
"${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll"
|
||||
"${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll"
|
||||
)
|
||||
ENDIF( WIN32 )
|
||||
|
||||
target_link_libraries( tomahawk_siptwitter
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
tomahawklib
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
IF( APPLE )
|
||||
|
@ -1,22 +1,23 @@
|
||||
#ifndef TOMAHAWKOAUTHTWITTER
|
||||
#define TOMAHAWKOAUTHTWITTER
|
||||
|
||||
#include <oauthtwitter.h>
|
||||
#include "../sipdllmacro.h"
|
||||
|
||||
#include "qtweetlib_global.h"
|
||||
#include <QTweetLib/qtweetlib_global.h>
|
||||
#include <QTweetLib/oauthtwitter.h>
|
||||
|
||||
class QTWEETLIBSHARED_EXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||
class SIPDLLEXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
||||
|
||||
~TomahawkOAuthTwitter() {}
|
||||
|
||||
|
||||
protected:
|
||||
virtual int authorizationWidget();
|
||||
|
||||
|
||||
private slots:
|
||||
void error();
|
||||
};
|
@ -27,10 +27,10 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QStringList>
|
||||
|
||||
#include <qtweetaccountverifycredentials.h>
|
||||
#include <qtweetuser.h>
|
||||
#include <qtweetstatus.h>
|
||||
#include <qtweetusershow.h>
|
||||
#include <QTweetLib/qtweetaccountverifycredentials.h>
|
||||
#include <QTweetLib/qtweetuser.h>
|
||||
#include <QTweetLib/qtweetstatus.h>
|
||||
#include <QTweetLib/qtweetusershow.h>
|
||||
|
||||
#include <utils/tomahawkutils.h>
|
||||
#include <tomahawksettings.h>
|
||||
|
@ -25,14 +25,14 @@
|
||||
#include <QWeakPointer>
|
||||
#include <QSet>
|
||||
|
||||
#include <qtweetuser.h>
|
||||
#include <qtweetnetbase.h>
|
||||
#include <qtweetfriendstimeline.h>
|
||||
#include <qtweetdirectmessages.h>
|
||||
#include <qtweetdirectmessagenew.h>
|
||||
#include <qtweetdirectmessagedestroy.h>
|
||||
#include <qtweetmentions.h>
|
||||
#include <qtweetdmstatus.h>
|
||||
#include <QTweetLib/qtweetuser.h>
|
||||
#include <QTweetLib/qtweetnetbase.h>
|
||||
#include <QTweetLib/qtweetfriendstimeline.h>
|
||||
#include <QTweetLib/qtweetdirectmessages.h>
|
||||
#include <QTweetLib/qtweetdirectmessagenew.h>
|
||||
#include <QTweetLib/qtweetdirectmessagedestroy.h>
|
||||
#include <QTweetLib/qtweetmentions.h>
|
||||
#include <QTweetLib/qtweetdmstatus.h>
|
||||
|
||||
#include "../sipdllmacro.h"
|
||||
#include "sip/SipPlugin.h"
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "database/database.h"
|
||||
|
||||
#include "tomahawkoauthtwitter.h"
|
||||
#include <qtweetaccountverifycredentials.h>
|
||||
#include <qtweetstatusupdate.h>
|
||||
#include <qtweetdirectmessagenew.h>
|
||||
#include <QTweetLib/qtweetaccountverifycredentials.h>
|
||||
#include <QTweetLib/qtweetstatusupdate.h>
|
||||
#include <QTweetLib/qtweetdirectmessagenew.h>
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
|
||||
#include "sip/SipPlugin.h"
|
||||
|
||||
#include <qtweetstatus.h>
|
||||
#include <qtweetdmstatus.h>
|
||||
#include <qtweetuser.h>
|
||||
#include <qtweetnetbase.h>
|
||||
#include <QTweetLib/qtweetstatus.h>
|
||||
#include <QTweetLib/qtweetdmstatus.h>
|
||||
#include <QTweetLib/qtweetuser.h>
|
||||
#include <QTweetLib/qtweetnetbase.h>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user