mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 07:22:32 +02:00
Use the new Jreen::Logger and bump version requirement to 1.0.3
This commit is contained in:
parent
dab85e2008
commit
496871af04
@ -116,7 +116,7 @@ macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fe
|
||||
macro_optional_find_package(QuaZip)
|
||||
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" TRUE "" "")
|
||||
|
||||
macro_optional_find_package(Jreen)
|
||||
macro_optional_find_package(Jreen 1.0.3)
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n")
|
||||
|
||||
macro_optional_find_package(QTweetLib)
|
||||
|
2
README
2
README
@ -40,7 +40,7 @@ Dependencies
|
||||
|
||||
Attica 0.3.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
Jreen 1.0.2 - https://github.com/euroelessar/jreen
|
||||
Jreen 1.0.3 - https://github.com/euroelessar/jreen
|
||||
QTweetLib 0.5.0 - https://github.com/minimoog/QTweetLib
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <jreen/tcpconnection.h>
|
||||
#include <jreen/softwareversion.h>
|
||||
#include <jreen/iqreply.h>
|
||||
#include <jreen/logger.h>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/serializer.h>
|
||||
@ -58,6 +59,29 @@
|
||||
using namespace Tomahawk;
|
||||
using namespace Accounts;
|
||||
|
||||
// instead of simply copying this function for another thirdparty lib
|
||||
// please make it a meta-function or a macro and put it in logger.h. kthxbbq
|
||||
#define JREEN_LOG_INFIX "Jreen"
|
||||
void
|
||||
JreenMessageHandler(QtMsgType type, const char *msg)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case QtDebugMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Debug: " << msg;
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Warning: " << msg;
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Critical: " << msg;
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Fatal: " << msg;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
: SipPlugin( account )
|
||||
, m_state( Account::Disconnected )
|
||||
@ -66,7 +90,7 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
, m_xmlConsole( 0 )
|
||||
#endif
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
Jreen::Logger::addHandler( JreenMessageHandler );
|
||||
|
||||
m_currentUsername = readUsername();
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOGGER_H
|
||||
#define LOGGER_H
|
||||
#ifndef TOMAHAWK_LOGGER_H
|
||||
#define TOMAHAWK_LOGGER_H
|
||||
|
||||
#include <QDebug>
|
||||
#include <QStringList>
|
||||
@ -58,4 +58,4 @@ namespace Logger
|
||||
#define LOGVERBOSE 8
|
||||
#define LOGTHIRDPARTY 9
|
||||
|
||||
#endif
|
||||
#endif // TOMAHAWK_LOGGER_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user