diff options
Diffstat (limited to 'src/plugins/Transports/http')
| -rw-r--r-- | src/plugins/Transports/http/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | src/plugins/Transports/http/httpinputfactory.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/Transports/http/httpinputfactory.h | 1 | ||||
| -rw-r--r-- | src/plugins/Transports/http/httpstreamreader.cpp | 2 |
4 files changed, 6 insertions, 19 deletions
diff --git a/src/plugins/Transports/http/CMakeLists.txt b/src/plugins/Transports/http/CMakeLists.txt index efd40d1e4..5ca267c5e 100644 --- a/src/plugins/Transports/http/CMakeLists.txt +++ b/src/plugins/Transports/http/CMakeLists.txt @@ -1,20 +1,7 @@ project(libhttp) -# qt plugin -ADD_DEFINITIONS( -Wall ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) -ADD_DEFINITIONS(-DQT_PLUGIN) -ADD_DEFINITIONS(-DQT_NO_DEBUG) -ADD_DEFINITIONS(-DQT_SHARED) -ADD_DEFINITIONS(-DQT_THREAD) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) -SET(QT_INCLUDES - ${QT_INCLUDES} - ${CMAKE_CURRENT_BINARY_DIR}/../../../ -) - # libqmmp include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) @@ -41,13 +28,13 @@ SET(libhttp_SRCS # resources SET(libhttp_RCCS translations/translations.qrc) -QT4_ADD_RESOURCES(libhttp_RCC_SRCS ${libhttp_RCCS}) +QT5_ADD_RESOURCES(libhttp_RCC_SRCS ${libhttp_RCCS}) # user interface SET(libhttp_UIS settingsdialog.ui ) -QT4_WRAP_UI(libhttp_UIS_H ${libhttp_UIS}) +QT5_WRAP_UI(libhttp_UIS_H ${libhttp_UIS}) # Don't forget to include output directory, otherwise @@ -58,9 +45,9 @@ IF(CURL_FOUND) ADD_LIBRARY(http MODULE ${libhttp_SRCS} ${libhttp_UIS_H} ${libhttp_RCC_SRCS}) IF(USE_ENCA AND ENCA_FOUND) -target_link_libraries(http ${QT_LIBRARIES} libqmmp ${CURL_LDFLAGS} ${CURL_CFLAGS} ${ENCA_LDFLAGS} ${ENCA_CFLAGS}) +target_link_libraries(http Qt5::Widgets -lqmmp ${CURL_LDFLAGS} ${CURL_CFLAGS} ${ENCA_LDFLAGS} ${ENCA_CFLAGS}) ELSE(USE_ENCA AND ENCA_FOUND) -target_link_libraries(http ${QT_LIBRARIES} libqmmp ${CURL_LDFLAGS}) +target_link_libraries(http Qt5::Widgets -lqmmp ${CURL_LDFLAGS}) ENDIF(USE_ENCA AND ENCA_FOUND) add_dependencies(http qmmp) diff --git a/src/plugins/Transports/http/httpinputfactory.cpp b/src/plugins/Transports/http/httpinputfactory.cpp index f9a3fc1d4..daedaf9f7 100644 --- a/src/plugins/Transports/http/httpinputfactory.cpp +++ b/src/plugins/Transports/http/httpinputfactory.cpp @@ -64,4 +64,3 @@ QTranslator *HTTPInputFactory::createTranslator(QObject *parent) translator->load(QString(":/http_plugin_") + locale); return translator; } -Q_EXPORT_PLUGIN2(http, HTTPInputFactory) diff --git a/src/plugins/Transports/http/httpinputfactory.h b/src/plugins/Transports/http/httpinputfactory.h index a2c8b910f..9aea98f09 100644 --- a/src/plugins/Transports/http/httpinputfactory.h +++ b/src/plugins/Transports/http/httpinputfactory.h @@ -33,6 +33,7 @@ class QTranslator; class HTTPInputFactory : public QObject, InputSourceFactory { Q_OBJECT +Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.InputSourceFactoryInterface.1.0") Q_INTERFACES(InputSourceFactory) public: const InputSourceProperties properties() const; diff --git a/src/plugins/Transports/http/httpstreamreader.cpp b/src/plugins/Transports/http/httpstreamreader.cpp index 861c17735..be051a89b 100644 --- a/src/plugins/Transports/http/httpstreamreader.cpp +++ b/src/plugins/Transports/http/httpstreamreader.cpp @@ -75,7 +75,7 @@ static size_t curl_header(void *data, size_t size, size_t nmemb, } else { - QString key = QString::fromLatin1(header.left(header.indexOf(":")).trimmed().toLower().constData()); + QString key = QString::fromLatin1(header.left(header.indexOf(":")).trimmed().toLower()); QByteArray value = header.right(header.size() - header.indexOf(":") - 1).trimmed(); dl->stream()->header.insert(key, value); qDebug("HttpStreamReader: key=%s, value=%s",qPrintable(key), value.constData()); |
