diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-02-17 11:17:47 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-02-17 11:17:47 +0000 |
| commit | 0ffa05b536ad907e63d34a1ab7244ce159354269 (patch) | |
| tree | a257abfd1c102fe7391c34f0ec9be6eafcc9ab24 /src/plugins | |
| parent | 561b2b60ad553238fe4c13082d2e976d2ad392d0 (diff) | |
| download | qmmp-0ffa05b536ad907e63d34a1ab7244ce159354269.tar.gz qmmp-0ffa05b536ad907e63d34a1ab7244ce159354269.tar.bz2 qmmp-0ffa05b536ad907e63d34a1ab7244ce159354269.zip | |
fixed proxy support, fixed xspf version
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@790 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/General/lyrics/lyricswindow.cpp | 8 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.cpp | 20 | ||||
| -rw-r--r-- | src/plugins/PlaylistFormats/xspf/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/plugins/PlaylistFormats/xspf/xspf.pro | 2 | ||||
| -rw-r--r-- | src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp | 6 |
5 files changed, 19 insertions, 20 deletions
diff --git a/src/plugins/General/lyrics/lyricswindow.cpp b/src/plugins/General/lyrics/lyricswindow.cpp index 744ad07f0..dc781bcc4 100644 --- a/src/plugins/General/lyrics/lyricswindow.cpp +++ b/src/plugins/General/lyrics/lyricswindow.cpp @@ -20,6 +20,7 @@ #include <QHttp> #include <QUrl> +#include <qmmp/qmmp.h> #include "lyricswindow.h" @@ -30,8 +31,13 @@ LyricsWindow::LyricsWindow(const QString &artist, const QString &title, QWidget setWindowFlags(Qt::Dialog); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(QString(tr("Lyrics: %1 - %2")).arg(artist).arg(title)); - //TODO proxy support m_http = new QHttp(this); + //load global proxy settings + if (Qmmp::useProxy()) + m_http->setProxy(Qmmp::proxy().host(), + Qmmp::proxy().port(), + Qmmp::useProxyAuth() ? Qmmp::proxy().userName() : QString(), + Qmmp::useProxyAuth() ? Qmmp::proxy().password() : QString()); connect(m_http, SIGNAL(done(bool)), SLOT(showText(bool))); connect(m_http, SIGNAL(stateChanged(int)), SLOT(showState (int))); m_http->setHost("lyricwiki.org"); diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp index af0ecd40b..8cf79d4c6 100644 --- a/src/plugins/General/scrobbler/scrobbler.cpp +++ b/src/plugins/General/scrobbler/scrobbler.cpp @@ -27,6 +27,7 @@ #include <QSettings> #include <QDir> #include <qmmp/soundcore.h> +#include <qmmp/qmmp.h> #include "scrobbler.h" @@ -47,19 +48,12 @@ Scrobbler::Scrobbler(QObject *parent) m_login = settings.value("login").toString(); m_passw = settings.value("password").toString(); settings.endGroup(); - //use global proxy settings - if (settings.value ("Proxy/use_proxy", FALSE).toBool()) - { - - if (settings.value ("Proxy/authentication", FALSE).toBool()) - m_http->setProxy(settings.value("Proxy/host").toString(), - settings.value("Proxy/port").toInt(), - settings.value("Proxy/user").toString(), - settings.value("Proxy/passw").toString()); - else - m_http->setProxy(settings.value("Proxy/host").toString(), - settings.value("Proxy/port").toInt()); - } + //load global proxy settings + if (Qmmp::useProxy()) + m_http->setProxy(Qmmp::proxy().host(), + Qmmp::proxy().port(), + Qmmp::useProxyAuth() ? Qmmp::proxy().userName() : QString(), + Qmmp::useProxyAuth() ? Qmmp::proxy().password() : QString()); m_disabled = m_login.isEmpty() || m_passw.isEmpty(); m_passw = QString(QCryptographicHash::hash(m_passw.toAscii(), QCryptographicHash::Md5).toHex()); diff --git a/src/plugins/PlaylistFormats/xspf/CMakeLists.txt b/src/plugins/PlaylistFormats/xspf/CMakeLists.txt index f71e09782..a084ba897 100644 --- a/src/plugins/PlaylistFormats/xspf/CMakeLists.txt +++ b/src/plugins/PlaylistFormats/xspf/CMakeLists.txt @@ -29,6 +29,7 @@ SET(QT_INCLUDES # libqmmpui include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) SET(libxspfplaylistformat_SRCS xspfplaylistformat.cpp @@ -49,5 +50,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY(xspfplaylistformat SHARED ${libxspfplaylistformat_SRCS} ${libxspfplaylistformat_MOC_SRCS}) add_dependencies(xspfplaylistformat qmmpui) -target_link_libraries(xspfplaylistformat ${QT_LIBRARIES} -lqmmpui) +target_link_libraries(xspfplaylistformat ${QT_LIBRARIES} -lqmmpui -lqmmp) install(TARGETS xspfplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlaylistFormats) diff --git a/src/plugins/PlaylistFormats/xspf/xspf.pro b/src/plugins/PlaylistFormats/xspf/xspf.pro index 1e5716f58..784f15c79 100644 --- a/src/plugins/PlaylistFormats/xspf/xspf.pro +++ b/src/plugins/PlaylistFormats/xspf/xspf.pro @@ -19,7 +19,7 @@ INSTALLS += target INCLUDEPATH += ../../../../src -LIBS += -lqmmpui +LIBS += -lqmmpui -lqmmp QT += xml SOURCES += xspfplaylistformat.cpp diff --git a/src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp b/src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp index 997867caa..602864043 100644 --- a/src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp +++ b/src/plugins/PlaylistFormats/xspf/xspfplaylistformat.cpp @@ -24,9 +24,7 @@ #include <QUrl> #include <QtPlugin> -#ifndef QMMP_STR_VERSION -#define QMMP_STR_VERSION "0.2.0" -#endif +#include <qmmp/qmmp.h> #include "xspfplaylistformat.h" @@ -78,7 +76,7 @@ QString XSPFPlaylistFormat::encode(const QList<AbstractPlaylistItem*> & files) root.setAttribute("xmlns",QString("http://xspf.org/ns/0/")); QDomElement creator = doc.createElement("creator"); - QDomText text = doc.createTextNode("qmmp-" + QString(QMMP_STR_VERSION)); + QDomText text = doc.createTextNode("qmmp-" + Qmmp::strVersion()); creator.appendChild(text); root.appendChild(creator); |
