1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-22 16:59:58 +01:00

Merge branch 'master' into leos-crash

This commit is contained in:
Jeff Mitchell 2011-05-03 14:18:12 -04:00
commit e802201341
4 changed files with 32 additions and 5 deletions

View File

@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* 2011, Dominik Schmidt <dev@dominik-schmidt.de>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,3 +32,9 @@ SipPlugin::configWidget()
{
return 0;
}
void
SipPlugin::setProxy( const QNetworkProxy& proxy )
{
qDebug() << Q_FUNC_INFO << "Not implemented";
}

View File

@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* 2011, Dominik Schmidt <dev@dominik-schmidt.de>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -22,6 +23,8 @@
#include <QObject>
#include <QString>
#include <QMenu>
#include <QNetworkProxy>
#include "dllmacro.h"
@ -49,6 +52,8 @@ public slots:
virtual void addContact( const QString &jid, const QString& msg = QString() ) = 0;
virtual void sendMsg( const QString& to, const QString& msg ) = 0;
void setProxy( const QNetworkProxy &proxy );
signals:
void error( int, const QString& );
void connected();

View File

@ -29,6 +29,8 @@
#include <jreen/capabilities.h>
#include <jreen/vcardupdate.h>
#include <jreen/vcard.h>
#include <jreen/directconnection.h>
#include <jreen/tcpconnection.h>
#include <qjson/parser.h>
#include <qjson/serializer.h>
@ -113,9 +115,22 @@ JabberPlugin::~JabberPlugin()
}
void
JabberPlugin::setProxy( QNetworkProxy* proxy )
JabberPlugin::setProxy( const QNetworkProxy &proxy )
{
qDebug() << Q_FUNC_INFO << "Not implemented";
if(m_currentServer.isEmpty() || !(m_currentPort > 0))
{
// patches are welcome in Jreen that implement jdns through proxy
qDebug() << Q_FUNC_INFO << "Jreen proxy only works when you explicitly set host and port";
Q_ASSERT(false);
return;
}
if(!m_client->connection())
{
m_client->setConnection(new Jreen::TcpConnection(m_currentServer, m_currentPort));
}
qobject_cast<Jreen::DirectConnection*>(m_client->connection())->setProxy(proxy);
}

View File

@ -62,7 +62,6 @@ public:
virtual const QString accountName();
virtual QMenu* menu();
void setProxy( QNetworkProxy* proxy );
signals:
void jidChanged( const QString& );
@ -73,6 +72,7 @@ public slots:
void sendMsg( const QString& to, const QString& msg );
void broadcastMsg( const QString &msg );
void addContact( const QString &jid, const QString& msg = QString() );
void setProxy( const QNetworkProxy &proxy );
private slots:
void showAddFriendDialog();