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/PlayListFormats | |
| 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/PlayListFormats')
9 files changed, 12 insertions, 54 deletions
diff --git a/src/plugins/PlayListFormats/m3u/CMakeLists.txt b/src/plugins/PlayListFormats/m3u/CMakeLists.txt index a96c2df62..d3e7b577d 100644 --- a/src/plugins/PlayListFormats/m3u/CMakeLists.txt +++ b/src/plugins/PlayListFormats/m3u/CMakeLists.txt @@ -1,20 +1,7 @@ project(libm3uplaylistformat) -# 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_SOURCE_DIR}/../../../ -) - # libqmmpui include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) @@ -23,7 +10,7 @@ SET(libm3uplaylistformat_SRCS m3uplaylistformat.cpp ) -QT4_ADD_RESOURCES(libm3uplaylistformat_RCC_SRCS ${libm3uplaylistformat_RCCS}) +QT5_ADD_RESOURCES(libm3uplaylistformat_RCC_SRCS ${libm3uplaylistformat_RCCS}) # Don't forget to include output directory, otherwise # the UI file won't be wrapped! @@ -31,5 +18,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY(m3uplaylistformat MODULE ${libm3uplaylistformat_SRCS}) add_dependencies(m3uplaylistformat qmmpui) -target_link_libraries(m3uplaylistformat ${QT_LIBRARIES} qmmpui) +target_link_libraries(m3uplaylistformat Qt5::Widgets -lqmmpui) install(TARGETS m3uplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats) diff --git a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp index dd2ee0cd5..feb31fa19 100644 --- a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp +++ b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.cpp @@ -35,7 +35,7 @@ const PlayListFormatProperties M3UPlaylistFormat::properties() const QList<PlayListTrack *> M3UPlaylistFormat::decode(const QByteArray &contents) { QList<PlayListTrack*> out; - QStringList splitted = QString::fromUtf8(contents.constData()).split("\n"); + QStringList splitted = QString::fromUtf8(contents).split("\n"); if(splitted.isEmpty()) return out; @@ -100,5 +100,3 @@ QByteArray M3UPlaylistFormat::encode(const QList<PlayListTrack*> &contents, cons } return out.join("\n").toUtf8(); } - -Q_EXPORT_PLUGIN2(m3uplaylistformat,M3UPlaylistFormat) diff --git a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.h b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.h index d1188d553..c22bab1c8 100644 --- a/src/plugins/PlayListFormats/m3u/m3uplaylistformat.h +++ b/src/plugins/PlayListFormats/m3u/m3uplaylistformat.h @@ -33,6 +33,7 @@ class M3UPlaylistFormat : public QObject, public PlayListFormat { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.PlayListFormatInterface.1.0") Q_INTERFACES(PlayListFormat) public: const PlayListFormatProperties properties() const; diff --git a/src/plugins/PlayListFormats/pls/CMakeLists.txt b/src/plugins/PlayListFormats/pls/CMakeLists.txt index 4666e2951..9a19d064c 100644 --- a/src/plugins/PlayListFormats/pls/CMakeLists.txt +++ b/src/plugins/PlayListFormats/pls/CMakeLists.txt @@ -1,20 +1,7 @@ project(libplsplaylistformat) -# 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_SOURCE_DIR}/../../../ -) - # libqmmpui include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) @@ -23,7 +10,7 @@ SET(libplsplaylistformat_SRCS plsplaylistformat.cpp ) -QT4_ADD_RESOURCES(libplsplaylistformat_RCC_SRCS ${libplsplaylistformat_RCCS}) +QT5_ADD_RESOURCES(libplsplaylistformat_RCC_SRCS ${libplsplaylistformat_RCCS}) # Don't forget to include output directory, otherwise # the UI file won't be wrapped! @@ -31,5 +18,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY(plsplaylistformat MODULE ${libplsplaylistformat_SRCS}) add_dependencies(plsplaylistformat qmmpui) -target_link_libraries(plsplaylistformat ${QT_LIBRARIES} qmmpui) +target_link_libraries(plsplaylistformat Qt5::Widgets -lqmmpui) install(TARGETS plsplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats) diff --git a/src/plugins/PlayListFormats/pls/plsplaylistformat.cpp b/src/plugins/PlayListFormats/pls/plsplaylistformat.cpp index 9ee2fdd70..1e96077dc 100644 --- a/src/plugins/PlayListFormats/pls/plsplaylistformat.cpp +++ b/src/plugins/PlayListFormats/pls/plsplaylistformat.cpp @@ -35,7 +35,7 @@ const PlayListFormatProperties PLSPlaylistFormat::properties() const QList<PlayListTrack *> PLSPlaylistFormat::decode(const QByteArray &contents) { QList<PlayListTrack *> out; - QStringList splitted = QString::fromUtf8(contents.constData()).split("\n"); + QStringList splitted = QString::fromUtf8(contents).split("\n"); if(splitted.isEmpty()) { @@ -138,5 +138,3 @@ QByteArray PLSPlaylistFormat::encode(const QList<PlayListTrack *> &contents, con out << "Version=2"; return out.join("\n").toUtf8(); } - -Q_EXPORT_PLUGIN2(plsplaylistformat, PLSPlaylistFormat) diff --git a/src/plugins/PlayListFormats/pls/plsplaylistformat.h b/src/plugins/PlayListFormats/pls/plsplaylistformat.h index ba5d355d5..96dcf225b 100644 --- a/src/plugins/PlayListFormats/pls/plsplaylistformat.h +++ b/src/plugins/PlayListFormats/pls/plsplaylistformat.h @@ -33,6 +33,7 @@ class PLSPlaylistFormat : public QObject, public PlayListFormat { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.PlayListFormatInterface.1.0") Q_INTERFACES(PlayListFormat) public: const PlayListFormatProperties properties() const; diff --git a/src/plugins/PlayListFormats/xspf/CMakeLists.txt b/src/plugins/PlayListFormats/xspf/CMakeLists.txt index 128fb39d1..a18935cab 100644 --- a/src/plugins/PlayListFormats/xspf/CMakeLists.txt +++ b/src/plugins/PlayListFormats/xspf/CMakeLists.txt @@ -1,20 +1,7 @@ project(libxspfplaylistformat) -# 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_SOURCE_DIR}/../../../ -) - # libqmmpui include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) @@ -24,7 +11,7 @@ SET(libxspfplaylistformat_SRCS xspfplaylistformat.cpp ) -QT4_ADD_RESOURCES(libxspfplaylistformat_RCC_SRCS ${libxspfplaylistformat_RCCS}) +QT5_ADD_RESOURCES(libxspfplaylistformat_RCC_SRCS ${libxspfplaylistformat_RCCS}) # Don't forget to include output directory, otherwise # the UI file won't be wrapped! @@ -32,5 +19,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY(xspfplaylistformat MODULE ${libxspfplaylistformat_SRCS}) add_dependencies(xspfplaylistformat qmmpui) -target_link_libraries(xspfplaylistformat ${QT_LIBRARIES} qmmpui libqmmp) +target_link_libraries(xspfplaylistformat Qt5::Widgets -lqmmpui -lqmmp) install(TARGETS xspfplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats) diff --git a/src/plugins/PlayListFormats/xspf/xspfplaylistformat.cpp b/src/plugins/PlayListFormats/xspf/xspfplaylistformat.cpp index 562b8d154..f20c83903 100644 --- a/src/plugins/PlayListFormats/xspf/xspfplaylistformat.cpp +++ b/src/plugins/PlayListFormats/xspf/xspfplaylistformat.cpp @@ -41,7 +41,7 @@ QList<PlayListTrack*> XSPFPlaylistFormat::decode(const QByteArray &contents) { QList<PlayListTrack*> out; QString currentTag; - QString contents_copy = QString::fromUtf8(contents.constData()); + QString contents_copy = QString::fromUtf8(contents); //remove control symbols to avoid xml errors for(int i = 0; i < contents_copy.size(); ++i) @@ -168,5 +168,3 @@ QByteArray XSPFPlaylistFormat::encode(const QList<PlayListTrack*> &files, const xml.writeEndDocument(); return out; } - -Q_EXPORT_PLUGIN2(xspfplaylistformat,XSPFPlaylistFormat) diff --git a/src/plugins/PlayListFormats/xspf/xspfplaylistformat.h b/src/plugins/PlayListFormats/xspf/xspfplaylistformat.h index 3b729883a..fca9fff6a 100644 --- a/src/plugins/PlayListFormats/xspf/xspfplaylistformat.h +++ b/src/plugins/PlayListFormats/xspf/xspfplaylistformat.h @@ -33,6 +33,7 @@ class XSPFPlaylistFormat : public QObject, public PlayListFormat { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.PlayListFormatInterface.1.0") Q_INTERFACES(PlayListFormat) public: const PlayListFormatProperties properties() const; |
