diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-11-25 18:00:06 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-11-25 18:00:06 +0000 |
| commit | 8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a (patch) | |
| tree | 15d339b62e98d5858a57aa787334e14f0e2f0ad7 /src/plugins/Transports | |
| parent | 6fc05db7c6de9a51beba754f12ff4ac32859977d (diff) | |
| download | qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.gz qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.bz2 qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.zip | |
copy 1.2 branch to trunk
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7772 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Transports')
| -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 | ||||
| -rw-r--r-- | src/plugins/Transports/mms/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | src/plugins/Transports/mms/mmsinputfactory.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/Transports/mms/mmsinputfactory.h | 1 |
7 files changed, 10 insertions, 36 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()); diff --git a/src/plugins/Transports/mms/CMakeLists.txt b/src/plugins/Transports/mms/CMakeLists.txt index 106c2f796..2bcf19141 100644 --- a/src/plugins/Transports/mms/CMakeLists.txt +++ b/src/plugins/Transports/mms/CMakeLists.txt @@ -1,20 +1,7 @@ project(libmms) -# 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) @@ -35,13 +22,13 @@ SET(libmms_SRCS # resources SET(libmms_RCCS translations/translations.qrc) -QT4_ADD_RESOURCES(libmms_RCC_SRCS ${libmms_RCCS}) +QT5_ADD_RESOURCES(libmms_RCC_SRCS ${libmms_RCCS}) # user interface SET(libmms_UIS settingsdialog.ui ) -QT4_WRAP_UI(libmms_UIS_H ${libmms_UIS}) +QT5_WRAP_UI(libmms_UIS_H ${libmms_UIS}) # Don't forget to include output directory, otherwise @@ -49,7 +36,7 @@ QT4_WRAP_UI(libmms_UIS_H ${libmms_UIS}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) IF(MMS_FOUND) ADD_LIBRARY(mms MODULE ${libmms_SRCS} ${libmms_UIS_H} ${libmms_RCC_SRCS}) -target_link_libraries(mms ${QT_LIBRARIES} libqmmp ${MMS_LDFLAGS}) +target_link_libraries(mms Qt5::Widgets -lqmmp ${MMS_LDFLAGS}) add_dependencies(mms qmmp) install(TARGETS mms DESTINATION ${LIB_DIR}/qmmp/Transports) ENDIF(MMS_FOUND) diff --git a/src/plugins/Transports/mms/mmsinputfactory.cpp b/src/plugins/Transports/mms/mmsinputfactory.cpp index d51eee4d6..2dc0c84bf 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.cpp +++ b/src/plugins/Transports/mms/mmsinputfactory.cpp @@ -62,4 +62,3 @@ QTranslator *MMSInputFactory::createTranslator(QObject *parent) translator->load(QString(":/mms_plugin_") + locale); return translator; } -Q_EXPORT_PLUGIN2(mms, MMSInputFactory) diff --git a/src/plugins/Transports/mms/mmsinputfactory.h b/src/plugins/Transports/mms/mmsinputfactory.h index 25a1fe070..3b6e8576c 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.h +++ b/src/plugins/Transports/mms/mmsinputfactory.h @@ -33,6 +33,7 @@ class QTranslator; class MMSInputFactory : public QObject, InputSourceFactory { Q_OBJECT +Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.InputSourceFactoryInterface.1.0") Q_INTERFACES(InputSourceFactory) public: const InputSourceProperties properties() const; |
