aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/PlayListFormats/xspf
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2017-11-25 18:00:06 +0000
commit8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a (patch)
tree15d339b62e98d5858a57aa787334e14f0e2f0ad7 /src/plugins/PlayListFormats/xspf
parent6fc05db7c6de9a51beba754f12ff4ac32859977d (diff)
downloadqmmp-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/xspf')
-rw-r--r--src/plugins/PlayListFormats/xspf/CMakeLists.txt17
-rw-r--r--src/plugins/PlayListFormats/xspf/xspfplaylistformat.cpp4
-rw-r--r--src/plugins/PlayListFormats/xspf/xspfplaylistformat.h1
3 files changed, 4 insertions, 18 deletions
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;