aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/PlayListFormats/xspf
diff options
context:
space:
mode:
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;