aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-01-09 12:01:22 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-01-09 12:01:22 +0000
commitebd7f9bc697973366de8a6bf7265051e825e0680 (patch)
tree1feb9df1c5fe3493e9aa1dd8f5d6233a38ae9d3c /src
parentbc7ad688c646afd2a89e5c5ff58696f2df2c8605 (diff)
downloadqmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.tar.gz
qmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.tar.bz2
qmmp-ebd7f9bc697973366de8a6bf7265051e825e0680.zip
renaming experimental branch
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4675 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/app/CMakeLists.txt13
-rw-r--r--src/app/app.pro20
-rw-r--r--src/plugins/CommandLineOptions/IncDecVolumeOption/CMakeLists.txt8
-rw-r--r--src/plugins/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro16
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/CMakeLists.txt8
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/PlayListOption.pro16
-rw-r--r--src/plugins/CommandLineOptions/SeekOption/CMakeLists.txt8
-rw-r--r--src/plugins/CommandLineOptions/SeekOption/SeekOption.pro15
-rw-r--r--src/plugins/CommandLineOptions/StatusOption/CMakeLists.txt8
-rw-r--r--src/plugins/CommandLineOptions/StatusOption/StatusOption.pro15
-rw-r--r--src/plugins/Effect/bs2b/CMakeLists.txt9
-rw-r--r--src/plugins/Effect/bs2b/bs2b.pro17
-rw-r--r--src/plugins/Effect/crossfade/CMakeLists.txt9
-rw-r--r--src/plugins/Effect/crossfade/crossfade.pro16
-rw-r--r--src/plugins/Effect/ladspa/CMakeLists.txt12
-rw-r--r--src/plugins/Effect/ladspa/ladspa.pro16
-rw-r--r--src/plugins/Effect/srconverter/CMakeLists.txt10
-rw-r--r--src/plugins/Effect/srconverter/srconverter.h3
-rw-r--r--src/plugins/Effect/srconverter/srconverter.pro16
-rw-r--r--src/plugins/Effect/stereo/CMakeLists.txt9
-rw-r--r--src/plugins/Effect/stereo/stereo.pro15
-rw-r--r--src/plugins/Engines/mplayer/CMakeLists.txt11
-rw-r--r--src/plugins/Engines/mplayer/mplayer.pro16
-rw-r--r--src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt9
-rw-r--r--src/plugins/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro18
-rw-r--r--src/plugins/General/converter/CMakeLists.txt12
-rw-r--r--src/plugins/General/converter/converter.pro15
-rw-r--r--src/plugins/General/copypaste/CMakeLists.txt9
-rw-r--r--src/plugins/General/covermanager/CMakeLists.txt10
-rw-r--r--src/plugins/General/fileops/CMakeLists.txt11
-rw-r--r--src/plugins/General/fileops/fileops.pro17
-rw-r--r--src/plugins/General/gnomehotkey/CMakeLists.txt10
-rw-r--r--src/plugins/General/gnomehotkey/gnomehotkey.pro16
-rw-r--r--src/plugins/General/hal/CMakeLists.txt12
-rw-r--r--src/plugins/General/hal/hal.pro16
-rw-r--r--src/plugins/General/hotkey/CMakeLists.txt11
-rw-r--r--src/plugins/General/hotkey/hotkey.pro15
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_win.cpp3
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_x11.cpp5
-rw-r--r--src/plugins/General/kdenotify/CMakeLists.txt10
-rw-r--r--src/plugins/General/kdenotify/kdenotify.pro20
-rw-r--r--src/plugins/General/lyrics/CMakeLists.txt10
-rw-r--r--src/plugins/General/lyrics/lyrics.pro17
-rw-r--r--src/plugins/General/mpris/CMakeLists.txt14
-rw-r--r--src/plugins/General/mpris/mpris.pro15
-rw-r--r--src/plugins/General/mpris/mpris1/tracklistobject.cpp13
-rw-r--r--src/plugins/General/mpris/mpris1/tracklistobject.h4
-rw-r--r--src/plugins/General/mpris/mpris2/player2object.cpp4
-rw-r--r--src/plugins/General/mpris/mpris2/player2object.h2
-rw-r--r--src/plugins/General/notifier/CMakeLists.txt11
-rw-r--r--src/plugins/General/notifier/notifier.pro15
-rw-r--r--src/plugins/General/rgscan/CMakeLists.txt11
-rw-r--r--src/plugins/General/rgscan/rgscan.pro17
-rw-r--r--src/plugins/General/scrobbler/CMakeLists.txt11
-rw-r--r--src/plugins/General/scrobbler/scrobbler.pro15
-rw-r--r--src/plugins/General/statusicon/CMakeLists.txt13
-rw-r--r--src/plugins/General/statusicon/statusicon.pro21
-rw-r--r--src/plugins/General/streambrowser/CMakeLists.txt10
-rw-r--r--src/plugins/General/streambrowser/streambrowser.pro15
-rw-r--r--src/plugins/General/trackchange/CMakeLists.txt10
-rw-r--r--src/plugins/General/udisks/CMakeLists.txt12
-rw-r--r--src/plugins/General/udisks/udisks.pro16
-rw-r--r--src/plugins/General/udisks2/CMakeLists.txt12
-rw-r--r--src/plugins/General/udisks2/udisks2.pro16
-rw-r--r--src/plugins/Input/aac/CMakeLists.txt9
-rw-r--r--src/plugins/Input/aac/aac.pro17
-rw-r--r--src/plugins/Input/cdaudio/CMakeLists.txt9
-rw-r--r--src/plugins/Input/cdaudio/cdaudio.pro17
-rw-r--r--src/plugins/Input/cue/CMakeLists.txt10
-rw-r--r--src/plugins/Input/cue/cue.pro18
-rw-r--r--src/plugins/Input/ffmpeg/CMakeLists.txt10
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp1
-rw-r--r--src/plugins/Input/ffmpeg/ffmpeg.pro17
-rw-r--r--src/plugins/Input/ffmpeg_legacy/CMakeLists.txt10
-rw-r--r--src/plugins/Input/ffmpeg_legacy/ffmpeg_legacy.pro16
-rw-r--r--src/plugins/Input/flac/CMakeLists.txt9
-rw-r--r--src/plugins/Input/flac/flac.pro19
-rw-r--r--src/plugins/Input/gme/CMakeLists.txt8
-rw-r--r--src/plugins/Input/gme/gme.pro15
-rw-r--r--src/plugins/Input/mad/CMakeLists.txt10
-rw-r--r--src/plugins/Input/mad/mad.pro20
-rw-r--r--src/plugins/Input/modplug/CMakeLists.txt12
-rw-r--r--src/plugins/Input/modplug/modplug.pro17
-rw-r--r--src/plugins/Input/mpc/CMakeLists.txt9
-rw-r--r--src/plugins/Input/mpc/mpc.pro18
-rw-r--r--src/plugins/Input/opus/CMakeLists.txt9
-rw-r--r--src/plugins/Input/opus/opus.pro17
-rw-r--r--src/plugins/Input/sid/CMakeLists.txt9
-rw-r--r--src/plugins/Input/sndfile/CMakeLists.txt9
-rw-r--r--src/plugins/Input/sndfile/sndfile.pro19
-rw-r--r--src/plugins/Input/vorbis/CMakeLists.txt9
-rw-r--r--src/plugins/Input/vorbis/vorbis.pro19
-rw-r--r--src/plugins/Input/wavpack/CMakeLists.txt9
-rw-r--r--src/plugins/Input/wavpack/wavpack.pro19
-rw-r--r--src/plugins/Input/wildmidi/CMakeLists.txt11
-rw-r--r--src/plugins/Input/wildmidi/wildmidi.pro14
-rw-r--r--src/plugins/Output/alsa/CMakeLists.txt9
-rw-r--r--src/plugins/Output/alsa/alsa.pro15
-rw-r--r--src/plugins/Output/directsound/CMakeLists.txt8
-rw-r--r--src/plugins/Output/directsound/directsound.pro15
-rw-r--r--src/plugins/Output/jack/CMakeLists.txt8
-rw-r--r--src/plugins/Output/jack/jack.pro15
-rw-r--r--src/plugins/Output/null/CMakeLists.txt9
-rw-r--r--src/plugins/Output/null/null.pro16
-rw-r--r--src/plugins/Output/oss/CMakeLists.txt9
-rw-r--r--src/plugins/Output/oss/oss.pro18
-rw-r--r--src/plugins/Output/oss4/CMakeLists.txt9
-rw-r--r--src/plugins/Output/pulseaudio/CMakeLists.txt9
-rw-r--r--src/plugins/Output/pulseaudio/pulseaudio.pro16
-rw-r--r--src/plugins/Output/waveout/CMakeLists.txt8
-rw-r--r--src/plugins/Output/waveout/waveout.pro17
-rw-r--r--src/plugins/PlayListFormats/m3u/CMakeLists.txt9
-rw-r--r--src/plugins/PlayListFormats/pls/CMakeLists.txt9
-rw-r--r--src/plugins/PlayListFormats/xspf/CMakeLists.txt9
-rw-r--r--src/plugins/Transports/http/CMakeLists.txt12
-rw-r--r--src/plugins/Transports/http/http.pro20
-rw-r--r--src/plugins/Transports/mms/CMakeLists.txt12
-rw-r--r--src/plugins/Transports/mms/mms.pro20
-rw-r--r--src/plugins/Ui/skinned/CMakeLists.txt50
-rw-r--r--src/plugins/Ui/skinned/listwidget.cpp20
-rw-r--r--src/plugins/Ui/skinned/playlisttitlebar.cpp4
-rw-r--r--src/plugins/Ui/skinned/skin.cpp2
-rw-r--r--src/plugins/Ui/skinned/skinned.pro18
-rw-r--r--src/plugins/Visual/analyzer/CMakeLists.txt11
-rw-r--r--src/plugins/Visual/projectm/CMakeLists.txt12
-rw-r--r--src/qmmp/CMakeLists.txt21
-rw-r--r--src/qmmp/equ/iir_fpu.c3
-rw-r--r--src/qmmp/outputwriter.cpp38
-rw-r--r--src/qmmp/outputwriter_p.h2
-rw-r--r--src/qmmpui/CMakeLists.txt28
-rw-r--r--src/qmmpui/aboutdialog.cpp6
-rw-r--r--src/qmmpui/groupedcontainer.cpp98
-rw-r--r--src/qmmpui/groupedcontainer_p.h5
-rw-r--r--src/qmmpui/normalcontainer.cpp48
-rw-r--r--src/qmmpui/normalcontainer_p.h5
-rw-r--r--src/qmmpui/playlistcontainer.cpp205
-rw-r--r--src/qmmpui/playlistcontainer_p.h10
-rw-r--r--src/qmmpui/playlistgroup.cpp10
-rw-r--r--src/qmmpui/playlistmanager.cpp10
-rw-r--r--src/qmmpui/playlistmanager.h4
-rw-r--r--src/qmmpui/playlistmodel.cpp351
-rw-r--r--src/qmmpui/playlistmodel.h34
-rw-r--r--src/qmmpui/playlisttask.cpp371
-rw-r--r--src/qmmpui/playlisttask_p.h52
-rw-r--r--src/qmmpui/playlisttrack.cpp54
-rw-r--r--src/qmmpui/playlisttrack.h33
-rw-r--r--src/qmmpui/qmmpuisettings.cpp4
-rw-r--r--src/qmmpui/qmmpuisettings.h2
-rw-r--r--src/qmmpui/tagupdater.cpp6
149 files changed, 889 insertions, 2104 deletions
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 6e60603dc..f95d97041 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -1,6 +1,6 @@
project(app)
-cmake_minimum_required(VERSION 2.4.7)
+cmake_minimum_required(VERSION 2.8.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
@@ -38,24 +38,15 @@ SET(app_SRCS
SET(app_HDRS lxdesupport.h)
-SET(app_MOC_HDRS
- builtincommandlineoption.h
- qmmpstarter.h
- qmmpapplication.h
-)
-
SET(app_RCCS images/images.qrc translations/qmmp_locales.qrc)
QT4_ADD_RESOURCES(app_RCC_SRCS ${app_RCCS})
-QT4_AUTOMOC(${app_MOC_SRC})
-QT4_WRAP_CPP(app_MOC_SRCS ${app_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_EXECUTABLE(qmmp ${app_SRCS} ${app_MOC_SRCS} ${app_RCC_SRCS} ${app_HDRS})
+ADD_EXECUTABLE(qmmp ${app_SRCS} ${app_RCC_SRCS} ${app_HDRS})
target_link_libraries(qmmp ${QT_LIBRARIES} libqmmp qmmpui)
add_dependencies(qmmp qmmpui libqmmp)
install(TARGETS qmmp DESTINATION bin)
diff --git a/src/app/app.pro b/src/app/app.pro
index 08a795225..5d7691efd 100644
--- a/src/app/app.pro
+++ b/src/app/app.pro
@@ -61,23 +61,3 @@ unix {
icon_svg
}
RESOURCES += translations/qmmp_locales.qrc
-TRANSLATIONS = translations/qmmp_ru.ts \
- translations/qmmp_tr.ts \
- translations/qmmp_zh_CN.ts \
- translations/qmmp_cs.ts \
- translations/qmmp_pt_BR.ts \
- translations/qmmp_uk_UA.ts \
- translations/qmmp_zh_TW.ts \
- translations/qmmp_de.ts \
- translations/qmmp_pl_PL.ts \
- translations/qmmp_it.ts \
- translations/qmmp_lt.ts \
- translations/qmmp_hu.ts \
- translations/qmmp_nl.ts \
- translations/qmmp_ja.ts \
- translations/qmmp_es.ts \
- translations/qmmp_sk.ts \
- translations/qmmp_sr_BA.ts \
- translations/qmmp_sr_RS.ts
-
-
diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/CMakeLists.txt b/src/plugins/CommandLineOptions/IncDecVolumeOption/CMakeLists.txt
index 9262accd4..002a27bf8 100644
--- a/src/plugins/CommandLineOptions/IncDecVolumeOption/CMakeLists.txt
+++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/CMakeLists.txt
@@ -31,22 +31,16 @@ SET(libincdecvolumeoption_SRCS
incdecvolumeoption.cpp
)
-SET(libincdecvolumeoption_MOC_HDRS
- incdecvolumeoption.h
-)
-
SET(libincdecvolumeoption_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libincdecvolumeoption_RCC_SRCS ${libincdecvolumeoption_RCCS})
-QT4_WRAP_CPP(libincdecvolumeoption_MOC_SRCS ${libincdecvolumeoption_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(incdecvolumeoption MODULE ${libincdecvolumeoption_SRCS} ${libincdecvolumeoption_MOC_SRCS}
+ADD_LIBRARY(incdecvolumeoption MODULE ${libincdecvolumeoption_SRCS}
${libincdecvolumeoption_RCC_SRCS})
add_dependencies(incdecvolumeoption qmmpui)
target_link_libraries(incdecvolumeoption ${QT_LIBRARIES} -lqmmpui -lqmmp)
diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro b/src/plugins/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro
index e337a0f03..16ee5dcfc 100644
--- a/src/plugins/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro
+++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro
@@ -10,22 +10,6 @@ QMAKE_CLEAN =$$PLUGINS_PREFIX/CommandLineOptions/libincdecvolumeoption.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/incdecvolume_plugin_cs.ts \
- translations/incdecvolume_plugin_de.ts \
- translations/incdecvolume_plugin_pl.ts \
- translations/incdecvolume_plugin_ru.ts \
- translations/incdecvolume_plugin_uk_UA.ts \
- translations/incdecvolume_plugin_zh_TW.ts \
- translations/incdecvolume_plugin_zh_CN.ts \
- translations/incdecvolume_plugin_it.ts \
- translations/incdecvolume_plugin_tr.ts \
- translations/incdecvolume_plugin_lt.ts \
- translations/incdecvolume_plugin_nl.ts \
- translations/incdecvolume_plugin_ja.ts \
- translations/incdecvolume_plugin_es.ts \
- translations/incdecvolume_plugin_sr_BA.ts \
- translations/incdecvolume_plugin_sr_RS.ts \
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/CommandLineOptions/PlayListOption/CMakeLists.txt b/src/plugins/CommandLineOptions/PlayListOption/CMakeLists.txt
index 2b9e5c4cc..fb0f6fbad 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/CMakeLists.txt
+++ b/src/plugins/CommandLineOptions/PlayListOption/CMakeLists.txt
@@ -31,22 +31,16 @@ SET(libplaylistoption_SRCS
playlistoption.cpp
)
-SET(libplaylistoption_MOC_HDRS
- playlistoption.h
-)
-
SET(libplaylistoption_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libplaylistoption_RCC_SRCS ${libplaylistoption_RCCS})
-QT4_WRAP_CPP(libplaylistoption_MOC_SRCS ${libplaylistoption_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(playlistoption MODULE ${libplaylistoption_SRCS} ${libplaylistoption_MOC_SRCS}
+ADD_LIBRARY(playlistoption MODULE ${libplaylistoption_SRCS}
${libplaylistoption_RCC_SRCS})
add_dependencies(playlistoption qmmpui)
target_link_libraries(playlistoption ${QT_LIBRARIES} -lqmmpui -lqmmp)
diff --git a/src/plugins/CommandLineOptions/PlayListOption/PlayListOption.pro b/src/plugins/CommandLineOptions/PlayListOption/PlayListOption.pro
index 9973d36d9..fd1522a17 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/PlayListOption.pro
+++ b/src/plugins/CommandLineOptions/PlayListOption/PlayListOption.pro
@@ -10,22 +10,6 @@ QMAKE_CLEAN =$$PLUGINS_PREFIX/CommandLineOptions/libplaylistoption.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/playlist_plugin_cs.ts \
- translations/playlist_plugin_de.ts \
- translations/playlist_plugin_pl.ts \
- translations/playlist_plugin_ru.ts \
- translations/playlist_plugin_uk_UA.ts \
- translations/playlist_plugin_zh_TW.ts \
- translations/playlist_plugin_zh_CN.ts \
- translations/playlist_plugin_it.ts \
- translations/playlist_plugin_tr.ts \
- translations/playlist_plugin_lt.ts \
- translations/playlist_plugin_nl.ts \
- translations/playlist_plugin_ja.ts \
- translations/playlist_plugin_es.ts \
- translations/playlist_plugin_sr_BA.ts \
- translations/playlist_plugin_sr_RS.ts \
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/CommandLineOptions/SeekOption/CMakeLists.txt b/src/plugins/CommandLineOptions/SeekOption/CMakeLists.txt
index 6fdfdc123..b028002a7 100644
--- a/src/plugins/CommandLineOptions/SeekOption/CMakeLists.txt
+++ b/src/plugins/CommandLineOptions/SeekOption/CMakeLists.txt
@@ -31,22 +31,16 @@ SET(seekoption_SRCS
seekoption.cpp
)
-SET(seekoption_MOC_HDRS
- seekoption.h
-)
-
SET(seekoption_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(seekoption_RCC_SRCS ${seekoption_RCCS})
-QT4_WRAP_CPP(seekoption_MOC_SRCS ${seekoption_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(seekoption MODULE ${seekoption_SRCS} ${seekoption_MOC_SRCS} ${seekoption_RCC_SRCS})
+ADD_LIBRARY(seekoption MODULE ${seekoption_SRCS} ${seekoption_RCC_SRCS})
add_dependencies(seekoption qmmpui)
target_link_libraries(seekoption ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS seekoption DESTINATION ${LIB_DIR}/qmmp/CommandLineOptions)
diff --git a/src/plugins/CommandLineOptions/SeekOption/SeekOption.pro b/src/plugins/CommandLineOptions/SeekOption/SeekOption.pro
index 77bd889fe..5c63eb0e4 100644
--- a/src/plugins/CommandLineOptions/SeekOption/SeekOption.pro
+++ b/src/plugins/CommandLineOptions/SeekOption/SeekOption.pro
@@ -10,21 +10,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/CommandLineOptions/libseekoption.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/seek_plugin_cs.ts \
- translations/seek_plugin_de.ts \
- translations/seek_plugin_pl.ts \
- translations/seek_plugin_ru.ts \
- translations/seek_plugin_uk_UA.ts \
- translations/seek_plugin_zh_TW.ts \
- translations/seek_plugin_zh_CN.ts \
- translations/seek_plugin_it.ts \
- translations/seek_plugin_tr.ts \
- translations/seek_plugin_lt.ts \
- translations/seek_plugin_nl.ts \
- translations/seek_plugin_ja.ts \
- translations/seek_plugin_es.ts \
- translations/seek_plugin_sr_BA.ts \
- translations/seek_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/CommandLineOptions/StatusOption/CMakeLists.txt b/src/plugins/CommandLineOptions/StatusOption/CMakeLists.txt
index 1b695c4bf..e1a576e5b 100644
--- a/src/plugins/CommandLineOptions/StatusOption/CMakeLists.txt
+++ b/src/plugins/CommandLineOptions/StatusOption/CMakeLists.txt
@@ -31,22 +31,16 @@ SET(statusoption_SRCS
statusoption.cpp
)
-SET(statusoption_MOC_HDRS
- statusoption.h
-)
-
SET(statusoption_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(statusoption_RCC_SRCS ${statusoption_RCCS})
-QT4_WRAP_CPP(statusoption_MOC_SRCS ${statusoption_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(statusoption MODULE ${statusoption_SRCS} ${statusoption_MOC_SRCS} ${statusoption_RCC_SRCS})
+ADD_LIBRARY(statusoption MODULE ${statusoption_SRCS} ${statusoption_RCC_SRCS})
add_dependencies(statusoption qmmpui)
target_link_libraries(statusoption ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS statusoption DESTINATION ${LIB_DIR}/qmmp/CommandLineOptions)
diff --git a/src/plugins/CommandLineOptions/StatusOption/StatusOption.pro b/src/plugins/CommandLineOptions/StatusOption/StatusOption.pro
index e40f750d8..d988e1f35 100644
--- a/src/plugins/CommandLineOptions/StatusOption/StatusOption.pro
+++ b/src/plugins/CommandLineOptions/StatusOption/StatusOption.pro
@@ -10,21 +10,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/CommandLineOptions/libstatusoption.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/status_plugin_cs.ts \
- translations/status_plugin_de.ts \
- translations/status_plugin_pl.ts \
- translations/status_plugin_ru.ts \
- translations/status_plugin_uk_UA.ts \
- translations/status_plugin_zh_TW.ts \
- translations/status_plugin_zh_CN.ts \
- translations/status_plugin_it.ts \
- translations/status_plugin_tr.ts \
- translations/status_plugin_lt.ts \
- translations/status_plugin_nl.ts \
- translations/status_plugin_ja.ts \
- translations/status_plugin_es.ts \
- translations/status_plugin_sr_BA.ts \
- translations/status_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/Effect/bs2b/CMakeLists.txt b/src/plugins/Effect/bs2b/CMakeLists.txt
index 309ddaee2..d9a808c53 100644
--- a/src/plugins/Effect/bs2b/CMakeLists.txt
+++ b/src/plugins/Effect/bs2b/CMakeLists.txt
@@ -35,17 +35,10 @@ SET(libbs2b_HDRS
bs2bplugin.h
)
-SET(libbs2b_MOC_HDRS
- settingsdialog.h
- effectbs2bfactory.h
-)
-
SET(libbs2b_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libbs2b_RCC_SRCS ${libbs2b_RCCS})
-QT4_WRAP_CPP(libbs2b_MOC_SRCS ${libbs2b_MOC_HDRS})
-
pkg_search_module(BS2B libbs2b>=3.0.0)
include_directories(${BS2B_INCLUDE_DIRS})
@@ -64,7 +57,7 @@ QT4_WRAP_UI(libbs2b_UIS_H ${libbs2b_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(BS2B_FOUND)
-ADD_LIBRARY(bs2b MODULE ${libbs2b_SRCS} ${libbs2b_MOC_SRCS} ${libbs2b_UIS_H}
+ADD_LIBRARY(bs2b MODULE ${libbs2b_SRCS} ${libbs2b_UIS_H}
${libbs2b_RCC_SRCS} ${libbs2b_HDRS})
add_dependencies(bs2b qmmp)
target_link_libraries(bs2b ${QT_LIBRARIES} -lqmmp ${BS2B_LDFLAGS})
diff --git a/src/plugins/Effect/bs2b/bs2b.pro b/src/plugins/Effect/bs2b/bs2b.pro
index 6882e6aae..c4dd9419d 100644
--- a/src/plugins/Effect/bs2b/bs2b.pro
+++ b/src/plugins/Effect/bs2b/bs2b.pro
@@ -15,26 +15,9 @@ CONFIG += warn_on \
plugin \
link_pkgconfig
-
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/bs2b_plugin_cs.ts \
- translations/bs2b_plugin_de.ts \
- translations/bs2b_plugin_zh_CN.ts \
- translations/bs2b_plugin_zh_TW.ts \
- translations/bs2b_plugin_uk_UA.ts \
- translations/bs2b_plugin_pl.ts \
- translations/bs2b_plugin_ru.ts \
- translations/bs2b_plugin_it.ts \
- translations/bs2b_plugin_tr.ts \
- translations/bs2b_plugin_lt.ts \
- translations/bs2b_plugin_nl.ts \
- translations/bs2b_plugin_ja.ts \
- translations/bs2b_plugin_es.ts \
- translations/bs2b_plugin_sr_BA.ts \
- translations/bs2b_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
FORMS += settingsdialog.ui
diff --git a/src/plugins/Effect/crossfade/CMakeLists.txt b/src/plugins/Effect/crossfade/CMakeLists.txt
index 7775e3f11..d388e797d 100644
--- a/src/plugins/Effect/crossfade/CMakeLists.txt
+++ b/src/plugins/Effect/crossfade/CMakeLists.txt
@@ -35,17 +35,10 @@ SET(libcrossfade_HDRS
crossfadeplugin.h
)
-SET(libcrossfade_MOC_HDRS
- settingsdialog.h
- effectcrossfadefactory.h
-)
-
SET(libcrossfade_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libcrossfade_RCC_SRCS ${libcrossfade_RCCS})
-QT4_WRAP_CPP(libcrossfade_MOC_SRCS ${libcrossfade_MOC_HDRS})
-
# user interface
SET(libcrossfade_UIS
@@ -58,7 +51,7 @@ QT4_WRAP_UI(libcrossfade_UIS_H ${libcrossfade_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(crossfade MODULE ${libcrossfade_SRCS} ${libcrossfade_MOC_SRCS} ${libcrossfade_UIS_H} ${libcrossfade_RCC_SRCS}
+ADD_LIBRARY(crossfade MODULE ${libcrossfade_SRCS} ${libcrossfade_UIS_H} ${libcrossfade_RCC_SRCS}
${libcrossfade_HDRS})
add_dependencies(crossfade qmmp)
target_link_libraries(crossfade ${QT_LIBRARIES} -lqmmp)
diff --git a/src/plugins/Effect/crossfade/crossfade.pro b/src/plugins/Effect/crossfade/crossfade.pro
index 749eb1c33..7298a4939 100644
--- a/src/plugins/Effect/crossfade/crossfade.pro
+++ b/src/plugins/Effect/crossfade/crossfade.pro
@@ -17,22 +17,6 @@ plugin
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/crossfade_plugin_cs.ts \
- translations/crossfade_plugin_de.ts \
- translations/crossfade_plugin_zh_CN.ts \
- translations/crossfade_plugin_zh_TW.ts \
- translations/crossfade_plugin_uk_UA.ts \
- translations/crossfade_plugin_pl.ts \
- translations/crossfade_plugin_ru.ts \
- translations/crossfade_plugin_it.ts \
- translations/crossfade_plugin_tr.ts \
- translations/crossfade_plugin_lt.ts \
- translations/crossfade_plugin_nl.ts \
- translations/crossfade_plugin_ja.ts \
- translations/crossfade_plugin_es.ts \
- translations/crossfade_plugin_sr_BA.ts \
- translations/crossfade_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
FORMS += settingsdialog.ui
diff --git a/src/plugins/Effect/ladspa/CMakeLists.txt b/src/plugins/Effect/ladspa/CMakeLists.txt
index 47e29be57..e6123d95f 100644
--- a/src/plugins/Effect/ladspa/CMakeLists.txt
+++ b/src/plugins/Effect/ladspa/CMakeLists.txt
@@ -38,20 +38,10 @@ SET(libladspa_HDRS
ladspahelper.h
)
-SET(libladspa_MOC_HDRS
- ladspahost.h
- ladspaslider.h
- ladspabutton.h
- settingsdialog.h
- effectladspafactory.h
-)
-
SET(libladspa_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libladspa_RCC_SRCS ${libladspa_RCCS})
-QT4_WRAP_CPP(libladspa_MOC_SRCS ${libladspa_MOC_HDRS})
-
# user interface
SET(libladspa_UIS
@@ -63,7 +53,7 @@ QT4_WRAP_UI(libladspa_UIS_H ${libladspa_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(ladspa MODULE ${libladspa_SRCS} ${libladspa_MOC_SRCS} ${libladspa_UIS_H}
+ADD_LIBRARY(ladspa MODULE ${libladspa_SRCS} ${libladspa_UIS_H}
${libladspa_RCC_SRCS} ${libladspa_HDRS})
add_dependencies(ladspa qmmp)
target_link_libraries(ladspa ${QT_LIBRARIES} -lqmmp ${CMAKE_DL_LIBS})
diff --git a/src/plugins/Effect/ladspa/ladspa.pro b/src/plugins/Effect/ladspa/ladspa.pro
index f86f92806..59f18dacd 100644
--- a/src/plugins/Effect/ladspa/ladspa.pro
+++ b/src/plugins/Effect/ladspa/ladspa.pro
@@ -26,22 +26,6 @@ LIBS += -lqmmp \
linux-g++|linux-g++-32|linux-g++-64:LIBS += -ldl
-TRANSLATIONS = translations/ladspa_plugin_cs.ts \
- translations/ladspa_plugin_de.ts \
- translations/ladspa_plugin_zh_CN.ts \
- translations/ladspa_plugin_zh_TW.ts \
- translations/ladspa_plugin_uk_UA.ts \
- translations/ladspa_plugin_pl.ts \
- translations/ladspa_plugin_ru.ts \
- translations/ladspa_plugin_it.ts \
- translations/ladspa_plugin_tr.ts \
- translations/ladspa_plugin_lt.ts \
- translations/ladspa_plugin_nl.ts \
- translations/ladspa_plugin_ja.ts \
- translations/ladspa_plugin_es.ts \
- translations/ladspa_plugin_sr_BA.ts \
- translations/ladspa_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/Effect
diff --git a/src/plugins/Effect/srconverter/CMakeLists.txt b/src/plugins/Effect/srconverter/CMakeLists.txt
index 15decb947..c46286bd9 100644
--- a/src/plugins/Effect/srconverter/CMakeLists.txt
+++ b/src/plugins/Effect/srconverter/CMakeLists.txt
@@ -41,18 +41,10 @@ SET(libsrconverter_HDRS
srconverter.h
)
-SET(libsrconverter_MOC_HDRS
-
- settingsdialog.h
- effectsrconverterfactory.h
-)
-
SET(libsrconverter_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libsrconverter_RCC_SRCS ${libsrconverter_RCCS})
-QT4_WRAP_CPP(libsrconverter_MOC_SRCS ${libsrconverter_MOC_HDRS})
-
# user interface
@@ -66,7 +58,7 @@ QT4_WRAP_UI(libsrconverter_UIS_H ${libsrconverter_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(SAMPLERATE_FOUND)
-ADD_LIBRARY(srconverter MODULE ${libsrconverter_SRCS} ${libsrconverter_MOC_SRCS} ${libsrconverter_UIS_H}
+ADD_LIBRARY(srconverter MODULE ${libsrconverter_SRCS} ${libsrconverter_UIS_H}
${libsrconverter_RCC_SRCS} ${libsrconverter_HDRS})
add_dependencies(srconverter qmmp)
target_link_libraries(srconverter ${QT_LIBRARIES} -lqmmp ${SAMPLERATE_LDFLAGS})
diff --git a/src/plugins/Effect/srconverter/srconverter.h b/src/plugins/Effect/srconverter/srconverter.h
index b214c866f..ef2501525 100644
--- a/src/plugins/Effect/srconverter/srconverter.h
+++ b/src/plugins/Effect/srconverter/srconverter.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2007-2014 by Ilya Kotov *
+ * Copyright (C) 2007-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -44,7 +44,6 @@ private:
int m_srcError;
int m_converter_type;
int m_sz; //sample size
- quint32 m_freq;
};
#endif
diff --git a/src/plugins/Effect/srconverter/srconverter.pro b/src/plugins/Effect/srconverter/srconverter.pro
index bbc7c61de..b9e809a8e 100644
--- a/src/plugins/Effect/srconverter/srconverter.pro
+++ b/src/plugins/Effect/srconverter/srconverter.pro
@@ -20,22 +20,6 @@ TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmp -L/usr/lib -I/usr/include
-TRANSLATIONS = translations/srconverter_plugin_cs.ts \
- translations/srconverter_plugin_de.ts \
- translations/srconverter_plugin_zh_CN.ts \
- translations/srconverter_plugin_zh_TW.ts \
- translations/srconverter_plugin_uk_UA.ts \
- translations/srconverter_plugin_pl.ts \
- translations/srconverter_plugin_ru.ts \
- translations/srconverter_plugin_it.ts \
- translations/srconverter_plugin_tr.ts \
- translations/srconverter_plugin_lt.ts \
- translations/srconverter_plugin_nl.ts \
- translations/srconverter_plugin_ja.ts \
- translations/srconverter_plugin_es.ts \
- translations/srconverter_plugin_sr_BA.ts \
- translations/srconverter_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/Effect/stereo/CMakeLists.txt b/src/plugins/Effect/stereo/CMakeLists.txt
index 7717d5302..eb5aafe36 100644
--- a/src/plugins/Effect/stereo/CMakeLists.txt
+++ b/src/plugins/Effect/stereo/CMakeLists.txt
@@ -35,17 +35,10 @@ SET(libstereo_HDRS
stereoplugin.h
)
-SET(libstereo_MOC_HDRS
- settingsdialog.h
- effectstereofactory.h
-)
-
SET(libstereo_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libstereo_RCC_SRCS ${libstereo_RCCS})
-QT4_WRAP_CPP(libstereo_MOC_SRCS ${libstereo_MOC_HDRS})
-
# user interface
SET(libstereo_UIS
@@ -58,7 +51,7 @@ QT4_WRAP_UI(libstereo_UIS_H ${libstereo_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(stereo MODULE ${libstereo_SRCS} ${libstereo_MOC_SRCS} ${libstereo_UIS_H} ${libstereo_RCC_SRCS} ${libstereo_HDRS})
+ADD_LIBRARY(stereo MODULE ${libstereo_SRCS} ${libstereo_UIS_H} ${libstereo_RCC_SRCS} ${libstereo_HDRS})
add_dependencies(stereo qmmp)
target_link_libraries(stereo ${QT_LIBRARIES} -lqmmp)
install(TARGETS stereo DESTINATION ${LIB_DIR}/qmmp/Effect)
diff --git a/src/plugins/Effect/stereo/stereo.pro b/src/plugins/Effect/stereo/stereo.pro
index d5136cbea..c89c2309d 100644
--- a/src/plugins/Effect/stereo/stereo.pro
+++ b/src/plugins/Effect/stereo/stereo.pro
@@ -17,21 +17,6 @@ plugin
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/stereo_plugin_cs.ts \
- translations/stereo_plugin_de.ts \
- translations/stereo_plugin_zh_CN.ts \
- translations/stereo_plugin_zh_TW.ts \
- translations/stereo_plugin_uk_UA.ts \
- translations/stereo_plugin_pl.ts \
- translations/stereo_plugin_ru.ts \
- translations/stereo_plugin_it.ts \
- translations/stereo_plugin_tr.ts \
- translations/stereo_plugin_lt.ts \
- translations/stereo_plugin_nl.ts \
- translations/stereo_plugin_ja.ts \
- translations/stereo_plugin_es.ts \
- translations/stereo_plugin_sr_BA.ts \
- translations/stereo_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
FORMS += settingsdialog.ui
diff --git a/src/plugins/Engines/mplayer/CMakeLists.txt b/src/plugins/Engines/mplayer/CMakeLists.txt
index 1dea9477b..66f17afde 100644
--- a/src/plugins/Engines/mplayer/CMakeLists.txt
+++ b/src/plugins/Engines/mplayer/CMakeLists.txt
@@ -34,19 +34,10 @@ SET(libmplayer_SRCS
settingsdialog.cpp
)
-SET(libmplayer_MOC_HDRS
- mplayerenginefactory.h
- mplayerengine.h
- mplayermetadatamodel.h
- settingsdialog.h
-)
-
SET(libmplayer_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmplayer_RCC_SRCS ${libmplayer_RCCS})
-QT4_WRAP_CPP(libmplayer_MOC_SRCS ${libmplayer_MOC_HDRS})
-
# user interface
@@ -59,7 +50,7 @@ QT4_WRAP_UI(libmplayer_UIS_H ${libmplayer_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(mplayer MODULE ${libmplayer_SRCS} ${libmplayer_MOC_SRCS} ${libmplayer_RCC_SRCS} ${libmplayer_UIS_H})
+ADD_LIBRARY(mplayer MODULE ${libmplayer_SRCS} ${libmplayer_RCC_SRCS} ${libmplayer_UIS_H})
add_dependencies(mplayer qmmp)
target_link_libraries(mplayer ${QT_LIBRARIES} -lqmmp)
install(TARGETS mplayer DESTINATION ${LIB_DIR}/qmmp/Engines)
diff --git a/src/plugins/Engines/mplayer/mplayer.pro b/src/plugins/Engines/mplayer/mplayer.pro
index c0183d077..5f6575c45 100644
--- a/src/plugins/Engines/mplayer/mplayer.pro
+++ b/src/plugins/Engines/mplayer/mplayer.pro
@@ -16,21 +16,7 @@ TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmp \
-L/usr/lib
-TRANSLATIONS = translations/mplayer_plugin_ru.ts \
- translations/mplayer_plugin_uk_UA.ts \
- translations/mplayer_plugin_zh_CN.ts \
- translations/mplayer_plugin_zh_TW.ts \
- translations/mplayer_plugin_cs.ts \
- translations/mplayer_plugin_pl.ts \
- translations/mplayer_plugin_de.ts \
- translations/mplayer_plugin_it.ts \
- translations/mplayer_plugin_tr.ts \
- translations/mplayer_plugin_lt.ts \
- translations/mplayer_plugin_nl.ts \
- translations/mplayer_plugin_ja.ts \
- translations/mplayer_plugin_es.ts \
- translations/mplayer_plugin_sr_BA.ts \
- translations/mplayer_plugin_sr_RS.ts
+
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/Engines
diff --git a/src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt b/src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt
index 03ca6249d..c591c0c19 100644
--- a/src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt
+++ b/src/plugins/FileDialogs/QmmpFileDialog/CMakeLists.txt
@@ -32,18 +32,11 @@ SET(libqmmpfiledialog_SRCS
qmmpfiledialog.cpp
)
-SET(libqmmpfiledialog_MOC_HDRS
- qmmpfiledialogimpl.h
- qmmpfiledialog.h
-)
-
SET(libqmmpfiledialog_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(libqmmpfiledialog_RCC_SRCS ${libqmmpfiledialog_RCCS})
-QT4_WRAP_CPP(libqmmpfiledialog_MOC_SRCS ${libqmmpfiledialog_MOC_HDRS})
-
# user interface
@@ -56,7 +49,7 @@ QT4_WRAP_UI(libqmmpfiledialog_UIS_H ${libqmmpfiledialog_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(qmmpfiledialog MODULE ${libqmmpfiledialog_SRCS} ${libqmmpfiledialog_MOC_SRCS} ${libqmmpfiledialog_UIS_H} ${libqmmpfiledialog_RCC_SRCS})
+ADD_LIBRARY(qmmpfiledialog MODULE ${libqmmpfiledialog_SRCS} ${libqmmpfiledialog_UIS_H} ${libqmmpfiledialog_RCC_SRCS})
add_dependencies(qmmpfiledialog qmmpui)
target_link_libraries(qmmpfiledialog ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS qmmpfiledialog DESTINATION ${LIB_DIR}/qmmp/FileDialogs)
diff --git a/src/plugins/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro b/src/plugins/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro
index 2935a13c9..dd30694b6 100644
--- a/src/plugins/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro
+++ b/src/plugins/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro
@@ -20,24 +20,6 @@ TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/qmmp_file_dialog_plugin_ru.ts \
- translations/qmmp_file_dialog_plugin_tr.ts \
- translations/qmmp_file_dialog_plugin_zh_CN.ts \
- translations/qmmp_file_dialog_plugin_cs.ts \
- translations/qmmp_file_dialog_plugin_pl.ts \
- translations/qmmp_file_dialog_plugin_pt_BR.ts \
- translations/qmmp_file_dialog_plugin_uk_UA.ts \
- translations/qmmp_file_dialog_plugin_zh_TW.ts \
- translations/qmmp_file_dialog_plugin_de.ts \
- translations/qmmp_file_dialog_plugin_it.ts \
- translations/qmmp_file_dialog_plugin_lt.ts \
- translations/qmmp_file_dialog_plugin_nl.ts \
- translations/qmmp_file_dialog_plugin_ja.ts \
- translations/qmmp_file_dialog_plugin_es.ts \
- translations/qmmp_file_dialog_plugin_sr_BA.ts \
- translations/qmmp_file_dialog_plugin_sr_RS.ts
-
RESOURCES += translations/translations.qrc
unix {
diff --git a/src/plugins/General/converter/CMakeLists.txt b/src/plugins/General/converter/CMakeLists.txt
index 180c967c2..85081775e 100644
--- a/src/plugins/General/converter/CMakeLists.txt
+++ b/src/plugins/General/converter/CMakeLists.txt
@@ -43,21 +43,11 @@ SET(libconverter_SRCS
preseteditor.cpp
)
-SET(libconverter_MOC_HDRS
- converterfactory.h
- converter.h
- converterhelper.h
- converterdialog.h
- preseteditor.h
-)
-
SET(libconverter_RCCS
translations/translations.qrc presets.qrc)
QT4_ADD_RESOURCES(libconverter_RCC_SRCS ${libconverter_RCCS})
-QT4_WRAP_CPP(libconverter_MOC_SRCS ${libconverter_MOC_HDRS})
-
# user interface
SET(libconverter_UIS
@@ -70,7 +60,7 @@ QT4_WRAP_UI(libconverter_UIS_H ${libconverter_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(converter MODULE ${libconverter_SRCS} ${libconverter_MOC_SRCS} ${libconverter_UIS_H} ${libconverter_RCC_SRCS})
+ADD_LIBRARY(converter MODULE ${libconverter_SRCS} ${libconverter_UIS_H} ${libconverter_RCC_SRCS})
add_dependencies(converter qmmpui)
target_link_libraries(converter ${QT_LIBRARIES} -lqmmpui -lqmmp ${TAGLIB_LDFLAGS})
install(TARGETS converter DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/converter/converter.pro b/src/plugins/General/converter/converter.pro
index 19d104b5b..6808448b7 100644
--- a/src/plugins/General/converter/converter.pro
+++ b/src/plugins/General/converter/converter.pro
@@ -18,21 +18,6 @@ PKGCONFIG += taglib
win32:QMAKE_LIBDIR += ../../../../bin
win32:LIBS += -lqmmpui0 -lqmmp0
-TRANSLATIONS = translations/converter_plugin_cs.ts \
- translations/converter_plugin_de.ts \
- translations/converter_plugin_zh_CN.ts \
- translations/converter_plugin_zh_TW.ts \
- translations/converter_plugin_ru.ts \
- translations/converter_plugin_pl.ts \
- translations/converter_plugin_uk_UA.ts \
- translations/converter_plugin_it.ts \
- translations/converter_plugin_tr.ts \
- translations/converter_plugin_lt.ts \
- translations/converter_plugin_nl.ts \
- translations/converter_plugin_ja.ts \
- translations/converter_plugin_es.ts \
- translations/converter_plugin_sr_BA.ts \
- translations/converter_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc presets.qrc
unix{
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/copypaste/CMakeLists.txt b/src/plugins/General/copypaste/CMakeLists.txt
index 3445ffacc..c64d9d3c1 100644
--- a/src/plugins/General/copypaste/CMakeLists.txt
+++ b/src/plugins/General/copypaste/CMakeLists.txt
@@ -34,23 +34,16 @@ SET(libcopypaste_SRCS
copypastefactory.cpp
)
-SET(libcopypaste_MOC_HDRS
- copypastefactory.h
- copypaste.h
-)
-
SET(libcopypaste_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(libcopypaste_RCC_SRCS ${libcopypaste_RCCS})
-QT4_WRAP_CPP(libcopypaste_MOC_SRCS ${libcopypaste_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(copypaste MODULE ${libcopypaste_SRCS} ${libcopypaste_MOC_SRCS} ${libcopypaste_UIS_H} ${libcopypaste_RCC_SRCS})
+ADD_LIBRARY(copypaste MODULE ${libcopypaste_SRCS} ${libcopypaste_UIS_H} ${libcopypaste_RCC_SRCS})
add_dependencies(copypaste qmmpui)
target_link_libraries(copypaste ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS copypaste DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/covermanager/CMakeLists.txt b/src/plugins/General/covermanager/CMakeLists.txt
index 01fabe8ae..8fc9522cf 100644
--- a/src/plugins/General/covermanager/CMakeLists.txt
+++ b/src/plugins/General/covermanager/CMakeLists.txt
@@ -35,12 +35,6 @@ SET(libcovermanager_SRCS
covermanagerfactory.cpp
)
-SET(libcovermanager_MOC_HDRS
- coverwidget.h
- covermanager.h
- covermanagerfactory.h
-)
-
SET(libcovermanager_RCCS
translations/translations.qrc
images/cm_images.qrc
@@ -48,8 +42,6 @@ SET(libcovermanager_RCCS
QT4_ADD_RESOURCES(libcovermanager_RCC_SRCS ${libcovermanager_RCCS})
-QT4_WRAP_CPP(libcovermanager_MOC_SRCS ${libcovermanager_MOC_HDRS})
-
# user interface
@@ -61,7 +53,7 @@ QT4_WRAP_UI(libcovermanager_UIS_H ${libcovermanager_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(covermanager MODULE ${libcovermanager_SRCS} ${libcovermanager_MOC_SRCS} ${libcovermanager_UIS_H}
+ADD_LIBRARY(covermanager MODULE ${libcovermanager_SRCS} ${libcovermanager_UIS_H}
${libcovermanager_RCC_SRCS})
add_dependencies(covermanager qmmpui)
target_link_libraries(covermanager ${QT_LIBRARIES} -lqmmpui -lqmmp)
diff --git a/src/plugins/General/fileops/CMakeLists.txt b/src/plugins/General/fileops/CMakeLists.txt
index d525022ed..268af2fed 100644
--- a/src/plugins/General/fileops/CMakeLists.txt
+++ b/src/plugins/General/fileops/CMakeLists.txt
@@ -36,20 +36,11 @@ SET(libfileops_SRCS
hotkeydialog.cpp
)
-SET(libfileops_MOC_HDRS
- fileopsfactory.h
- fileops.h
- settingsdialog.h
- hotkeydialog.h
-)
-
SET(libfileops_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(libfileops_RCC_SRCS ${libfileops_RCCS})
-QT4_WRAP_CPP(libfileops_MOC_SRCS ${libfileops_MOC_HDRS})
-
# user interface
SET(libfileops_UIS
@@ -62,7 +53,7 @@ QT4_WRAP_UI(libfileops_UIS_H ${libfileops_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(fileops MODULE ${libfileops_SRCS} ${libfileops_MOC_SRCS} ${libfileops_UIS_H} ${libfileops_RCC_SRCS})
+ADD_LIBRARY(fileops MODULE ${libfileops_SRCS} ${libfileops_UIS_H} ${libfileops_RCC_SRCS})
add_dependencies(fileops qmmpui)
target_link_libraries(fileops ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS fileops DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/fileops/fileops.pro b/src/plugins/General/fileops/fileops.pro
index a270db913..c03a7f81c 100644
--- a/src/plugins/General/fileops/fileops.pro
+++ b/src/plugins/General/fileops/fileops.pro
@@ -2,7 +2,7 @@ include(../../plugins.pri)
INCLUDEPATH += ../../../../src
CONFIG += warn_on \
-plugin
+plugin
TARGET =$$PLUGINS_PREFIX/General/fileops
unix : QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libfileops.so
@@ -15,21 +15,6 @@ unix : LIBS += -lqmmpui -lqmmp
win32 : QMAKE_LIBDIR += ../../../../bin
win32 : LIBS += -lqmmpui0 -lqmmp0
-TRANSLATIONS = translations/fileops_plugin_cs.ts \
- translations/fileops_plugin_de.ts \
- translations/fileops_plugin_zh_CN.ts \
- translations/fileops_plugin_zh_TW.ts \
- translations/fileops_plugin_ru.ts \
- translations/fileops_plugin_pl.ts \
- translations/fileops_plugin_uk_UA.ts \
- translations/fileops_plugin_it.ts \
- translations/fileops_plugin_tr.ts \
- translations/fileops_plugin_lt.ts \
- translations/fileops_plugin_nl.ts \
- translations/fileops_plugin_ja.ts \
- translations/fileops_plugin_es.ts \
- translations/fileops_plugin_sr_BA.ts \
- translations/fileops_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
unix {
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/gnomehotkey/CMakeLists.txt b/src/plugins/General/gnomehotkey/CMakeLists.txt
index af69b0483..f36beb0be 100644
--- a/src/plugins/General/gnomehotkey/CMakeLists.txt
+++ b/src/plugins/General/gnomehotkey/CMakeLists.txt
@@ -32,23 +32,15 @@ SET(libgnomehotkey_SRCS
mediakeys.cpp
)
-SET(libgnomehotkey_MOC_HDRS
- gnomehotkeyfactory.h
- mediakeys.h
-)
-
SET(libgnomehotkey_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libgnomehotkey_RCC_SRCS ${libgnomehotkey_RCCS})
-QT4_WRAP_CPP(libgnomehotkey_MOC_SRCS ${libgnomehotkey_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(gnomehotkey MODULE ${libgnomehotkey_SRCS} ${libgnomehotkey_MOC_SRCS} ${libgnomehotkey_RCC_SRCS})
+ADD_LIBRARY(gnomehotkey MODULE ${libgnomehotkey_SRCS} ${libgnomehotkey_RCC_SRCS})
add_dependencies(gnomehotkey qmmpui)
target_link_libraries(gnomehotkey ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS gnomehotkey DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/gnomehotkey/gnomehotkey.pro b/src/plugins/General/gnomehotkey/gnomehotkey.pro
index 5ae45e2aa..1c693f1b7 100644
--- a/src/plugins/General/gnomehotkey/gnomehotkey.pro
+++ b/src/plugins/General/gnomehotkey/gnomehotkey.pro
@@ -11,22 +11,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libgnomehotkey.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/gnomehotkey_plugin_cs.ts \
- translations/gnomehotkey_plugin_de.ts \
- translations/gnomehotkey_plugin_zh_CN.ts \
- translations/gnomehotkey_plugin_zh_TW.ts \
- translations/gnomehotkey_plugin_ru.ts \
- translations/gnomehotkey_plugin_pl.ts \
- translations/gnomehotkey_plugin_uk_UA.ts \
- translations/gnomehotkey_plugin_it.ts \
- translations/gnomehotkey_plugin_tr.ts \
- translations/gnomehotkey_plugin_lt.ts \
- translations/gnomehotkey_plugin_nl.ts \
- translations/gnomehotkey_plugin_ja.ts \
- translations/gnomehotkey_plugin_es.ts \
- translations/gnomehotkey_plugin_sr_BA.ts \
- translations/gnomehotkey_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/hal/CMakeLists.txt b/src/plugins/General/hal/CMakeLists.txt
index fe07dd690..b436fcfce 100644
--- a/src/plugins/General/hal/CMakeLists.txt
+++ b/src/plugins/General/hal/CMakeLists.txt
@@ -35,20 +35,10 @@ SET(libhal_SRCS
settingsdialog.cpp
)
-SET(libhal_MOC_HDRS
- halfactory.h
- halmanager.h
- halplugin.h
- haldevice.h
- settingsdialog.h
-)
-
SET(libhal_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libhal_RCC_SRCS ${libhal_RCCS})
-QT4_WRAP_CPP(libhal_MOC_SRCS ${libhal_MOC_HDRS})
-
# user interface
SET(libhal_UIS
@@ -60,7 +50,7 @@ QT4_WRAP_UI(libhal_UIS_H ${libhal_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(hal MODULE ${libhal_SRCS} ${libhal_MOC_SRCS} ${libhal_UIS_H} ${libhal_RCC_SRCS})
+ADD_LIBRARY(hal MODULE ${libhal_SRCS} ${libhal_UIS_H} ${libhal_RCC_SRCS})
add_dependencies(hal qmmpui)
target_link_libraries(hal ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS hal DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/hal/hal.pro b/src/plugins/General/hal/hal.pro
index 434898891..0ba95a02b 100644
--- a/src/plugins/General/hal/hal.pro
+++ b/src/plugins/General/hal/hal.pro
@@ -11,22 +11,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libhal.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/hal_plugin_cs.ts \
- translations/hal_plugin_de.ts \
- translations/hal_plugin_zh_CN.ts \
- translations/hal_plugin_zh_TW.ts \
- translations/hal_plugin_ru.ts \
- translations/hal_plugin_pl.ts \
- translations/hal_plugin_uk_UA.ts \
- translations/hal_plugin_it.ts \
- translations/hal_plugin_tr.ts \
- translations/hal_plugin_lt.ts \
- translations/hal_plugin_nl.ts \
- translations/hal_plugin_ja.ts \
- translations/hal_plugin_es.ts \
- translations/hal_plugin_sr_BA.ts \
- translations/hal_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/hotkey/CMakeLists.txt b/src/plugins/General/hotkey/CMakeLists.txt
index 62845b042..1e489598e 100644
--- a/src/plugins/General/hotkey/CMakeLists.txt
+++ b/src/plugins/General/hotkey/CMakeLists.txt
@@ -47,21 +47,12 @@ SET(libhotkey_SRCS
hotkeydialog.cpp
)
-SET(libhotkey_MOC_HDRS
- settingsdialog.h
- hotkeyfactory.h
- hotkeymanager.h
- hotkeydialog.h
-)
-
SET(libhotkey_RCCS
translations/translations.qrc
)
QT4_ADD_RESOURCES(libhotkey_RCC_SRCS ${libhotkey_RCCS})
-QT4_WRAP_CPP(libhotkey_MOC_SRCS ${libhotkey_MOC_HDRS})
-
# user interface
@@ -76,7 +67,7 @@ QT4_WRAP_UI(libhotkey_UIS_H ${libhotkey_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(X11_FOUND)
-ADD_LIBRARY(hotkey MODULE ${libhotkey_SRCS} ${libhotkey_MOC_SRCS} ${libhotkey_UIS_H} ${libhotkey_RCC_SRCS})
+ADD_LIBRARY(hotkey MODULE ${libhotkey_SRCS} ${libhotkey_UIS_H} ${libhotkey_RCC_SRCS})
add_dependencies(hotkey qmmpui)
target_link_libraries(hotkey ${QT_LIBRARIES} -lqmmpui -lqmmp ${X11_LDFLAGS})
install(TARGETS hotkey DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/hotkey/hotkey.pro b/src/plugins/General/hotkey/hotkey.pro
index e209a5e74..f166ebae1 100644
--- a/src/plugins/General/hotkey/hotkey.pro
+++ b/src/plugins/General/hotkey/hotkey.pro
@@ -12,21 +12,6 @@ TARGET = $$PLUGINS_PREFIX/General/hotkey
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/hotkey_plugin_cs.ts \
- translations/hotkey_plugin_de.ts \
- translations/hotkey_plugin_zh_CN.ts \
- translations/hotkey_plugin_zh_TW.ts \
- translations/hotkey_plugin_ru.ts \
- translations/hotkey_plugin_pl.ts \
- translations/hotkey_plugin_uk_UA.ts \
- translations/hotkey_plugin_it.ts \
- translations/hotkey_plugin_tr.ts \
- translations/hotkey_plugin_lt.ts \
- translations/hotkey_plugin_nl.ts \
- translations/hotkey_plugin_ja.ts \
- translations/hotkey_plugin_es.ts \
- translations/hotkey_plugin_sr_BA.ts \
- translations/hotkey_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
target.path = $$LIB_DIR/qmmp/General
diff --git a/src/plugins/General/hotkey/hotkeymanager_win.cpp b/src/plugins/General/hotkey/hotkeymanager_win.cpp
index c8d71ea9f..bf2b2165e 100644
--- a/src/plugins/General/hotkey/hotkeymanager_win.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_win.cpp
@@ -298,5 +298,8 @@ quint32 HotkeyManager::keycodeToKeysym(quint32 keycode)
}
return MapVirtualKey(keycode, 1);
}
+
+#include "moc_hotkeymanager.cpp"
+
#endif
diff --git a/src/plugins/General/hotkey/hotkeymanager_x11.cpp b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
index 21e3bdab8..b24feab84 100644
--- a/src/plugins/General/hotkey/hotkeymanager_x11.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2013 by Ilya Kotov *
+ * Copyright (C) 2009-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* Copyright (C) 2003-2007 by Justin Karneges and Michail Pishchagin *
@@ -316,4 +316,7 @@ quint32 HotkeyManager::keycodeToKeysym(quint32 keycode)
return XKeycodeToKeysym(QX11Info::display(), keycode,0);
#endif
}
+
+#include "moc_hotkeymanager.cpp"
+
#endif
diff --git a/src/plugins/General/kdenotify/CMakeLists.txt b/src/plugins/General/kdenotify/CMakeLists.txt
index d62a7b8f4..5fac1e62e 100644
--- a/src/plugins/General/kdenotify/CMakeLists.txt
+++ b/src/plugins/General/kdenotify/CMakeLists.txt
@@ -35,18 +35,10 @@ SET(libkdenotify_SRCS
settingsdialog.cpp
)
-SET(libkdenotify_MOC_HDRS
- kdenotifyfactory.h
- kdenotify.h
- settingsdialog.h
-)
-
SET(libkdenotify_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libkdenotify_RCC_SRCS ${libkdenotify_RCCS})
-QT4_WRAP_CPP(libkdenotify_MOC_SRCS ${libkdenotify_MOC_HDRS})
-
# user interface
SET(libkdenotify_UIS
settingsdialog.ui
@@ -59,7 +51,7 @@ QT4_WRAP_UI(libkdenotify_UIS_H ${libkdenotify_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(kdenotify MODULE ${libkdenotify_SRCS} ${libkdenotify_MOC_SRCS} ${libkdenotify_RCC_SRCS} ${libkdenotify_UIS_H})
+ADD_LIBRARY(kdenotify MODULE ${libkdenotify_SRCS} ${libkdenotify_RCC_SRCS} ${libkdenotify_UIS_H})
add_dependencies(kdenotify qmmpui)
target_link_libraries(kdenotify ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS kdenotify DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/kdenotify/kdenotify.pro b/src/plugins/General/kdenotify/kdenotify.pro
index 36b612814..49d0acbcd 100644
--- a/src/plugins/General/kdenotify/kdenotify.pro
+++ b/src/plugins/General/kdenotify/kdenotify.pro
@@ -9,12 +9,12 @@ CONFIG += warn_on \
unix:TARGET = $$PLUGINS_PREFIX/General/kdenotify
unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libkdenotify.so
TEMPLATE = lib
-unix {
+unix {
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmpui \
-lqmmp
}
-unix {
+unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/General
INSTALLS += target
@@ -28,22 +28,6 @@ HEADERS += kdenotifyfactory.h \
RESOURCES += translations/translations.qrc
FORMS += settingsdialog.ui
-TRANSLATIONS = translations/kdenotify_plugin_cs.ts \
- translations/kdenotify_plugin_de.ts \
- translations/kdenotify_plugin_zh_CN.ts \
- translations/kdenotify_plugin_zh_TW.ts \
- translations/kdenotify_plugin_ru.ts \
- translations/kdenotify_plugin_pl.ts \
- translations/kdenotify_plugin_uk_UA.ts \
- translations/kdenotify_plugin_it.ts \
- translations/kdenotify_plugin_tr.ts \
- translations/kdenotify_plugin_lt.ts \
- translations/kdenotify_plugin_nl.ts \
- translations/kdenotify_plugin_ja.ts \
- translations/kdenotify_plugin_es.ts \
- translations/kdenotify_plugin_sr_BA.ts \
- translations/kdenotify_plugin_sr_RS.ts
-
images.files = images/app_icon.png \
images/empty_cover.png
images.path = /share/qmmp/images/
diff --git a/src/plugins/General/lyrics/CMakeLists.txt b/src/plugins/General/lyrics/CMakeLists.txt
index 3f98e4b51..82a45f332 100644
--- a/src/plugins/General/lyrics/CMakeLists.txt
+++ b/src/plugins/General/lyrics/CMakeLists.txt
@@ -38,19 +38,11 @@ SET(liblyrics_SRCS
lyricswindow.cpp
)
-SET(liblyrics_MOC_HDRS
- lyricsfactory.h
- lyrics.h
- lyricswindow.h
-)
-
SET(liblyrics_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(liblyrics_RCC_SRCS ${liblyrics_RCCS})
-QT4_WRAP_CPP(liblyrics_MOC_SRCS ${liblyrics_MOC_HDRS})
-
# user interface
SET(liblyrics_UIS
@@ -62,7 +54,7 @@ QT4_WRAP_UI(liblyrics_UIS_H ${liblyrics_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(lyrics MODULE ${liblyrics_SRCS} ${liblyrics_MOC_SRCS} ${liblyrics_UIS_H} ${liblyrics_RCC_SRCS})
+ADD_LIBRARY(lyrics MODULE ${liblyrics_SRCS} ${liblyrics_UIS_H} ${liblyrics_RCC_SRCS})
add_dependencies(lyrics qmmpui)
target_link_libraries(lyrics ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS lyrics DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/lyrics/lyrics.pro b/src/plugins/General/lyrics/lyrics.pro
index ddb7ec5c8..ccb4f3ca8 100644
--- a/src/plugins/General/lyrics/lyrics.pro
+++ b/src/plugins/General/lyrics/lyrics.pro
@@ -2,7 +2,7 @@ include(../../plugins.pri)
INCLUDEPATH += ../../../../src
CONFIG += warn_on \
-plugin
+plugin
TARGET =$$PLUGINS_PREFIX/General/lyrics
unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/General/liblyrics.so
@@ -15,21 +15,6 @@ unix:LIBS += -lqmmpui -lqmmp
win32:QMAKE_LIBDIR += ../../../../bin
win32:LIBS += -lqmmpui0 -lqmmp0
-TRANSLATIONS = translations/lyrics_plugin_cs.ts \
- translations/lyrics_plugin_de.ts \
- translations/lyrics_plugin_zh_CN.ts \
- translations/lyrics_plugin_zh_TW.ts \
- translations/lyrics_plugin_ru.ts \
- translations/lyrics_plugin_pl.ts \
- translations/lyrics_plugin_uk_UA.ts \
- translations/lyrics_plugin_it.ts \
- translations/lyrics_plugin_tr.ts \
- translations/lyrics_plugin_lt.ts \
- translations/lyrics_plugin_nl.ts \
- translations/lyrics_plugin_ja.ts \
- translations/lyrics_plugin_es.ts \
- translations/lyrics_plugin_sr_BA.ts \
- translations/lyrics_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
unix{
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/mpris/CMakeLists.txt b/src/plugins/General/mpris/CMakeLists.txt
index c9327ca6d..ec0bad8de 100644
--- a/src/plugins/General/mpris/CMakeLists.txt
+++ b/src/plugins/General/mpris/CMakeLists.txt
@@ -39,22 +39,10 @@ SET(libmpris_SRCS
mpris2/player2object.cpp
)
-SET(libmpris_MOC_HDRS
- mprisfactory.h
- mpris.h
- mpris1/rootobject.h
- mpris1/playerobject.h
- mpris1/tracklistobject.h
- mpris2/root2object.h
- mpris2/player2object.h
-)
-
SET(libmpris_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmpris_RCC_SRCS ${libmpris_RCCS})
-QT4_WRAP_CPP(libmpris_MOC_SRCS ${libmpris_MOC_HDRS})
-
# user interface
@@ -63,7 +51,7 @@ QT4_WRAP_CPP(libmpris_MOC_SRCS ${libmpris_MOC_HDRS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(mpris MODULE ${libmpris_SRCS} ${libmpris_MOC_SRCS} ${libmpris_RCC_SRCS})
+ADD_LIBRARY(mpris MODULE ${libmpris_SRCS} ${libmpris_RCC_SRCS})
add_dependencies(mpris qmmpui)
target_link_libraries(mpris ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS mpris DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/mpris/mpris.pro b/src/plugins/General/mpris/mpris.pro
index 820f7c516..096bce200 100644
--- a/src/plugins/General/mpris/mpris.pro
+++ b/src/plugins/General/mpris/mpris.pro
@@ -11,21 +11,6 @@ QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libmpris.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/mpris_plugin_cs.ts \
- translations/mpris_plugin_de.ts \
- translations/mpris_plugin_zh_CN.ts \
- translations/mpris_plugin_zh_TW.ts \
- translations/mpris_plugin_ru.ts \
- translations/mpris_plugin_pl.ts \
- translations/mpris_plugin_uk_UA.ts \
- translations/mpris_plugin_it.ts \
- translations/mpris_plugin_tr.ts \
- translations/mpris_plugin_lt.ts \
- translations/mpris_plugin_nl.ts \
- translations/mpris_plugin_ja.ts \
- translations/mpris_plugin_es.ts \
- translations/mpris_plugin_sr_BA.ts \
- translations/mpris_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.cpp b/src/plugins/General/mpris/mpris1/tracklistobject.cpp
index 2cef4a8c7..a7dd70aa9 100644
--- a/src/plugins/General/mpris/mpris1/tracklistobject.cpp
+++ b/src/plugins/General/mpris/mpris1/tracklistobject.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2014 by Ilya Kotov *
+ * Copyright (C) 2008-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -33,7 +33,7 @@ TrackListObject::TrackListObject(QObject *parent) : QObject(parent)
m_ui_settings = QmmpUiSettings::instance();
m_pl_manager = m_player->playListManager();
m_model = m_pl_manager->currentPlayList();
- connect (m_model, SIGNAL(listChanged()), SLOT(updateTrackList()));
+ connect (m_model, SIGNAL(listChanged(int)), SLOT(updateTrackList(int)));
connect (m_pl_manager, SIGNAL(currentPlayListChanged(PlayListModel*,PlayListModel*)),
SLOT(switchPlayList(PlayListModel*,PlayListModel*)));
m_prev_count = 0;
@@ -119,16 +119,17 @@ void TrackListObject::playTrack(PlayListTrack *track)
disconnect(m_model,SIGNAL(trackAdded(PlayListTrack*)), this, SLOT(playTrack(PlayListTrack*)));
}
-void TrackListObject::updateTrackList()
+void TrackListObject::updateTrackList(int flags)
{
- emit TrackListChange(m_model->numberOfTrack(m_model->count() - 1) + 1);
+ if(flags & PlayListModel::STRUCTURE)
+ emit TrackListChange(m_model->numberOfTrack(m_model->count() - 1) + 1);
}
void TrackListObject::switchPlayList(PlayListModel *cur, PlayListModel *prev)
{
m_model = cur;
- connect (m_model, SIGNAL(listChanged()), SLOT(updateTrackList()));
+ connect (m_model, SIGNAL(listChanged(int)), SLOT(updateTrackList(int)));
if(prev)
disconnect(prev,0,this,0);
- updateTrackList();
+ updateTrackList(PlayListModel::STRUCTURE);
}
diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.h b/src/plugins/General/mpris/mpris1/tracklistobject.h
index c5eca61d4..47c7148fb 100644
--- a/src/plugins/General/mpris/mpris1/tracklistobject.h
+++ b/src/plugins/General/mpris/mpris1/tracklistobject.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2014 by Ilya Kotov *
+ * Copyright (C) 2008-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -57,7 +57,7 @@ signals:
private slots:
void playTrack(PlayListTrack *track);
- void updateTrackList();
+ void updateTrackList(int flags);
void switchPlayList(PlayListModel *cur, PlayListModel *prev);
private:
diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp
index 9bf7e539e..3168c6c53 100644
--- a/src/plugins/General/mpris/mpris2/player2object.cpp
+++ b/src/plugins/General/mpris/mpris2/player2object.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2013 by Ilya Kotov *
+ * Copyright (C) 2010-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -369,7 +369,7 @@ void Player2Object::setModel(PlayListModel *selected, PlayListModel *previous)
{
if(previous)
disconnect(previous, 0, this, 0); //disconnect previous model
- connect(selected, SIGNAL(listChanged()), SLOT(emitPropertiesChanged()));
+ connect(selected, SIGNAL(listChanged(int)), SLOT(emitPropertiesChanged()));
}
void Player2Object::syncProperties()
diff --git a/src/plugins/General/mpris/mpris2/player2object.h b/src/plugins/General/mpris/mpris2/player2object.h
index f66b55664..e51489e16 100644
--- a/src/plugins/General/mpris/mpris2/player2object.h
+++ b/src/plugins/General/mpris/mpris2/player2object.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2013 by Ilya Kotov *
+ * Copyright (C) 2010-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
diff --git a/src/plugins/General/notifier/CMakeLists.txt b/src/plugins/General/notifier/CMakeLists.txt
index 17bfd1d7e..3ee3300bb 100644
--- a/src/plugins/General/notifier/CMakeLists.txt
+++ b/src/plugins/General/notifier/CMakeLists.txt
@@ -34,21 +34,12 @@ SET(libnotifier_SRCS
popupwidget.cpp
)
-SET(libnotifier_MOC_HDRS
- settingsdialog.h
- notifierfactory.h
- notifier.h
- popupwidget.h
-)
-
SET(libnotifier_RCCS
translations/translations.qrc
notifier_images.qrc)
QT4_ADD_RESOURCES(libnotifier_RCC_SRCS ${libnotifier_RCCS})
-QT4_WRAP_CPP(libnotifier_MOC_SRCS ${libnotifier_MOC_HDRS})
-
# user interface
@@ -61,7 +52,7 @@ QT4_WRAP_UI(libnotifier_UIS_H ${libnotifier_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(notifier MODULE ${libnotifier_SRCS} ${libnotifier_MOC_SRCS} ${libnotifier_UIS_H} ${libnotifier_RCC_SRCS})
+ADD_LIBRARY(notifier MODULE ${libnotifier_SRCS} ${libnotifier_UIS_H} ${libnotifier_RCC_SRCS})
add_dependencies(notifier qmmpui)
target_link_libraries(notifier ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS notifier DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/notifier/notifier.pro b/src/plugins/General/notifier/notifier.pro
index dc5fd3056..4a602ae77 100644
--- a/src/plugins/General/notifier/notifier.pro
+++ b/src/plugins/General/notifier/notifier.pro
@@ -14,21 +14,6 @@ unix:LIBS += -lqmmpui -lqmmp
win32:QMAKE_LIBDIR += ../../../../bin
win32:LIBS += -lqmmpui0 -lqmmp0
-TRANSLATIONS = translations/notifier_plugin_cs.ts \
- translations/notifier_plugin_de.ts \
- translations/notifier_plugin_zh_CN.ts \
- translations/notifier_plugin_zh_TW.ts \
- translations/notifier_plugin_ru.ts \
- translations/notifier_plugin_pl.ts \
- translations/notifier_plugin_uk_UA.ts \
- translations/notifier_plugin_it.ts \
- translations/notifier_plugin_tr.ts \
- translations/notifier_plugin_lt.ts \
- translations/notifier_plugin_nl.ts \
- translations/notifier_plugin_ja.ts \
- translations/notifier_plugin_es.ts \
- translations/notifier_plugin_sr_BA.ts \
- translations/notifier_plugin_sr_RS.ts
RESOURCES = notifier_images.qrc \
translations/translations.qrc
diff --git a/src/plugins/General/rgscan/CMakeLists.txt b/src/plugins/General/rgscan/CMakeLists.txt
index 67ea35089..89eb3054d 100644
--- a/src/plugins/General/rgscan/CMakeLists.txt
+++ b/src/plugins/General/rgscan/CMakeLists.txt
@@ -43,13 +43,6 @@ SET(librgscan_SRCS
gain_analysis.c
)
-SET(librgscan_MOC_HDRS
- rgscanfactory.h
- rgscanhelper.h
- rgscandialog.h
- rgscanner.h
-)
-
SET(librgscan_HDRS
gain_analysis.h
)
@@ -60,8 +53,6 @@ SET(librgscan_RCCS
QT4_ADD_RESOURCES(librgscan_RCC_SRCS ${librgscan_RCCS})
-QT4_WRAP_CPP(librgscan_MOC_SRCS ${librgscan_MOC_HDRS})
-
# user interface
SET(librgscan_UIS
@@ -73,7 +64,7 @@ QT4_WRAP_UI(librgscan_UIS_H ${librgscan_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(rgscan MODULE ${librgscan_SRCS} ${librgscan_MOC_SRCS} ${librgscan_UIS_H} ${librgscan_HDRS} ${librgscan_RCC_SRCS})
+ADD_LIBRARY(rgscan MODULE ${librgscan_SRCS} ${librgscan_UIS_H} ${librgscan_HDRS} ${librgscan_RCC_SRCS})
add_dependencies(rgscan qmmpui)
target_link_libraries(rgscan ${QT_LIBRARIES} -lqmmpui -lqmmp ${TAGLIB_LDFLAGS})
install(TARGETS rgscan DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/rgscan/rgscan.pro b/src/plugins/General/rgscan/rgscan.pro
index d9e7b6122..a05a4f885 100644
--- a/src/plugins/General/rgscan/rgscan.pro
+++ b/src/plugins/General/rgscan/rgscan.pro
@@ -13,26 +13,9 @@ TEMPLATE = lib
unix:QMAKE_LIBDIR += ../../../../lib
unix:LIBS += -lqmmpui -lqmmp
-
-
win32:QMAKE_LIBDIR += ../../../../bin
win32:LIBS += -lqmmpui0 -lqmmp0 -ltag.dll
-TRANSLATIONS = translations/rgscan_plugin_cs.ts \
- translations/rgscan_plugin_de.ts \
- translations/rgscan_plugin_zh_CN.ts \
- translations/rgscan_plugin_zh_TW.ts \
- translations/rgscan_plugin_ru.ts \
- translations/rgscan_plugin_pl.ts \
- translations/rgscan_plugin_uk_UA.ts \
- translations/rgscan_plugin_it.ts \
- translations/rgscan_plugin_tr.ts \
- translations/rgscan_plugin_lt.ts \
- translations/rgscan_plugin_nl.ts \
- translations/rgscan_plugin_ja.ts \
- translations/rgscan_plugin_es.ts \
- translations/rgscan_plugin_sr_BA.ts \
- translations/rgscan_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
unix{
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/scrobbler/CMakeLists.txt b/src/plugins/General/scrobbler/CMakeLists.txt
index 6e490677c..67213747e 100644
--- a/src/plugins/General/scrobbler/CMakeLists.txt
+++ b/src/plugins/General/scrobbler/CMakeLists.txt
@@ -36,13 +36,6 @@ SET(libscrobbler_SRCS
scrobbler.cpp
)
-SET(libscrobbler_MOC_HDRS
- settingsdialog.h
- scrobblerfactory.h
- scrobblerhandler.h
- scrobbler.h
-)
-
SET(libscrobbler_HDRS
scrobblercache.h
defines.h
@@ -52,8 +45,6 @@ SET(libscrobbler_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libscrobbler_RCC_SRCS ${libscrobbler_RCCS})
-QT4_WRAP_CPP(libscrobbler_MOC_SRCS ${libscrobbler_MOC_HDRS})
-
# user interface
@@ -66,7 +57,7 @@ QT4_WRAP_UI(libscrobbler_UIS_H ${libscrobbler_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(scrobbler MODULE ${libscrobbler_SRCS} ${libscrobbler_MOC_SRCS} ${libscrobbler_UIS_H}
+ADD_LIBRARY(scrobbler MODULE ${libscrobbler_SRCS} ${libscrobbler_UIS_H}
${libscrobbler_RCC_SRCS} ${libscrobbler_HDRS})
add_dependencies(scrobbler qmmpui)
target_link_libraries(scrobbler ${QT_LIBRARIES} -lqmmpui -lqmmp)
diff --git a/src/plugins/General/scrobbler/scrobbler.pro b/src/plugins/General/scrobbler/scrobbler.pro
index 8c24a01b8..ff34ea725 100644
--- a/src/plugins/General/scrobbler/scrobbler.pro
+++ b/src/plugins/General/scrobbler/scrobbler.pro
@@ -6,21 +6,6 @@ unix:QMAKE_LIBDIR += ../../../../lib
win32:QMAKE_LIBDIR += ../../../../bin
TARGET = $$PLUGINS_PREFIX/General/scrobbler
unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libscrobbler.so
-TRANSLATIONS = translations/scrobbler_plugin_cs.ts \
- translations/scrobbler_plugin_de.ts \
- translations/scrobbler_plugin_zh_CN.ts \
- translations/scrobbler_plugin_zh_TW.ts \
- translations/scrobbler_plugin_ru.ts \
- translations/scrobbler_plugin_pl.ts \
- translations/scrobbler_plugin_uk_UA.ts \
- translations/scrobbler_plugin_it.ts \
- translations/scrobbler_plugin_tr.ts \
- translations/scrobbler_plugin_lt.ts \
- translations/scrobbler_plugin_nl.ts \
- translations/scrobbler_plugin_ja.ts \
- translations/scrobbler_plugin_es.ts \
- translations/scrobbler_plugin_sr_BA.ts \
- translations/scrobbler_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/General/statusicon/CMakeLists.txt b/src/plugins/General/statusicon/CMakeLists.txt
index f912b11a5..b9cb7ff5c 100644
--- a/src/plugins/General/statusicon/CMakeLists.txt
+++ b/src/plugins/General/statusicon/CMakeLists.txt
@@ -36,23 +36,12 @@ SET(libstatusicon_SRCS
coverwidget.cpp
)
-SET(libstatusicon_MOC_HDRS
- settingsdialog.h
- statusiconfactory.h
- statusicon.h
- qmmptrayicon.h
- statusiconpopupwidget.h
- coverwidget.h
-)
-
SET(libstatusicon_RCCS
translations/translations.qrc
images/tray_images.qrc)
QT4_ADD_RESOURCES(libstatusicon_RCC_SRCS ${libstatusicon_RCCS})
-QT4_WRAP_CPP(libstatusicon_MOC_SRCS ${libstatusicon_MOC_HDRS})
-
# user interface
@@ -65,7 +54,7 @@ QT4_WRAP_UI(libstatusicon_UIS_H ${libstatusicon_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(statusicon MODULE ${libstatusicon_SRCS} ${libstatusicon_MOC_SRCS} ${libstatusicon_UIS_H} ${libstatusicon_RCC_SRCS})
+ADD_LIBRARY(statusicon MODULE ${libstatusicon_SRCS} ${libstatusicon_UIS_H} ${libstatusicon_RCC_SRCS})
add_dependencies(statusicon qmmpui libqmmp)
target_link_libraries(statusicon ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS statusicon DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/statusicon/statusicon.pro b/src/plugins/General/statusicon/statusicon.pro
index 3f201fd83..3da40e0b6 100644
--- a/src/plugins/General/statusicon/statusicon.pro
+++ b/src/plugins/General/statusicon/statusicon.pro
@@ -6,34 +6,19 @@ unix:TARGET = $$PLUGINS_PREFIX/General/statusicon
unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libstatusicon.so
win32:TARGET = $$PLUGINS_PREFIX/General/statusicon
TEMPLATE = lib
-unix {
+unix {
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmpui \
-lqmmp
}
-win32 {
+win32 {
QMAKE_LIBDIR += ../../../../bin
LIBS += -lqmmpui0 \
-lqmmp0
}
-TRANSLATIONS = translations/statusicon_plugin_cs.ts \
- translations/statusicon_plugin_de.ts \
- translations/statusicon_plugin_zh_CN.ts \
- translations/statusicon_plugin_zh_TW.ts \
- translations/statusicon_plugin_ru.ts \
- translations/statusicon_plugin_pl.ts \
- translations/statusicon_plugin_uk_UA.ts \
- translations/statusicon_plugin_it.ts \
- translations/statusicon_plugin_tr.ts \
- translations/statusicon_plugin_lt.ts \
- translations/statusicon_plugin_nl.ts \
- translations/statusicon_plugin_ja.ts \
- translations/statusicon_plugin_es.ts \
- translations/statusicon_plugin_sr_BA.ts \
- translations/statusicon_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
-unix {
+unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/General
INSTALLS += target
diff --git a/src/plugins/General/streambrowser/CMakeLists.txt b/src/plugins/General/streambrowser/CMakeLists.txt
index d1059701c..7cea884be 100644
--- a/src/plugins/General/streambrowser/CMakeLists.txt
+++ b/src/plugins/General/streambrowser/CMakeLists.txt
@@ -38,19 +38,11 @@ SET(libstreambrowser_SRCS
streamwindow.cpp
)
-SET(libstreambrowser_MOC_HDRS
- streambrowserfactory.h
- streambrowser.h
- streamwindow.h
-)
-
SET(libstreambrowser_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(libstreambrowser_RCC_SRCS ${libstreambrowser_RCCS})
-QT4_WRAP_CPP(libstreambrowser_MOC_SRCS ${libstreambrowser_MOC_HDRS})
-
# user interface
SET(libstreambrowser_UIS
@@ -62,7 +54,7 @@ QT4_WRAP_UI(libstreambrowser_UIS_H ${libstreambrowser_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(streambrowser MODULE ${libstreambrowser_SRCS} ${libstreambrowser_MOC_SRCS} ${libstreambrowser_UIS_H} ${libstreambrowser_RCC_SRCS})
+ADD_LIBRARY(streambrowser MODULE ${libstreambrowser_SRCS} ${libstreambrowser_UIS_H} ${libstreambrowser_RCC_SRCS})
add_dependencies(streambrowser qmmpui)
target_link_libraries(streambrowser ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS streambrowser DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/streambrowser/streambrowser.pro b/src/plugins/General/streambrowser/streambrowser.pro
index 0c8e5e797..abf3fcd26 100644
--- a/src/plugins/General/streambrowser/streambrowser.pro
+++ b/src/plugins/General/streambrowser/streambrowser.pro
@@ -15,21 +15,6 @@ unix:LIBS += -lqmmpui -lqmmp
win32:QMAKE_LIBDIR += ../../../../bin
win32:LIBS += -lqmmpui0 -lqmmp0
-TRANSLATIONS = translations/streambrowser_plugin_cs.ts \
- translations/streambrowser_plugin_de.ts \
- translations/streambrowser_plugin_zh_CN.ts \
- translations/streambrowser_plugin_zh_TW.ts \
- translations/streambrowser_plugin_ru.ts \
- translations/streambrowser_plugin_pl.ts \
- translations/streambrowser_plugin_uk_UA.ts \
- translations/streambrowser_plugin_it.ts \
- translations/streambrowser_plugin_tr.ts \
- translations/streambrowser_plugin_lt.ts \
- translations/streambrowser_plugin_nl.ts \
- translations/streambrowser_plugin_ja.ts \
- translations/streambrowser_plugin_es.ts \
- translations/streambrowser_plugin_sr_BA.ts \
- translations/streambrowser_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
unix{
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/trackchange/CMakeLists.txt b/src/plugins/General/trackchange/CMakeLists.txt
index 99bdbe495..555ac570a 100644
--- a/src/plugins/General/trackchange/CMakeLists.txt
+++ b/src/plugins/General/trackchange/CMakeLists.txt
@@ -35,19 +35,11 @@ SET(libtrackchange_SRCS
settingsdialog.cpp
)
-SET(libtrackchange_MOC_HDRS
- trackchangefactory.h
- trackchange.h
- settingsdialog.h
-)
-
SET(libtrackchange_RCCS
translations/translations.qrc)
QT4_ADD_RESOURCES(libtrackchange_RCC_SRCS ${libtrackchange_RCCS})
-QT4_WRAP_CPP(libtrackchange_MOC_SRCS ${libtrackchange_MOC_HDRS})
-
# user interface
SET(libtrackchange_UIS
settingsdialog.ui
@@ -58,7 +50,7 @@ QT4_WRAP_UI(libtrackchange_UIS_H ${libtrackchange_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(trackchange MODULE ${libtrackchange_SRCS} ${libtrackchange_MOC_SRCS} ${libtrackchange_UIS_H} ${libtrackchange_RCC_SRCS})
+ADD_LIBRARY(trackchange MODULE ${libtrackchange_SRCS} ${libtrackchange_UIS_H} ${libtrackchange_RCC_SRCS})
add_dependencies(trackchange qmmpui)
target_link_libraries(trackchange ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS trackchange DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/udisks/CMakeLists.txt b/src/plugins/General/udisks/CMakeLists.txt
index 186c3ed5e..d62c54704 100644
--- a/src/plugins/General/udisks/CMakeLists.txt
+++ b/src/plugins/General/udisks/CMakeLists.txt
@@ -35,20 +35,10 @@ SET(libudisks_SRCS
settingsdialog.cpp
)
-SET(libudisks_MOC_HDRS
- udisksfactory.h
- udisksmanager.h
- udisksplugin.h
- udisksdevice.h
- settingsdialog.h
-)
-
SET(libudisks_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libudisks_RCC_SRCS ${libudisks_RCCS})
-QT4_WRAP_CPP(libudisks_MOC_SRCS ${libudisks_MOC_HDRS})
-
# user interface
SET(libudisks_UIS
@@ -60,7 +50,7 @@ QT4_WRAP_UI(libudisks_UIS_H ${libudisks_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(udisks MODULE ${libudisks_SRCS} ${libudisks_MOC_SRCS} ${libudisks_UIS_H} ${libudisks_RCC_SRCS})
+ADD_LIBRARY(udisks MODULE ${libudisks_SRCS} ${libudisks_UIS_H} ${libudisks_RCC_SRCS})
add_dependencies(udisks qmmpui)
target_link_libraries(udisks ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS udisks DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/udisks/udisks.pro b/src/plugins/General/udisks/udisks.pro
index c19fd5dc7..c6c906c29 100644
--- a/src/plugins/General/udisks/udisks.pro
+++ b/src/plugins/General/udisks/udisks.pro
@@ -11,22 +11,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libudisks.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/udisks_plugin_cs.ts \
- translations/udisks_plugin_de.ts \
- translations/udisks_plugin_zh_CN.ts \
- translations/udisks_plugin_zh_TW.ts \
- translations/udisks_plugin_ru.ts \
- translations/udisks_plugin_pl.ts \
- translations/udisks_plugin_uk_UA.ts \
- translations/udisks_plugin_it.ts \
- translations/udisks_plugin_tr.ts \
- translations/udisks_plugin_lt.ts \
- translations/udisks_plugin_nl.ts \
- translations/udisks_plugin_ja.ts \
- translations/udisks_plugin_es.ts \
- translations/udisks_plugin_sr_BA.ts \
- translations/udisks_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/General/udisks2/CMakeLists.txt b/src/plugins/General/udisks2/CMakeLists.txt
index fde34f804..b178936d1 100644
--- a/src/plugins/General/udisks2/CMakeLists.txt
+++ b/src/plugins/General/udisks2/CMakeLists.txt
@@ -35,20 +35,10 @@ SET(libudisks2_SRCS
settingsdialog.cpp
)
-SET(libudisks2_MOC_HDRS
- udisks2factory.h
- udisks2manager.h
- udisks2plugin.h
- udisks2device.h
- settingsdialog.h
-)
-
SET(libudisks2_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libudisks2_RCC_SRCS ${libudisks2_RCCS})
-QT4_WRAP_CPP(libudisks2_MOC_SRCS ${libudisks2_MOC_HDRS})
-
# user interface
SET(libudisks2_UIS
@@ -60,7 +50,7 @@ QT4_WRAP_UI(libudisks2_UIS_H ${libudisks2_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(udisks2 MODULE ${libudisks2_SRCS} ${libudisks2_MOC_SRCS} ${libudisks2_UIS_H} ${libudisks2_RCC_SRCS})
+ADD_LIBRARY(udisks2 MODULE ${libudisks2_SRCS} ${libudisks2_UIS_H} ${libudisks2_RCC_SRCS})
add_dependencies(udisks2 qmmpui)
target_link_libraries(udisks2 ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS udisks2 DESTINATION ${LIB_DIR}/qmmp/General)
diff --git a/src/plugins/General/udisks2/udisks2.pro b/src/plugins/General/udisks2/udisks2.pro
index 7c72fb4d8..7e76eb3f0 100644
--- a/src/plugins/General/udisks2/udisks2.pro
+++ b/src/plugins/General/udisks2/udisks2.pro
@@ -11,22 +11,6 @@ QMAKE_CLEAN = $$PLUGINS_PREFIX/General/libudisks2.so
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/udisks2_plugin_cs.ts \
- translations/udisks2_plugin_de.ts \
- translations/udisks2_plugin_zh_CN.ts \
- translations/udisks2_plugin_zh_TW.ts \
- translations/udisks2_plugin_ru.ts \
- translations/udisks2_plugin_pl.ts \
- translations/udisks2_plugin_uk_UA.ts \
- translations/udisks2_plugin_it.ts \
- translations/udisks2_plugin_tr.ts \
- translations/udisks2_plugin_lt.ts \
- translations/udisks2_plugin_nl.ts \
- translations/udisks2_plugin_ja.ts \
- translations/udisks2_plugin_es.ts \
- translations/udisks2_plugin_sr_BA.ts \
- translations/udisks2_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR){
diff --git a/src/plugins/Input/aac/CMakeLists.txt b/src/plugins/Input/aac/CMakeLists.txt
index 4daf39098..7238af106 100644
--- a/src/plugins/Input/aac/CMakeLists.txt
+++ b/src/plugins/Input/aac/CMakeLists.txt
@@ -74,23 +74,16 @@ SET(libaac_HDRS
aacfile.h
)
-SET(libaac_MOC_HDRS
- decoderaacfactory.h
- aacmetadatamodel.h
-)
-
SET(libaac_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libaac_RCC_SRCS ${libaac_RCCS})
-QT4_WRAP_CPP(libaac_MOC_SRCS ${libaac_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(FAAD_FOUND)
-ADD_LIBRARY(aac MODULE ${libaac_SRCS} ${libaac_MOC_SRCS} ${libaac_RCC_SRCS} ${libaac_HDRS})
+ADD_LIBRARY(aac MODULE ${libaac_SRCS} ${libaac_RCC_SRCS} ${libaac_HDRS})
add_dependencies(aac qmmp)
target_link_libraries(aac ${QT_LIBRARIES} -lqmmp -lfaad ${TAGLIB_LDFLAGS})
install(TARGETS aac DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/aac/aac.pro b/src/plugins/Input/aac/aac.pro
index 3dbabd407..b5759e714 100644
--- a/src/plugins/Input/aac/aac.pro
+++ b/src/plugins/Input/aac/aac.pro
@@ -1,5 +1,5 @@
include(../../plugins.pri)
-FORMS +=
+FORMS +=
HEADERS += decoderaacfactory.h \
decoder_aac.h \
aacfile.h \
@@ -21,21 +21,6 @@ LIBS += -lqmmp \
-L/usr/lib \
-I/usr/include
PKGCONFIG += taglib
-TRANSLATIONS = translations/aac_plugin_ru.ts \
- translations/aac_plugin_uk_UA.ts \
- translations/aac_plugin_zh_CN.ts \
- translations/aac_plugin_zh_TW.ts \
- translations/aac_plugin_cs.ts \
- translations/aac_plugin_pl.ts \
- translations/aac_plugin_de.ts \
- translations/aac_plugin_it.ts \
- translations/aac_plugin_tr.ts \
- translations/aac_plugin_lt.ts \
- translations/aac_plugin_nl.ts \
- translations/aac_plugin_ja.ts \
- translations/aac_plugin_es.ts \
- translations/aac_plugin_sr_BA.ts \
- translations/aac_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty(LIB_DIR):LIB_DIR = /lib
diff --git a/src/plugins/Input/cdaudio/CMakeLists.txt b/src/plugins/Input/cdaudio/CMakeLists.txt
index 59733fde9..dccfc530b 100644
--- a/src/plugins/Input/cdaudio/CMakeLists.txt
+++ b/src/plugins/Input/cdaudio/CMakeLists.txt
@@ -38,17 +38,10 @@ SET(libcdaudio_HDRS
decoder_cdaudio.h
)
-SET(libcdaudio_MOC_HDRS
- settingsdialog.h
- decodercdaudiofactory.h
-)
-
SET(libcdaudio_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libcdaudio_RCC_SRCS ${libcdaudio_RCCS})
-QT4_WRAP_CPP(libcdaudio_MOC_SRCS ${libcdaudio_MOC_HDRS})
-
# user interface
SET(libcdaudio_UIS
@@ -61,7 +54,7 @@ QT4_WRAP_UI(libcdaudio_UIS_H ${libcdaudio_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(CDIO_FOUND)
-ADD_LIBRARY(cdaudio MODULE ${libcdaudio_SRCS} ${libcdaudio_MOC_SRCS} ${libcdaudio_UIS_H} ${libcdaudio_RCC_SRCS}
+ADD_LIBRARY(cdaudio MODULE ${libcdaudio_SRCS} ${libcdaudio_UIS_H} ${libcdaudio_RCC_SRCS}
${libcdaudio_HDRS})
add_dependencies(cdaudio qmmp)
target_link_libraries(cdaudio ${QT_LIBRARIES} -lqmmp ${CDIO_LDFLAGS})
diff --git a/src/plugins/Input/cdaudio/cdaudio.pro b/src/plugins/Input/cdaudio/cdaudio.pro
index ec21e3ddf..903202edf 100644
--- a/src/plugins/Input/cdaudio/cdaudio.pro
+++ b/src/plugins/Input/cdaudio/cdaudio.pro
@@ -16,23 +16,6 @@ TEMPLATE = lib
TARGET =$$PLUGINS_PREFIX/Input/cdaudio
-
-TRANSLATIONS = translations/cdaudio_plugin_ru.ts \
- translations/cdaudio_plugin_uk_UA.ts \
- translations/cdaudio_plugin_zh_CN.ts \
- translations/cdaudio_plugin_zh_TW.ts \
- translations/cdaudio_plugin_cs.ts \
- translations/cdaudio_plugin_pl.ts \
- translations/cdaudio_plugin_de.ts \
- translations/cdaudio_plugin_it.ts \
- translations/cdaudio_plugin_tr.ts \
- translations/cdaudio_plugin_lt.ts \
- translations/cdaudio_plugin_nl.ts \
- translations/cdaudio_plugin_ja.ts \
- translations/cdaudio_plugin_es.ts \
- translations/cdaudio_plugin_sr_BA.ts \
- translations/cdaudio_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Input/cue/CMakeLists.txt b/src/plugins/Input/cue/CMakeLists.txt
index 9d1463696..ba2e4fe02 100644
--- a/src/plugins/Input/cue/CMakeLists.txt
+++ b/src/plugins/Input/cue/CMakeLists.txt
@@ -46,18 +46,10 @@ SET(libcue_HDRS
cueparser.h
)
-SET(libcue_MOC_HDRS
- decodercuefactory.h
- settingsdialog.h
- cuemetadatamodel.h
-)
-
SET(libcue_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libcue_RCC_SRCS ${libcue_RCCS})
-QT4_WRAP_CPP(libcue_MOC_SRCS ${libcue_MOC_HDRS})
-
# user interface
@@ -70,7 +62,7 @@ QT4_WRAP_UI(libcue_UIS_H ${libcue_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(cue MODULE ${libcue_SRCS} ${libcue_MOC_SRCS} ${libcue_RCC_SRCS} ${libcue_UIS_H} ${libcue_HDRS})
+ADD_LIBRARY(cue MODULE ${libcue_SRCS} ${libcue_RCC_SRCS} ${libcue_UIS_H} ${libcue_HDRS})
add_dependencies(cue qmmp)
IF(USE_ENCA AND ENCA_FOUND)
target_link_libraries(cue ${QT_LIBRARIES} -lqmmp ${ENCA_LDFLAGS})
diff --git a/src/plugins/Input/cue/cue.pro b/src/plugins/Input/cue/cue.pro
index c8f205eec..48fe2bda7 100644
--- a/src/plugins/Input/cue/cue.pro
+++ b/src/plugins/Input/cue/cue.pro
@@ -36,24 +36,8 @@ contains(CONFIG, WITH_ENCA){
}
-TRANSLATIONS = translations/cue_plugin_ru.ts \
- translations/cue_plugin_uk_UA.ts \
- translations/cue_plugin_zh_CN.ts \
- translations/cue_plugin_zh_TW.ts \
- translations/cue_plugin_cs.ts \
- translations/cue_plugin_pl.ts \
- translations/cue_plugin_de.ts \
- translations/cue_plugin_it.ts \
- translations/cue_plugin_tr.ts \
- translations/cue_plugin_lt.ts \
- translations/cue_plugin_nl.ts \
- translations/cue_plugin_ja.ts \
- translations/cue_plugin_es.ts \
- translations/cue_plugin_sr_BA.ts \
- translations/cue_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
-unix {
+unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/Input
desktop.files = qmmp_cue.desktop
diff --git a/src/plugins/Input/ffmpeg/CMakeLists.txt b/src/plugins/Input/ffmpeg/CMakeLists.txt
index b36645f98..615096abf 100644
--- a/src/plugins/Input/ffmpeg/CMakeLists.txt
+++ b/src/plugins/Input/ffmpeg/CMakeLists.txt
@@ -47,18 +47,10 @@ SET(libffmpeg_HDRS
decoder_ffmpeg.h
)
-SET(libffmpeg_MOC_HDRS
- decoderffmpegfactory.h
- ffmpegmetadatamodel.h
- settingsdialog.h
-)
-
SET(libffmpeg_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libffmpeg_RCC_SRCS ${libffmpeg_RCCS})
-QT4_WRAP_CPP(libffmpeg_MOC_SRCS ${libffmpeg_MOC_HDRS})
-
# user interface
@@ -72,7 +64,7 @@ QT4_WRAP_UI(libffmpeg_UIS_H ${libffmpeg_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(FFMPEG_FOUND)
-ADD_LIBRARY(ffmpeg MODULE ${libffmpeg_SRCS} ${libffmpeg_MOC_SRCS} ${libffmpeg_UIS_H}
+ADD_LIBRARY(ffmpeg MODULE ${libffmpeg_SRCS} ${libffmpeg_UIS_H}
${libffmpeg_RCC_SRCS} ${libffmpeg_HDRS})
add_dependencies(ffmpeg qmmp)
target_link_libraries(ffmpeg ${QT_LIBRARIES} -lqmmp ${FFMPEG_LDFLAGS})
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
index 41ed21a8f..3e4304d89 100644
--- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
+++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -112,6 +112,7 @@ bool DecoderFFmpeg::initialize()
ic = avformat_alloc_context();
AVProbeData pd;
+ memset(&pd, 0, sizeof(pd));
uint8_t buf[PROBE_BUFFER_SIZE + AVPROBE_PADDING_SIZE];
pd.filename = m_path.toLocal8Bit().constData();
pd.buf_size = input()->peek((char*)buf, sizeof(buf) - AVPROBE_PADDING_SIZE);
diff --git a/src/plugins/Input/ffmpeg/ffmpeg.pro b/src/plugins/Input/ffmpeg/ffmpeg.pro
index a1b0458d6..0897240ff 100644
--- a/src/plugins/Input/ffmpeg/ffmpeg.pro
+++ b/src/plugins/Input/ffmpeg/ffmpeg.pro
@@ -40,21 +40,4 @@ win32 {
DEFINES += __STDC_CONSTANT_MACROS
-TRANSLATIONS = translations/ffmpeg_plugin_ru.ts \
- translations/ffmpeg_plugin_uk_UA.ts \
- translations/ffmpeg_plugin_zh_CN.ts \
- translations/ffmpeg_plugin_zh_TW.ts \
- translations/ffmpeg_plugin_cs.ts \
- translations/ffmpeg_plugin_pl.ts \
- translations/ffmpeg_plugin_de.ts \
- translations/ffmpeg_plugin_it.ts \
- translations/ffmpeg_plugin_tr.ts \
- translations/ffmpeg_plugin_lt.ts \
- translations/ffmpeg_plugin_nl.ts \
- translations/ffmpeg_plugin_ja.ts \
- translations/ffmpeg_plugin_es.ts \
- translations/ffmpeg_plugin_sr_BA.ts \
- translations/ffmpeg_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
-
diff --git a/src/plugins/Input/ffmpeg_legacy/CMakeLists.txt b/src/plugins/Input/ffmpeg_legacy/CMakeLists.txt
index f480476dd..a6e295a41 100644
--- a/src/plugins/Input/ffmpeg_legacy/CMakeLists.txt
+++ b/src/plugins/Input/ffmpeg_legacy/CMakeLists.txt
@@ -53,18 +53,10 @@ SET(libffmpeg_HDRS
decoder_ffmpeg.h
)
-SET(libffmpeg_MOC_HDRS
- decoderffmpegfactory.h
- ffmpegmetadatamodel.h
- settingsdialog.h
-)
-
SET(libffmpeg_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libffmpeg_RCC_SRCS ${libffmpeg_RCCS})
-QT4_WRAP_CPP(libffmpeg_MOC_SRCS ${libffmpeg_MOC_HDRS})
-
# user interface
@@ -78,7 +70,7 @@ QT4_WRAP_UI(libffmpeg_UIS_H ${libffmpeg_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(FFMPEG_LEGACY_FOUND)
-ADD_LIBRARY(ffmpeg_legacy MODULE ${libffmpeg_SRCS} ${libffmpeg_MOC_SRCS} ${libffmpeg_UIS_H}
+ADD_LIBRARY(ffmpeg_legacy MODULE ${libffmpeg_SRCS} ${libffmpeg_UIS_H}
${libffmpeg_RCC_SRCS} ${libffmpeg_HDRS})
add_dependencies(ffmpeg_legacy qmmp)
target_link_libraries(ffmpeg_legacy ${QT_LIBRARIES} -lqmmp ${FFMPEG_LEGACY_LDFLAGS})
diff --git a/src/plugins/Input/ffmpeg_legacy/ffmpeg_legacy.pro b/src/plugins/Input/ffmpeg_legacy/ffmpeg_legacy.pro
index 6713487e1..1e92b1976 100644
--- a/src/plugins/Input/ffmpeg_legacy/ffmpeg_legacy.pro
+++ b/src/plugins/Input/ffmpeg_legacy/ffmpeg_legacy.pro
@@ -40,21 +40,5 @@ win32 {
DEFINES += __STDC_CONSTANT_MACROS
-TRANSLATIONS = translations/ffmpeg_plugin_legacy_ru.ts \
- translations/ffmpeg_plugin_legacy_uk_UA.ts \
- translations/ffmpeg_plugin_legacy_zh_CN.ts \
- translations/ffmpeg_plugin_legacy_zh_TW.ts \
- translations/ffmpeg_plugin_legacy_cs.ts \
- translations/ffmpeg_plugin_legacy_pl.ts \
- translations/ffmpeg_plugin_legacy_de.ts \
- translations/ffmpeg_plugin_legacy_it.ts \
- translations/ffmpeg_plugin_legacy_tr.ts \
- translations/ffmpeg_plugin_legacy_lt.ts \
- translations/ffmpeg_plugin_legacy_nl.ts \
- translations/ffmpeg_plugin_legacy_ja.ts \
- translations/ffmpeg_plugin_legacy_es.ts \
- translations/ffmpeg_plugin_legacy_sr_BA.ts \
- translations/ffmpeg_plugin_legacy_sr_RS.ts
-
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Input/flac/CMakeLists.txt b/src/plugins/Input/flac/CMakeLists.txt
index 5fc0b81c8..5611d5325 100644
--- a/src/plugins/Input/flac/CMakeLists.txt
+++ b/src/plugins/Input/flac/CMakeLists.txt
@@ -52,23 +52,16 @@ SET(libflac_HDRS
replaygainreader.h
)
-SET(libflac_MOC_HDRS
- decoderflacfactory.h
- flacmetadatamodel.h
-)
-
SET(libflac_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libflac_RCC_SRCS ${libflac_RCCS})
-QT4_WRAP_CPP(libflac_MOC_SRCS ${libflac_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(FLAC_FOUND)
-ADD_LIBRARY(flac MODULE ${libflac_SRCS} ${libflac_MOC_SRCS} ${libflac_RCC_SRCS} ${libflac_HDRS})
+ADD_LIBRARY(flac MODULE ${libflac_SRCS} ${libflac_RCC_SRCS} ${libflac_HDRS})
add_dependencies(flac qmmp)
target_link_libraries(flac ${QT_LIBRARIES} -lqmmp ${FLAC_LDFLAGS} ${TAGLIB_LDFLAGS})
install(TARGETS flac DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/flac/flac.pro b/src/plugins/Input/flac/flac.pro
index 45a78077a..e412b1eb4 100644
--- a/src/plugins/Input/flac/flac.pro
+++ b/src/plugins/Input/flac/flac.pro
@@ -1,5 +1,5 @@
include(../../plugins.pri)
-FORMS +=
+FORMS +=
HEADERS += decoderflacfactory.h \
decoder_flac.h \
cueparser.h \
@@ -19,23 +19,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/flac_plugin_ru.ts \
- translations/flac_plugin_uk_UA.ts \
- translations/flac_plugin_zh_CN.ts \
- translations/flac_plugin_zh_TW.ts \
- translations/flac_plugin_cs.ts \
- translations/flac_plugin_pl.ts \
- translations/flac_plugin_de.ts \
- translations/flac_plugin_it.ts \
- translations/flac_plugin_tr.ts \
- translations/flac_plugin_lt.ts \
- translations/flac_plugin_nl.ts \
- translations/flac_plugin_ja.ts \
- translations/flac_plugin_es.ts \
- translations/flac_plugin_sr_BA.ts \
- translations/flac_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Input/gme/CMakeLists.txt b/src/plugins/Input/gme/CMakeLists.txt
index fd871ca1b..b4aca13cf 100644
--- a/src/plugins/Input/gme/CMakeLists.txt
+++ b/src/plugins/Input/gme/CMakeLists.txt
@@ -49,22 +49,16 @@ SET(libgme_HDRS
gmehelper.h
)
-SET(libgme_MOC_HDRS
- decodergmefactory.h
-)
-
SET(libgme_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libgme_RCC_SRCS ${libgme_RCCS})
-QT4_WRAP_CPP(libgme_MOC_SRCS ${libgme_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(GME_FOUND)
-ADD_LIBRARY(gme MODULE ${libgme_SRCS} ${libgme_MOC_SRCS} ${libgme_RCC_SRCS} ${libgme_HDRS})
+ADD_LIBRARY(gme MODULE ${libgme_SRCS} ${libgme_RCC_SRCS} ${libgme_HDRS})
add_dependencies(gme qmmp)
target_link_libraries(gme ${QT_LIBRARIES} -lqmmp ${GME_LIB})
install(TARGETS gme DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/gme/gme.pro b/src/plugins/Input/gme/gme.pro
index 668189ebc..76728e884 100644
--- a/src/plugins/Input/gme/gme.pro
+++ b/src/plugins/Input/gme/gme.pro
@@ -13,21 +13,6 @@ CONFIG += warn_on \
plugin
TEMPLATE = lib
-TRANSLATIONS = translations/gme_plugin_it.ts \
- translations/gme_plugin_ru.ts \
- translations/gme_plugin_cs.ts \
- translations/gme_plugin_de.ts \
- translations/gme_plugin_zh_CN.ts \
- translations/gme_plugin_zh_TW.ts \
- translations/gme_plugin_uk_UA.ts \
- translations/gme_plugin_pl.ts \
- translations/gme_plugin_tr.ts \
- translations/gme_plugin_lt.ts \
- translations/gme_plugin_nl.ts \
- translations/gme_plugin_ja.ts \
- translations/gme_plugin_sr_BA.ts \
- translations/gme_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix{
diff --git a/src/plugins/Input/mad/CMakeLists.txt b/src/plugins/Input/mad/CMakeLists.txt
index 7120face0..e44c74d75 100644
--- a/src/plugins/Input/mad/CMakeLists.txt
+++ b/src/plugins/Input/mad/CMakeLists.txt
@@ -48,18 +48,10 @@ SET(libmad_HDRS
replaygainreader.h
)
-SET(libmad_MOC_HDRS
- settingsdialog.h
- decodermadfactory.h
- mpegmetadatamodel.h
-)
-
SET(libmad_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmad_RCC_SRCS ${libmad_RCCS})
-QT4_WRAP_CPP(libmad_MOC_SRCS ${libmad_MOC_HDRS})
-
# user interface
@@ -73,7 +65,7 @@ QT4_WRAP_UI(libmad_UIS_H ${libmad_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(MAD_FOUND)
-ADD_LIBRARY(mad MODULE ${libmad_SRCS} ${libmad_MOC_SRCS} ${libmad_UIS_H} ${libmad_RCC_SRCS} ${libmad_HDRS})
+ADD_LIBRARY(mad MODULE ${libmad_SRCS} ${libmad_UIS_H} ${libmad_RCC_SRCS} ${libmad_HDRS})
add_dependencies(mad qmmp)
target_link_libraries(mad ${QT_LIBRARIES} -lqmmp ${MAD_LDFLAGS} ${TAGLIB_LDFLAGS})
install(TARGETS mad DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/mad/mad.pro b/src/plugins/Input/mad/mad.pro
index 74f902380..e7d9156db 100644
--- a/src/plugins/Input/mad/mad.pro
+++ b/src/plugins/Input/mad/mad.pro
@@ -21,26 +21,8 @@ CONFIG += warn_on \
link_pkgconfig
TEMPLATE = lib
-
-TRANSLATIONS = translations/mad_plugin_ru.ts \
- translations/mad_plugin_uk_UA.ts \
- translations/mad_plugin_zh_CN.ts \
- translations/mad_plugin_zh_TW.ts \
- translations/mad_plugin_cs.ts \
- translations/mad_plugin_pl.ts \
- translations/mad_plugin_de.ts \
- translations/mad_plugin_it.ts \
- translations/mad_plugin_tr.ts \
- translations/mad_plugin_tr.ts \
- translations/mad_plugin_lt.ts \
- translations/mad_plugin_nl.ts \
- translations/mad_plugin_ja.ts \
- translations/mad_plugin_es.ts \
- translations/mad_plugin_sr_BA.ts \
- translations/mad_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
-unix {
+unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/Input
INSTALLS += target
diff --git a/src/plugins/Input/modplug/CMakeLists.txt b/src/plugins/Input/modplug/CMakeLists.txt
index cbc000843..bc38fee1e 100644
--- a/src/plugins/Input/modplug/CMakeLists.txt
+++ b/src/plugins/Input/modplug/CMakeLists.txt
@@ -58,20 +58,10 @@ SET(libmodplug_HDRS
decoder_modplug.h
)
-SET(libmodplug_MOC_HDRS
- decodermodplugfactory.h
-
- modplugmetadatamodel.h
- settingsdialog.h
- archivereader.h
-)
-
SET(libmodplug_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmodplug_RCC_SRCS ${libmodplug_RCCS})
-QT4_WRAP_CPP(libmodplug_MOC_SRCS ${libmodplug_MOC_HDRS})
-
# user interface
SET(libmodplug_UIS
@@ -84,7 +74,7 @@ QT4_WRAP_UI(libmodplug_UIS_H ${libmodplug_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(MODPLUG_FOUND)
-ADD_LIBRARY(modplug MODULE ${libmodplug_SRCS} ${libmodplug_MOC_SRCS} ${libmodplug_UIS_H}
+ADD_LIBRARY(modplug MODULE ${libmodplug_SRCS} ${libmodplug_UIS_H}
${libmodplug_RCC_SRCS} ${libmodplug_HDRS})
add_dependencies(modplug qmmp)
target_link_libraries(modplug ${QT_LIBRARIES} -lqmmp ${MODPLUG_LDFLAGS})
diff --git a/src/plugins/Input/modplug/modplug.pro b/src/plugins/Input/modplug/modplug.pro
index 90a067a48..dc2d5a9bb 100644
--- a/src/plugins/Input/modplug/modplug.pro
+++ b/src/plugins/Input/modplug/modplug.pro
@@ -21,23 +21,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/modplug_plugin_cs.ts \
- translations/modplug_plugin_de.ts \
- translations/modplug_plugin_zh_CN.ts \
- translations/modplug_plugin_zh_TW.ts \
- translations/modplug_plugin_ru.ts \
- translations/modplug_plugin_pl.ts \
- translations/modplug_plugin_uk_UA.ts \
- translations/modplug_plugin_it.ts \
- translations/modplug_plugin_tr.ts \
- translations/modplug_plugin_lt.ts \
- translations/modplug_plugin_nl.ts \
- translations/modplug_plugin_ja.ts \
- translations/modplug_plugin_es.ts \
- translations/modplug_plugin_sr_BA.ts \
- translations/modplug_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Input/mpc/CMakeLists.txt b/src/plugins/Input/mpc/CMakeLists.txt
index c8bdd0860..71b13b439 100644
--- a/src/plugins/Input/mpc/CMakeLists.txt
+++ b/src/plugins/Input/mpc/CMakeLists.txt
@@ -57,21 +57,14 @@ SET(libmpc_HDRS
decoder_mpc.h
)
-SET(libmpc_MOC_HDRS
- decodermpcfactory.h
- mpcmetadatamodel.h
-)
-
SET(libmpc_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmpc_RCC_SRCS ${libmpc_RCCS})
-QT4_WRAP_CPP(libmpc_MOC_SRCS ${libmpc_MOC_HDRS})
-
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(MPC_FOUND)
-ADD_LIBRARY(mpc MODULE ${libmpc_SRCS} ${libmpc_MOC_SRCS} ${libmpc_RCC_SRCS} ${libmpc_HDRS})
+ADD_LIBRARY(mpc MODULE ${libmpc_SRCS} ${libmpc_RCC_SRCS} ${libmpc_HDRS})
add_dependencies(mpc qmmp)
target_link_libraries(mpc ${QT_LIBRARIES} -lqmmp ${MPC_LIB} ${TAGLIB_LDFLAGS})
install(TARGETS mpc DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/mpc/mpc.pro b/src/plugins/Input/mpc/mpc.pro
index 41ef3d4c6..93ed9df2c 100644
--- a/src/plugins/Input/mpc/mpc.pro
+++ b/src/plugins/Input/mpc/mpc.pro
@@ -1,5 +1,5 @@
include(../../plugins.pri)
-FORMS +=
+FORMS +=
HEADERS += decodermpcfactory.h \
decoder_mpc.h \
mpcmetadatamodel.h
@@ -15,22 +15,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-TRANSLATIONS = translations/mpc_plugin_ru.ts \
- translations/mpc_plugin_uk_UA.ts \
- translations/mpc_plugin_zh_CN.ts \
- translations/mpc_plugin_zh_TW.ts \
- translations/mpc_plugin_cs.ts \
- translations/mpc_plugin_pl.ts \
- translations/mpc_plugin_de.ts \
- translations/mpc_plugin_it.ts \
- translations/mpc_plugin_tr.ts \
- translations/mpc_plugin_lt.ts \
- translations/mpc_plugin_nl.ts \
- translations/mpc_plugin_ja.ts \
- translations/mpc_plugin_es.ts \
- translations/mpc_plugin_sr_BA.ts \
- translations/mpc_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
diff --git a/src/plugins/Input/opus/CMakeLists.txt b/src/plugins/Input/opus/CMakeLists.txt
index a34b087b1..ac4b72d6a 100644
--- a/src/plugins/Input/opus/CMakeLists.txt
+++ b/src/plugins/Input/opus/CMakeLists.txt
@@ -50,17 +50,10 @@ SET(libopus_HDRS
tdebug.h
)
-SET(libopus_MOC_HDRS
- decoderopusfactory.h
- opusmetadatamodel.h
-)
-
SET(libopus_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libopus_RCC_SRCS ${libopus_RCCS})
-QT4_WRAP_CPP(libopus_MOC_SRCS ${libopus_MOC_HDRS})
-
# user interface
QT4_WRAP_UI(libopus_UIS_H ${libopus_UIS})
@@ -69,7 +62,7 @@ QT4_WRAP_UI(libopus_UIS_H ${libopus_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(OPUS_FOUND)
-ADD_LIBRARY(opus MODULE ${libopus_SRCS} ${libopus_MOC_SRCS} ${libopus_RCC_SRCS} ${libopus_HDRS})
+ADD_LIBRARY(opus MODULE ${libopus_SRCS} ${libopus_RCC_SRCS} ${libopus_HDRS})
add_dependencies(opus qmmp)
target_link_libraries(opus ${QT_LIBRARIES} -lqmmp ${OPUS_LDFLAGS} ${TAGLIB_LDFLAGS})
install(TARGETS opus DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/opus/opus.pro b/src/plugins/Input/opus/opus.pro
index 911606ee0..3276e6f7b 100644
--- a/src/plugins/Input/opus/opus.pro
+++ b/src/plugins/Input/opus/opus.pro
@@ -23,23 +23,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/opus_plugin_ru.ts \
- translations/opus_plugin_uk_UA.ts \
- translations/opus_plugin_zh_CN.ts \
- translations/opus_plugin_zh_TW.ts \
- translations/opus_plugin_cs.ts \
- translations/opus_plugin_pl.ts \
- translations/opus_plugin_de.ts \
- translations/opus_plugin_it.ts \
- translations/opus_plugin_tr.ts \
- translations/opus_plugin_lt.ts \
- translations/opus_plugin_nl.ts \
- translations/opus_plugin_ja.ts \
- translations/opus_plugin_es.ts \
- translations/opus_plugin_sr_BA.ts \
- translations/opus_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Input/sid/CMakeLists.txt b/src/plugins/Input/sid/CMakeLists.txt
index 2fd786dc9..db662630f 100644
--- a/src/plugins/Input/sid/CMakeLists.txt
+++ b/src/plugins/Input/sid/CMakeLists.txt
@@ -46,17 +46,10 @@ SET(libsid_HDRS
sidhelper.h
)
-SET(libsid_MOC_HDRS
- decodersidfactory.h
- settingsdialog.h
-)
-
SET(libsid_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libsid_RCC_SRCS ${libsid_RCCS})
-QT4_WRAP_CPP(libsid_MOC_SRCS ${libsid_MOC_HDRS})
-
# user interface
SET(libsid_UIS
@@ -69,7 +62,7 @@ QT4_WRAP_UI(libsid_UIS_H ${libsid_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(SIDPLAYFP_FOUND)
-ADD_LIBRARY(sid MODULE ${libsid_SRCS} ${libsid_MOC_SRCS} ${libsid_UIS_H}
+ADD_LIBRARY(sid MODULE ${libsid_SRCS} ${libsid_UIS_H}
${libsid_RCC_SRCS} ${libsid_HDRS})
add_dependencies(sid qmmp)
target_link_libraries(sid ${QT_LIBRARIES} -lqmmp ${SIDPLAYFP_LDFLAGS})
diff --git a/src/plugins/Input/sndfile/CMakeLists.txt b/src/plugins/Input/sndfile/CMakeLists.txt
index 4e96aca36..30467ce26 100644
--- a/src/plugins/Input/sndfile/CMakeLists.txt
+++ b/src/plugins/Input/sndfile/CMakeLists.txt
@@ -41,23 +41,16 @@ SET(libsndfile_HDRS
decoder_sndfile.h
)
-SET(libsndfile_MOC_HDRS
- decodersndfilefactory.h
-)
-
SET(libsndfile_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libsndfile_RCC_SRCS ${libsndfile_RCCS})
-QT4_WRAP_CPP(libsndfile_MOC_SRCS ${libsndfile_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(SNDFILE_FOUND)
-ADD_LIBRARY(sndfile MODULE ${libsndfile_SRCS} ${libsndfile_MOC_SRCS} ${libsndfile_UIS_H}
+ADD_LIBRARY(sndfile MODULE ${libsndfile_SRCS} ${libsndfile_UIS_H}
${libsndfile_RCC_SRCS} ${libsndfile_HDRS})
add_dependencies(sndfile qmmp)
target_link_libraries(sndfile ${QT_LIBRARIES} -lqmmp ${SNDFILE_LDFLAGS})
diff --git a/src/plugins/Input/sndfile/sndfile.pro b/src/plugins/Input/sndfile/sndfile.pro
index 6aa7ed26f..c583386e5 100644
--- a/src/plugins/Input/sndfile/sndfile.pro
+++ b/src/plugins/Input/sndfile/sndfile.pro
@@ -1,7 +1,7 @@
include(../../plugins.pri)
HEADERS += decodersndfilefactory.h \
- decoder_sndfile.h
+ decoder_sndfile.h
SOURCES += decoder_sndfile.cpp \
decodersndfilefactory.cpp
@@ -17,23 +17,6 @@ TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/sndfile_plugin_cs.ts \
- translations/sndfile_plugin_de.ts \
- translations/sndfile_plugin_zh_CN.ts \
- translations/sndfile_plugin_zh_TW.ts \
- translations/sndfile_plugin_ru.ts \
- translations/sndfile_plugin_pl.ts \
- translations/sndfile_plugin_uk_UA.ts \
- translations/sndfile_plugin_it.ts \
- translations/sndfile_plugin_tr.ts \
- translations/sndfile_plugin_lt.ts \
- translations/sndfile_plugin_nl.ts \
- translations/sndfile_plugin_ja.ts \
- translations/sndfile_plugin_es.ts \
- translations/sndfile_plugin_sr_BA.ts \
- translations/sndfile_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Input/vorbis/CMakeLists.txt b/src/plugins/Input/vorbis/CMakeLists.txt
index c3ae5fe4d..009decbee 100644
--- a/src/plugins/Input/vorbis/CMakeLists.txt
+++ b/src/plugins/Input/vorbis/CMakeLists.txt
@@ -44,17 +44,10 @@ SET(libvorbis_HDRS
replaygainreader.h
)
-SET(libvorbis_MOC_HDRS
- decodervorbisfactory.h
- vorbismetadatamodel.h
-)
-
SET(libvorbis_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libvorbis_RCC_SRCS ${libvorbis_RCCS})
-QT4_WRAP_CPP(libvorbis_MOC_SRCS ${libvorbis_MOC_HDRS})
-
# user interface
QT4_WRAP_UI(libvorbis_UIS_H ${libvorbis_UIS})
@@ -63,7 +56,7 @@ QT4_WRAP_UI(libvorbis_UIS_H ${libvorbis_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(VORBIS_FOUND)
-ADD_LIBRARY(vorbis MODULE ${libvorbis_SRCS} ${libvorbis_MOC_SRCS} ${libvorbis_RCC_SRCS} ${libvorbis_HDRS})
+ADD_LIBRARY(vorbis MODULE ${libvorbis_SRCS} ${libvorbis_RCC_SRCS} ${libvorbis_HDRS})
add_dependencies(vorbis qmmp)
target_link_libraries(vorbis ${QT_LIBRARIES} -lqmmp ${VORBIS_LDFLAGS} ${TAGLIB_LDFLAGS})
install(TARGETS vorbis DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/vorbis/vorbis.pro b/src/plugins/Input/vorbis/vorbis.pro
index 00255ec8d..1e841171c 100644
--- a/src/plugins/Input/vorbis/vorbis.pro
+++ b/src/plugins/Input/vorbis/vorbis.pro
@@ -1,5 +1,5 @@
include(../../plugins.pri)
-FORMS +=
+FORMS +=
HEADERS += decodervorbisfactory.h \
decoder_vorbis.h \
vorbismetadatamodel.h \
@@ -17,23 +17,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/vorbis_plugin_ru.ts \
- translations/vorbis_plugin_uk_UA.ts \
- translations/vorbis_plugin_zh_CN.ts \
- translations/vorbis_plugin_zh_TW.ts \
- translations/vorbis_plugin_cs.ts \
- translations/vorbis_plugin_pl.ts \
- translations/vorbis_plugin_de.ts \
- translations/vorbis_plugin_it.ts \
- translations/vorbis_plugin_tr.ts \
- translations/vorbis_plugin_lt.ts \
- translations/vorbis_plugin_nl.ts \
- translations/vorbis_plugin_ja.ts \
- translations/vorbis_plugin_es.ts \
- translations/vorbis_plugin_sr_BA.ts \
- translations/vorbis_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Input/wavpack/CMakeLists.txt b/src/plugins/Input/wavpack/CMakeLists.txt
index 2ef6f2465..55c1dc464 100644
--- a/src/plugins/Input/wavpack/CMakeLists.txt
+++ b/src/plugins/Input/wavpack/CMakeLists.txt
@@ -46,21 +46,14 @@ SET(libwavpack_HDRS
replaygainreader.h
)
-SET(libwavpack_MOC_HDRS
- decoderwavpackfactory.h
- wavpackmetadatamodel.h
-)
-
SET(libwavpack_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libwavpack_RCC_SRCS ${libwavpack_RCCS})
-QT4_WRAP_CPP(libwavpack_MOC_SRCS ${libwavpack_MOC_HDRS})
-
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(WAVPACK_FOUND)
-ADD_LIBRARY(wavpack MODULE ${libwavpack_SRCS} ${libwavpack_MOC_SRCS} ${libwavpack_RCC_SRCS} ${libwavpack_HDRS})
+ADD_LIBRARY(wavpack MODULE ${libwavpack_SRCS} ${libwavpack_RCC_SRCS} ${libwavpack_HDRS})
add_dependencies(wavpack qmmp)
target_link_libraries(wavpack ${QT_LIBRARIES} -lqmmp ${WAVPACK_LDFLAGS})
install(TARGETS wavpack DESTINATION ${LIB_DIR}/qmmp/Input)
diff --git a/src/plugins/Input/wavpack/wavpack.pro b/src/plugins/Input/wavpack/wavpack.pro
index 37d8b9f9c..b8b4b28b9 100644
--- a/src/plugins/Input/wavpack/wavpack.pro
+++ b/src/plugins/Input/wavpack/wavpack.pro
@@ -1,5 +1,5 @@
include(../../plugins.pri)
-FORMS +=
+FORMS +=
HEADERS += decoderwavpackfactory.h \
decoder_wavpack.h \
cueparser.h \
@@ -19,23 +19,6 @@ CONFIG += warn_on \
TEMPLATE = lib
QMAKE_LIBDIR += ../../../../lib
-
-TRANSLATIONS = translations/wavpack_plugin_cs.ts \
- translations/wavpack_plugin_de.ts \
- translations/wavpack_plugin_zh_CN.ts \
- translations/wavpack_plugin_zh_TW.ts \
- translations/wavpack_plugin_ru.ts \
- translations/wavpack_plugin_pl.ts \
- translations/wavpack_plugin_uk_UA.ts \
- translations/wavpack_plugin_it.ts \
- translations/wavpack_plugin_tr.ts \
- translations/wavpack_plugin_lt.ts \
- translations/wavpack_plugin_nl.ts \
- translations/wavpack_plugin_ja.ts \
- translations/wavpack_plugin_es.ts \
- translations/wavpack_plugin_sr_BA.ts \
- translations/wavpack_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Input/wildmidi/CMakeLists.txt b/src/plugins/Input/wildmidi/CMakeLists.txt
index a99a958fe..f24e9862f 100644
--- a/src/plugins/Input/wildmidi/CMakeLists.txt
+++ b/src/plugins/Input/wildmidi/CMakeLists.txt
@@ -40,13 +40,6 @@ SET(libwildmidi_HDRS
decoder_wildmidi.h
)
-SET(libwildmidi_MOC_HDRS
-
- decoderwildmidifactory.h
- settingsdialog.h
- wildmidihelper.h
-)
-
# libwildmidi
CHECK_INCLUDE_FILE(wildmidi_lib.h WILDMIDI_HEADER_FOUND)
FIND_LIBRARY(WILDMIDI_LIB NAME WildMidi PATHS /usr/lib /usr/lib32 /usr/local/lib /usr/local/lib32)
@@ -62,8 +55,6 @@ SET(libwildmidi_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libwildmidi_RCC_SRCS ${libwildmidi_RCCS})
-QT4_WRAP_CPP(libwildmidi_MOC_SRCS ${libwildmidi_MOC_HDRS})
-
# user interface
@@ -77,7 +68,7 @@ QT4_WRAP_UI(libwildmidi_UIS_H ${libwildmidi_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(WILDMIDI_FOUND)
-ADD_LIBRARY(wildmidi MODULE ${libwildmidi_SRCS} ${libwildmidi_MOC_SRCS} ${libwildmidi_UIS_H} ${libwildmidi_RCC_SRCS}
+ADD_LIBRARY(wildmidi MODULE ${libwildmidi_SRCS} ${libwildmidi_UIS_H} ${libwildmidi_RCC_SRCS}
${libwildmidi_HDRS})
add_dependencies(wildmidi qmmp)
target_link_libraries(wildmidi ${QT_LIBRARIES} -lqmmp ${WILDMIDI_LIB})
diff --git a/src/plugins/Input/wildmidi/wildmidi.pro b/src/plugins/Input/wildmidi/wildmidi.pro
index 1f4819946..566489524 100644
--- a/src/plugins/Input/wildmidi/wildmidi.pro
+++ b/src/plugins/Input/wildmidi/wildmidi.pro
@@ -19,20 +19,6 @@ LIBS += -lqmmp \
-L/usr/lib \
-I/usr/include \
-lWildMidi
-TRANSLATIONS = translations/wildmidi_plugin_it.ts \
- translations/wildmidi_plugin_ru.ts \
- translations/wildmidi_plugin_cs.ts \
- translations/wildmidi_plugin_de.ts \
- translations/wildmidi_plugin_zh_CN.ts \
- translations/wildmidi_plugin_zh_TW.ts \
- translations/wildmidi_plugin_uk_UA.ts \
- translations/wildmidi_plugin_pl.ts \
- translations/wildmidi_plugin_tr.ts \
- translations/wildmidi_plugin_lt.ts \
- translations/wildmidi_plugin_nl.ts \
- translations/wildmidi_plugin_ja.ts \
- translations/wildmidi_plugin_sr_BA.ts \
- translations/wildmidi_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty (LIB_DIR):LIB_DIR = /lib
diff --git a/src/plugins/Output/alsa/CMakeLists.txt b/src/plugins/Output/alsa/CMakeLists.txt
index c2e77df71..6406d7e75 100644
--- a/src/plugins/Output/alsa/CMakeLists.txt
+++ b/src/plugins/Output/alsa/CMakeLists.txt
@@ -37,11 +37,6 @@ SET(libalsa_SRCS
settingsdialog.cpp
)
-SET(libalsa_MOC_HDRS
- outputalsafactory.h
- settingsdialog.h
-)
-
SET(libalsa_HDRS
outputalsa.h
)
@@ -50,8 +45,6 @@ SET(libalsa_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libalsa_RCC_SRCS ${libalsa_RCCS})
-QT4_WRAP_CPP(libalsa_MOC_SRCS ${libalsa_MOC_HDRS})
-
# user interface
@@ -65,7 +58,7 @@ QT4_WRAP_UI(libalsa_UIS_H ${libalsa_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(ALSA_FOUND)
-ADD_LIBRARY(alsa MODULE ${libalsa_SRCS} ${libalsa_MOC_SRCS} ${libalsa_UIS_H}
+ADD_LIBRARY(alsa MODULE ${libalsa_SRCS} ${libalsa_UIS_H}
${libalsa_RCC_SRCS} ${libalsa_HDRS})
add_dependencies(alsa qmmp)
target_link_libraries(alsa ${QT_LIBRARIES} -lqmmp ${ALSA_LDFLAGS})
diff --git a/src/plugins/Output/alsa/alsa.pro b/src/plugins/Output/alsa/alsa.pro
index 54db7e5a3..6ad5edfae 100644
--- a/src/plugins/Output/alsa/alsa.pro
+++ b/src/plugins/Output/alsa/alsa.pro
@@ -23,21 +23,6 @@ LIBS += -lqmmp
PKGCONFIG += alsa
FORMS += settingsdialog.ui
-TRANSLATIONS = translations/alsa_plugin_ru.ts \
- translations/alsa_plugin_uk_UA.ts \
- translations/alsa_plugin_zh_CN.ts \
- translations/alsa_plugin_zh_TW.ts \
- translations/alsa_plugin_cs.ts \
- translations/alsa_plugin_pl.ts \
- translations/alsa_plugin_de.ts \
- translations/alsa_plugin_it.ts \
- translations/alsa_plugin_tr.ts \
- translations/alsa_plugin_lt.ts \
- translations/alsa_plugin_nl.ts \
- translations/alsa_plugin_ja.ts \
- translations/alsa_plugin_es.ts \
- translations/alsa_plugin_sr_BA.ts \
- translations/alsa_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Output/directsound/CMakeLists.txt b/src/plugins/Output/directsound/CMakeLists.txt
index 5f8727756..c2b085c90 100644
--- a/src/plugins/Output/directsound/CMakeLists.txt
+++ b/src/plugins/Output/directsound/CMakeLists.txt
@@ -35,10 +35,6 @@ SET(libdirectsound_SRCS
outputdirectsoundfactory.cpp
)
-SET(libdirectsound_MOC_HDRS
- outputdirectsoundfactory.h
-)
-
SET(libdirectsound_HDRS
outputdirectsound.h
)
@@ -47,11 +43,9 @@ SET(libdirectsound_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libdirectsound_RCC_SRCS ${libdirectsound_RCCS})
-QT4_WRAP_CPP(libdirectsound_MOC_SRCS ${libdirectsound_MOC_HDRS})
-
IF(DSOUND_H_FOUND)
-ADD_LIBRARY(directsound MODULE ${libdirectsound_SRCS} ${libdirectsound_MOC_SRCS} ${libdirectsound_RCC_SRCS} ${libdirectsound_HDRS})
+ADD_LIBRARY(directsound MODULE ${libdirectsound_SRCS} ${libdirectsound_RCC_SRCS} ${libdirectsound_HDRS})
add_dependencies(directsound qmmp)
target_link_libraries(directsound ${QT_LIBRARIES} -lqmmp -ldxguid -lstrmiids -ldmoguids -lmsdmo -lole32 -loleaut32 -luuid -lgdi32 -ldsound)
install(TARGETS directsound DESTINATION ${LIB_DIR}/qmmp/Output)
diff --git a/src/plugins/Output/directsound/directsound.pro b/src/plugins/Output/directsound/directsound.pro
index 14bd03f66..6cbd4c30b 100644
--- a/src/plugins/Output/directsound/directsound.pro
+++ b/src/plugins/Output/directsound/directsound.pro
@@ -21,21 +21,6 @@ plugin
TEMPLATE = lib
LIBS += -lqmmp0 -ldxguid -lstrmiids -ldmoguids -lmsdmo -lole32 -loleaut32 -luuid -lgdi32 -ldsound
-TRANSLATIONS = translations/directsound_plugin_cs.ts \
- translations/directsound_plugin_de.ts \
- translations/directsound_plugin_zh_CN.ts \
- translations/directsound_plugin_zh_TW.ts \
- translations/directsound_plugin_ru.ts \
- translations/directsound_plugin_pl.ts \
- translations/directsound_plugin_uk_UA.ts \
- translations/directsound_plugin_it.ts \
- translations/directsound_plugin_tr.ts \
- translations/directsound_plugin_lt.ts \
- translations/directsound_plugin_nl.ts \
- translations/directsound_plugin_ja.ts \
- translations/directsound_plugin_es.ts \
- translations/directsound_plugin_sr_BA.ts \
- translations/directsound_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty (LIB_DIR){
diff --git a/src/plugins/Output/jack/CMakeLists.txt b/src/plugins/Output/jack/CMakeLists.txt
index caafb8223..260c93d07 100644
--- a/src/plugins/Output/jack/CMakeLists.txt
+++ b/src/plugins/Output/jack/CMakeLists.txt
@@ -66,19 +66,13 @@ SET(libjack_HDRS
outputjack.h
)
-SET(libjack_MOC_HDRS
- outputjackfactory.h
-)
-
SET(libjack_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libjack_RCC_SRCS ${libjack_RCCS})
-QT4_WRAP_CPP(libjack_MOC_SRCS ${libjack_MOC_HDRS})
-
IF(JACK_FOUND)
-ADD_LIBRARY(jack MODULE ${libjack_SRCS} ${libjack_MOC_SRCS} ${libjack_RCC_SRCS} ${libjack_HDRS})
+ADD_LIBRARY(jack MODULE ${libjack_SRCS} ${libjack_RCC_SRCS} ${libjack_HDRS})
add_dependencies(jack qmmp)
set_target_properties(jack PROPERTIES
COMPILE_FLAGS -pthread
diff --git a/src/plugins/Output/jack/jack.pro b/src/plugins/Output/jack/jack.pro
index c72116bb7..b3bf777cd 100644
--- a/src/plugins/Output/jack/jack.pro
+++ b/src/plugins/Output/jack/jack.pro
@@ -24,21 +24,6 @@ link_pkgconfig
TEMPLATE = lib
LIBS += -lqmmp
PKGCONFIG += jack samplerate
-TRANSLATIONS = translations/jack_plugin_ru.ts \
- translations/jack_plugin_uk_UA.ts \
- translations/jack_plugin_zh_CN.ts \
- translations/jack_plugin_zh_TW.ts \
- translations/jack_plugin_cs.ts \
- translations/jack_plugin_pl.ts \
- translations/jack_plugin_de.ts \
- translations/jack_plugin_it.ts \
- translations/jack_plugin_tr.ts \
- translations/jack_plugin_lt.ts \
- translations/jack_plugin_nl.ts \
- translations/jack_plugin_ja.ts \
- translations/jack_plugin_es.ts \
- translations/jack_plugin_sr_BA.ts \
- translations/jack_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Output/null/CMakeLists.txt b/src/plugins/Output/null/CMakeLists.txt
index 0a251c614..8057dfbe3 100644
--- a/src/plugins/Output/null/CMakeLists.txt
+++ b/src/plugins/Output/null/CMakeLists.txt
@@ -30,10 +30,6 @@ SET(libnull_SRCS
outputnullfactory.cpp
)
-SET(libnull_MOC_HDRS
- outputnullfactory.h
-)
-
SET(libnull_HDRS
outputnull.h
)
@@ -42,15 +38,12 @@ SET(libnull_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libnull_RCC_SRCS ${libnull_RCCS})
-QT4_WRAP_CPP(libnull_MOC_SRCS ${libnull_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(null MODULE ${libnull_SRCS} ${libnull_MOC_SRCS} ${libnull_UIS_H} ${libnull_RCC_SRCS} ${libnull_HDRS})
+ADD_LIBRARY(null MODULE ${libnull_SRCS} ${libnull_UIS_H} ${libnull_RCC_SRCS} ${libnull_HDRS})
add_dependencies(null qmmp)
target_link_libraries(null ${QT_LIBRARIES} -lqmmp)
install(TARGETS null DESTINATION ${LIB_DIR}/qmmp/Output)
diff --git a/src/plugins/Output/null/null.pro b/src/plugins/Output/null/null.pro
index 6616e44ee..4d0d98601 100644
--- a/src/plugins/Output/null/null.pro
+++ b/src/plugins/Output/null/null.pro
@@ -18,22 +18,6 @@ plugin
TEMPLATE = lib
-TRANSLATIONS = translations/null_plugin_cs.ts \
- translations/null_plugin_de.ts \
- translations/null_plugin_zh_CN.ts \
- translations/null_plugin_zh_TW.ts \
- translations/null_plugin_ru.ts \
- translations/null_plugin_pl.ts \
- translations/null_plugin_uk_UA.ts \
- translations/null_plugin_it.ts \
- translations/null_plugin_tr.ts \
- translations/null_plugin_lt.ts \
- translations/null_plugin_nl.ts \
- translations/null_plugin_ja.ts \
- translations/null_plugin_es.ts \
- translations/null_plugin_sr_BA.ts \
- translations/null_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
unix {
diff --git a/src/plugins/Output/oss/CMakeLists.txt b/src/plugins/Output/oss/CMakeLists.txt
index c5cd8453e..94c18454f 100644
--- a/src/plugins/Output/oss/CMakeLists.txt
+++ b/src/plugins/Output/oss/CMakeLists.txt
@@ -39,11 +39,6 @@ SET(liboss_SRCS
settingsdialog.cpp
)
-SET(liboss_MOC_HDRS
- outputossfactory.h
- settingsdialog.h
-)
-
SET(liboss_HDRS
outputoss.h
)
@@ -52,15 +47,13 @@ SET(liboss_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(liboss_RCC_SRCS ${liboss_RCCS})
-QT4_WRAP_CPP(liboss_MOC_SRCS ${liboss_MOC_HDRS})
-
SET(liboss_UIS
settingsdialog.ui
)
QT4_WRAP_UI(liboss_UIS_H ${liboss_UIS})
-ADD_LIBRARY(oss MODULE ${liboss_SRCS} ${liboss_MOC_SRCS} ${liboss_UIS_H}
+ADD_LIBRARY(oss MODULE ${liboss_SRCS} ${liboss_UIS_H}
${liboss_RCC_SRCS} ${liboss_HDRS})
add_dependencies(oss qmmp)
target_link_libraries(oss ${QT_LIBRARIES} -lqmmp)
diff --git a/src/plugins/Output/oss/oss.pro b/src/plugins/Output/oss/oss.pro
index c99fcae06..4f8c9a695 100644
--- a/src/plugins/Output/oss/oss.pro
+++ b/src/plugins/Output/oss/oss.pro
@@ -7,7 +7,7 @@ HEADERS += outputossfactory.h \
SOURCES += outputossfactory.cpp \
- outputoss.cpp \
+ outputoss.cpp \
settingsdialog.cpp
TARGET=$$PLUGINS_PREFIX/Output/oss
@@ -25,22 +25,6 @@ DEFINES += HAVE_SYS_SOUNDCARD_H
TEMPLATE = lib
LIBS += -lqmmp
-TRANSLATIONS = translations/oss_plugin_cs.ts \
- translations/oss_plugin_de.ts \
- translations/oss_plugin_zh_CN.ts \
- translations/oss_plugin_zh_TW.ts \
- translations/oss_plugin_ru.ts \
- translations/oss_plugin_pl.ts \
- translations/oss_plugin_uk_UA.ts \
- translations/oss_plugin_it.ts \
- translations/oss_plugin_tr.ts \
- translations/oss_plugin_lt.ts \
- translations/oss_plugin_nl.ts \
- translations/oss_plugin_ja.ts \
- translations/oss_plugin_es.ts \
- translations/oss_plugin_sr_BA.ts \
- translations/oss_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty (LIB_DIR){
LIB_DIR = /lib
diff --git a/src/plugins/Output/oss4/CMakeLists.txt b/src/plugins/Output/oss4/CMakeLists.txt
index 8425d7f57..bf3fd6f6a 100644
--- a/src/plugins/Output/oss4/CMakeLists.txt
+++ b/src/plugins/Output/oss4/CMakeLists.txt
@@ -73,11 +73,6 @@ SET(liboss4_SRCS
settingsdialog.cpp
)
-SET(liboss4_MOC_HDRS
- outputoss4factory.h
- settingsdialog.h
-)
-
SET(liboss4_HDRS
outputoss4.h
)
@@ -86,8 +81,6 @@ SET(liboss4_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(liboss4_RCC_SRCS ${liboss4_RCCS})
-QT4_WRAP_CPP(liboss4_MOC_SRCS ${liboss4_MOC_HDRS})
-
SET(liboss4_UIS
settingsdialog.ui
)
@@ -95,7 +88,7 @@ SET(liboss4_UIS
IF(OSS4_FOUND)
QT4_WRAP_UI(liboss4_UIS_H ${liboss4_UIS})
-ADD_LIBRARY(oss4 MODULE ${liboss4_SRCS} ${liboss4_MOC_SRCS} ${liboss4_UIS_H} ${liboss4_RCC_SRCS} ${liboss4_HDRS})
+ADD_LIBRARY(oss4 MODULE ${liboss4_SRCS} ${liboss4_UIS_H} ${liboss4_RCC_SRCS} ${liboss4_HDRS})
add_dependencies(oss4 qmmp)
target_link_libraries(oss4 ${QT_LIBRARIES} -lqmmp)
install(TARGETS oss4 DESTINATION ${LIB_DIR}/qmmp/Output)
diff --git a/src/plugins/Output/pulseaudio/CMakeLists.txt b/src/plugins/Output/pulseaudio/CMakeLists.txt
index b7e736621..db5825c08 100644
--- a/src/plugins/Output/pulseaudio/CMakeLists.txt
+++ b/src/plugins/Output/pulseaudio/CMakeLists.txt
@@ -37,10 +37,6 @@ SET(libpulseaudio_SRCS
outputpulseaudiofactory.cpp
)
-SET(libpulseaudio_MOC_HDRS
- outputpulseaudiofactory.h
-)
-
SET(libpulseaudio_HDRS
outputpulseaudio.h
)
@@ -49,15 +45,12 @@ SET(libpulseaudio_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libpulseaudio_RCC_SRCS ${libpulseaudio_RCCS})
-QT4_WRAP_CPP(libpulseaudio_MOC_SRCS ${libpulseaudio_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(PULSE_FOUND)
-ADD_LIBRARY(pulseaudio MODULE ${libpulseaudio_SRCS} ${libpulseaudio_MOC_SRCS} ${libpulseaudio_UIS_H}
+ADD_LIBRARY(pulseaudio MODULE ${libpulseaudio_SRCS} ${libpulseaudio_UIS_H}
${libpulseaudio_RCC_SRCS} ${libpulseaudio_HDRS})
add_dependencies(pulseaudio qmmp)
target_link_libraries(pulseaudio ${QT_LIBRARIES} -lqmmp ${PULSE_LDFLAGS})
diff --git a/src/plugins/Output/pulseaudio/pulseaudio.pro b/src/plugins/Output/pulseaudio/pulseaudio.pro
index 77bf7177f..3b507bf9d 100644
--- a/src/plugins/Output/pulseaudio/pulseaudio.pro
+++ b/src/plugins/Output/pulseaudio/pulseaudio.pro
@@ -23,22 +23,6 @@ LIBS += -lqmmp
PKGCONFIG += libpulse-simple
-TRANSLATIONS = translations/pulseaudio_plugin_cs.ts \
- translations/pulseaudio_plugin_de.ts \
- translations/pulseaudio_plugin_zh_CN.ts \
- translations/pulseaudio_plugin_zh_TW.ts \
- translations/pulseaudio_plugin_ru.ts \
- translations/pulseaudio_plugin_pl.ts \
- translations/pulseaudio_plugin_uk_UA.ts \
- translations/pulseaudio_plugin_it.ts \
- translations/pulseaudio_plugin_tr.ts \
- translations/pulseaudio_plugin_lt.ts \
- translations/pulseaudio_plugin_nl.ts \
- translations/pulseaudio_plugin_ja.ts \
- translations/pulseaudio_plugin_es.ts \
- translations/pulseaudio_plugin_sr_BA.ts \
- translations/pulseaudio_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
isEmpty (LIB_DIR){
diff --git a/src/plugins/Output/waveout/CMakeLists.txt b/src/plugins/Output/waveout/CMakeLists.txt
index 241b23fee..377004296 100644
--- a/src/plugins/Output/waveout/CMakeLists.txt
+++ b/src/plugins/Output/waveout/CMakeLists.txt
@@ -35,10 +35,6 @@ SET(libwaveout_SRCS
outputwaveoutfactory.cpp
)
-SET(libwaveout_MOC_HDRS
- outputwaveoutfactory.h
-)
-
SET(libwaveout_HDRS
outputwaveout.h
)
@@ -47,11 +43,9 @@ SET(libwaveout_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libwaveout_RCC_SRCS ${libwaveout_RCCS})
-QT4_WRAP_CPP(libwaveout_MOC_SRCS ${libwaveout_MOC_HDRS})
-
IF(WINDOWS_H_FOUND)
-ADD_LIBRARY(waveout MODULE ${libwaveout_SRCS} ${libwaveout_MOC_SRCS} ${libwaveout_RCC_SRCS} ${libwaveout_HDRS})
+ADD_LIBRARY(waveout MODULE ${libwaveout_SRCS} ${libwaveout_RCC_SRCS} ${libwaveout_HDRS})
add_dependencies(waveout qmmp)
target_link_libraries(waveout ${QT_LIBRARIES} -lqmmp -lwinmm)
install(TARGETS waveout DESTINATION ${LIB_DIR}/qmmp/Output)
diff --git a/src/plugins/Output/waveout/waveout.pro b/src/plugins/Output/waveout/waveout.pro
index d369c7052..35f77d82c 100644
--- a/src/plugins/Output/waveout/waveout.pro
+++ b/src/plugins/Output/waveout/waveout.pro
@@ -16,26 +16,11 @@ QMAKE_LIBDIR += ../../../../bin
CONFIG += warn_on \
thread \
-plugin
+plugin
TEMPLATE = lib
LIBS += -lqmmp0 -lwinmm
-TRANSLATIONS = translations/waveout_plugin_cs.ts \
- translations/waveout_plugin_de.ts \
- translations/waveout_plugin_zh_CN.ts \
- translations/waveout_plugin_zh_TW.ts \
- translations/waveout_plugin_ru.ts \
- translations/waveout_plugin_pl.ts \
- translations/waveout_plugin_uk_UA.ts \
- translations/waveout_plugin_it.ts \
- translations/waveout_plugin_tr.ts \
- translations/waveout_plugin_lt.ts \
- translations/waveout_plugin_nl.ts \
- translations/waveout_plugin_ja.ts \
- translations/waveout_plugin_es.ts \
- translations/waveout_plugin_sr_BA.ts \
- translations/waveout_plugin_sr_RS.ts
RESOURCES = translations/translations.qrc
isEmpty (LIB_DIR){
diff --git a/src/plugins/PlayListFormats/m3u/CMakeLists.txt b/src/plugins/PlayListFormats/m3u/CMakeLists.txt
index cbed694fe..f40c5d5b1 100644
--- a/src/plugins/PlayListFormats/m3u/CMakeLists.txt
+++ b/src/plugins/PlayListFormats/m3u/CMakeLists.txt
@@ -30,20 +30,13 @@ SET(libm3uplaylistformat_SRCS
m3uplaylistformat.cpp
)
-SET(libm3uplaylistformat_MOC_HDRS
- m3uplaylistformat.h
-)
-
QT4_ADD_RESOURCES(libm3uplaylistformat_RCC_SRCS ${libm3uplaylistformat_RCCS})
-QT4_WRAP_CPP(libm3uplaylistformat_MOC_SRCS ${libm3uplaylistformat_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(m3uplaylistformat MODULE ${libm3uplaylistformat_SRCS} ${libm3uplaylistformat_MOC_SRCS})
+ADD_LIBRARY(m3uplaylistformat MODULE ${libm3uplaylistformat_SRCS})
add_dependencies(m3uplaylistformat qmmpui)
target_link_libraries(m3uplaylistformat ${QT_LIBRARIES} -lqmmpui)
install(TARGETS m3uplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats)
diff --git a/src/plugins/PlayListFormats/pls/CMakeLists.txt b/src/plugins/PlayListFormats/pls/CMakeLists.txt
index 4e221e436..f22d1d33e 100644
--- a/src/plugins/PlayListFormats/pls/CMakeLists.txt
+++ b/src/plugins/PlayListFormats/pls/CMakeLists.txt
@@ -30,20 +30,13 @@ SET(libplsplaylistformat_SRCS
plsplaylistformat.cpp
)
-SET(libplsplaylistformat_MOC_HDRS
- plsplaylistformat.h
-)
-
QT4_ADD_RESOURCES(libplsplaylistformat_RCC_SRCS ${libplsplaylistformat_RCCS})
-QT4_WRAP_CPP(libplsplaylistformat_MOC_SRCS ${libplsplaylistformat_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(plsplaylistformat MODULE ${libplsplaylistformat_SRCS} ${libplsplaylistformat_MOC_SRCS})
+ADD_LIBRARY(plsplaylistformat MODULE ${libplsplaylistformat_SRCS})
add_dependencies(plsplaylistformat qmmpui)
target_link_libraries(plsplaylistformat ${QT_LIBRARIES} -lqmmpui)
install(TARGETS plsplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats)
diff --git a/src/plugins/PlayListFormats/xspf/CMakeLists.txt b/src/plugins/PlayListFormats/xspf/CMakeLists.txt
index a0779a562..60635e7d8 100644
--- a/src/plugins/PlayListFormats/xspf/CMakeLists.txt
+++ b/src/plugins/PlayListFormats/xspf/CMakeLists.txt
@@ -30,20 +30,13 @@ SET(libxspfplaylistformat_SRCS
xspfplaylistformat.cpp
)
-SET(libxspfplaylistformat_MOC_HDRS
- xspfplaylistformat.h
-)
-
QT4_ADD_RESOURCES(libxspfplaylistformat_RCC_SRCS ${libxspfplaylistformat_RCCS})
-QT4_WRAP_CPP(libxspfplaylistformat_MOC_SRCS ${libxspfplaylistformat_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(xspfplaylistformat MODULE ${libxspfplaylistformat_SRCS} ${libxspfplaylistformat_MOC_SRCS})
+ADD_LIBRARY(xspfplaylistformat MODULE ${libxspfplaylistformat_SRCS})
add_dependencies(xspfplaylistformat qmmpui)
target_link_libraries(xspfplaylistformat ${QT_LIBRARIES} -lqmmpui -lqmmp)
install(TARGETS xspfplaylistformat DESTINATION ${LIB_DIR}/qmmp/PlayListFormats)
diff --git a/src/plugins/Transports/http/CMakeLists.txt b/src/plugins/Transports/http/CMakeLists.txt
index c310990a0..793dde428 100644
--- a/src/plugins/Transports/http/CMakeLists.txt
+++ b/src/plugins/Transports/http/CMakeLists.txt
@@ -46,13 +46,6 @@ SET(libhttp_SRCS
settingsdialog.cpp
)
-SET(libhttp_MOC_HDRS
- httpinputfactory.h
- httpinputsource.h
- httpstreamreader.h
- settingsdialog.h
-)
-
# resources
SET(libhttp_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libhttp_RCC_SRCS ${libhttp_RCCS})
@@ -64,15 +57,12 @@ SET(libhttp_UIS
QT4_WRAP_UI(libhttp_UIS_H ${libhttp_UIS})
-
-QT4_WRAP_CPP(libhttp_MOC_SRCS ${libhttp_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(CURL_FOUND)
-ADD_LIBRARY(http MODULE ${libhttp_SRCS} ${libhttp_MOC_SRCS} ${libhttp_UIS_H} ${libhttp_RCC_SRCS})
+ADD_LIBRARY(http MODULE ${libhttp_SRCS} ${libhttp_UIS_H} ${libhttp_RCC_SRCS})
IF(USE_ENCA AND ENCA_FOUND)
target_link_libraries(http ${QT_LIBRARIES} -lqmmp ${CURL_LDFLAGS} ${CURL_CFLAGS} ${ENCA_LDFLAGS} ${ENCA_CFLAGS})
diff --git a/src/plugins/Transports/http/http.pro b/src/plugins/Transports/http/http.pro
index f12d0b0b2..c844c52ce 100644
--- a/src/plugins/Transports/http/http.pro
+++ b/src/plugins/Transports/http/http.pro
@@ -18,7 +18,7 @@ CONFIG += warn_on \
plugin \
link_pkgconfig
TEMPLATE = lib
-unix {
+unix {
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmp \
-L/usr/lib
@@ -27,7 +27,7 @@ unix {
target.path = $$LIB_DIR/qmmp/Transports
INSTALLS += target
}
-win32 {
+win32 {
QMAKE_LIBDIR += ../../../../bin
LIBS += -lqmmp0 \
-lcurldll
@@ -43,20 +43,4 @@ contains(CONFIG, WITH_ENCA){
FORMS += settingsdialog.ui
-TRANSLATIONS = translations/http_plugin_ru.ts \
- translations/http_plugin_uk_UA.ts \
- translations/http_plugin_zh_CN.ts \
- translations/http_plugin_zh_TW.ts \
- translations/http_plugin_cs.ts \
- translations/http_plugin_pl.ts \
- translations/http_plugin_de.ts \
- translations/http_plugin_it.ts \
- translations/http_plugin_tr.ts \
- translations/http_plugin_lt.ts \
- translations/http_plugin_nl.ts \
- translations/http_plugin_ja.ts \
- translations/http_plugin_es.ts \
- translations/http_plugin_sr_BA.ts \
- translations/http_plugin_sr_RS.ts
-
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Transports/mms/CMakeLists.txt b/src/plugins/Transports/mms/CMakeLists.txt
index 3a1ec888a..b5c365548 100644
--- a/src/plugins/Transports/mms/CMakeLists.txt
+++ b/src/plugins/Transports/mms/CMakeLists.txt
@@ -40,13 +40,6 @@ SET(libmms_SRCS
settingsdialog.cpp
)
-SET(libmms_MOC_HDRS
- mmsinputfactory.h
- mmsinputsource.h
- mmsstreamreader.h
- settingsdialog.h
-)
-
# resources
SET(libmms_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libmms_RCC_SRCS ${libmms_RCCS})
@@ -58,14 +51,11 @@ SET(libmms_UIS
QT4_WRAP_UI(libmms_UIS_H ${libmms_UIS})
-
-QT4_WRAP_CPP(libmms_MOC_SRCS ${libmms_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(MMS_FOUND)
-ADD_LIBRARY(mms MODULE ${libmms_SRCS} ${libmms_MOC_SRCS} ${libmms_UIS_H} ${libmms_RCC_SRCS})
+ADD_LIBRARY(mms MODULE ${libmms_SRCS} ${libmms_UIS_H} ${libmms_RCC_SRCS})
target_link_libraries(mms ${QT_LIBRARIES} -lqmmp ${MMS_LDFLAGS})
add_dependencies(mms qmmp)
install(TARGETS mms DESTINATION ${LIB_DIR}/qmmp/Transports)
diff --git a/src/plugins/Transports/mms/mms.pro b/src/plugins/Transports/mms/mms.pro
index 9354a7eec..bf1cd1b92 100644
--- a/src/plugins/Transports/mms/mms.pro
+++ b/src/plugins/Transports/mms/mms.pro
@@ -18,7 +18,7 @@ CONFIG += warn_on \
plugin \
link_pkgconfig
TEMPLATE = lib
-
+
QMAKE_LIBDIR += ../../../../lib
LIBS += -lqmmp -L/usr/lib
PKGCONFIG += libmms
@@ -26,24 +26,6 @@ isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/Transports
INSTALLS += target
-
FORMS += settingsdialog.ui
-TRANSLATIONS = translations/mms_plugin_ru.ts \
- translations/mms_plugin_uk_UA.ts \
- translations/mms_plugin_zh_CN.ts \
- translations/mms_plugin_zh_TW.ts \
- translations/mms_plugin_cs.ts \
- translations/mms_plugin_pl.ts \
- translations/mms_plugin_de.ts \
- translations/mms_plugin_it.ts \
- translations/mms_plugin_tr.ts \
- translations/mms_plugin_lt.ts \
- translations/mms_plugin_nl.ts \
- translations/mms_plugin_ja.ts \
- translations/mms_plugin_es.ts \
- translations/mms_plugin_sr_BA.ts \
- translations/mms_plugin_sr_RS.ts
-
-
RESOURCES = translations/translations.qrc
diff --git a/src/plugins/Ui/skinned/CMakeLists.txt b/src/plugins/Ui/skinned/CMakeLists.txt
index a052d39f3..698a0adee 100644
--- a/src/plugins/Ui/skinned/CMakeLists.txt
+++ b/src/plugins/Ui/skinned/CMakeLists.txt
@@ -94,58 +94,10 @@ SET(skinned_HDRS
shortcutitem.h
)
-SET(skinned_MOC_HDRS
- balancebar.h
- button.h
- skinnedsettings.h
- display.h
- dock.h
- eqgraph.h
- eqslider.h
- eqtitlebar.h
- eqwidget.h
- listwidget.h
- mainvisual.h
- mainwindow.h
- monostereo.h
- number.h
- pixmapwidget.h
- playlistcontrol.h
- playlist.h
- playlistslider.h
- playlisttitlebar.h
- playstatus.h
- positionbar.h
- preseteditor.h
- shadedbar.h
- shadedvisual.h
- skin.h
- skinreader.h
- symboldisplay.h
- textscroller.h
- timeindicator.h
- titlebarcontrol.h
- titlebar.h
- togglebutton.h
- visualmenu.h
- volumebar.h
- playlistbrowser.h
- playlistselector.h
- popupwidget.h
- popupsettings.h
- actionmanager.h
- shortcutdialog.h
- skinnedfactory.h
- hotkeyeditor.h
-)
-
SET(skinned_RCCS default/default.qrc resources/resources.qrc translations/translations.qrc)
QT4_ADD_RESOURCES(skinned_RCC_SRCS ${skinned_RCCS})
-QT4_AUTOMOC(${skinned_MOC_SRC})
-QT4_WRAP_CPP(skinned_MOC_SRCS ${skinned_MOC_HDRS})
-
# user interface
SET(skinned_UIS
@@ -163,7 +115,7 @@ QT4_WRAP_UI(skinned_UIS_H ${skinned_UIS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(X11_FOUND)
-ADD_LIBRARY(skinned MODULE ${skinned_SRCS} ${skinned_MOC_SRCS} ${skinned_UIS_H} ${skinned_RCC_SRCS} ${skinned_HDRS})
+ADD_LIBRARY(skinned MODULE ${skinned_SRCS} ${skinned_UIS_H} ${skinned_RCC_SRCS} ${skinned_HDRS})
target_link_libraries(skinned ${QT_LIBRARIES} libqmmp qmmpui ${X11_LDFLAGS})
add_dependencies(skinned qmmpui libqmmp)
target_link_libraries(skinned ${QT_LIBRARIES} -lqmmpui -lqmmp ${X11_LDFLAGS})
diff --git a/src/plugins/Ui/skinned/listwidget.cpp b/src/plugins/Ui/skinned/listwidget.cpp
index c324eda66..0f6c9bf89 100644
--- a/src/plugins/Ui/skinned/listwidget.cpp
+++ b/src/plugins/Ui/skinned/listwidget.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2013 by Ilya Kotov *
+ * Copyright (C) 2006-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -333,21 +333,7 @@ void ListWidget::mousePressEvent(QMouseEvent *e)
if ((Qt::ShiftModifier & e->modifiers()))
{
- bool select = true;
- if (m_pressed_index > m_anchor_index)
- {
- for (int j = m_anchor_index;j <= m_pressed_index;j++)
- {
- m_model->setSelected(j, select);
- }
- }
- else
- {
- for (int j = m_anchor_index;j >= m_pressed_index;j--)
- {
- m_model->setSelected(j, select);
- }
- }
+ m_model->setSelected(m_pressed_index, m_anchor_index, true);
m_anchor_index = m_pressed_index;
}
else //ShiftModifier released
@@ -516,7 +502,7 @@ void ListWidget::setModel(PlayListModel *selected, PlayListModel *previous)
recenterCurrent();
updateList();
connect (m_model, SIGNAL(currentChanged()), SLOT(recenterCurrent()));
- connect (m_model, SIGNAL(listChanged()), SLOT(updateList()));
+ connect (m_model, SIGNAL(listChanged(int)), SLOT(updateList()));
}
void ListWidget::scroll(int sc)
diff --git a/src/plugins/Ui/skinned/playlisttitlebar.cpp b/src/plugins/Ui/skinned/playlisttitlebar.cpp
index 8496903cc..e7c1f266b 100644
--- a/src/plugins/Ui/skinned/playlisttitlebar.cpp
+++ b/src/plugins/Ui/skinned/playlisttitlebar.cpp
@@ -204,7 +204,7 @@ void PlayListTitleBar::setModel(PlayListModel *selected, PlayListModel *previous
if(previous)
disconnect(previous, 0, this, 0); //disconnect previous model
m_model = selected;
- connect (m_model, SIGNAL(listChanged()), SLOT(showCurrent()));
+ connect (m_model, SIGNAL(listChanged(int)), SLOT(showCurrent()));
showCurrent();
}
@@ -212,7 +212,7 @@ void PlayListTitleBar::readSettings()
{
QSettings settings (Qmmp::configFile(), QSettings::IniFormat);
m_font.fromString(settings.value("Skinned/pl_font", QApplication::font().toString()).toString());
- m_font.setPointSize(8);
+ m_font.setPointSize(6);
}
void PlayListTitleBar::updateSkin()
diff --git a/src/plugins/Ui/skinned/skin.cpp b/src/plugins/Ui/skinned/skin.cpp
index 7f42b6f89..4223dc6b4 100644
--- a/src/plugins/Ui/skinned/skin.cpp
+++ b/src/plugins/Ui/skinned/skin.cpp
@@ -718,7 +718,7 @@ void Skin::loadVolume()
m_volume.clear();
for (int i = 0; i < 28; ++i)
- m_volume.append(pixmap->copy (0,i*15, pixmap->width(),13));
+ m_volume.append(pixmap->copy (0,i*15, qMin(pixmap->width(), 68), 13));
if (pixmap->height() > 425)
{
buttons [BT_VOL_N] = pixmap->copy (15,422,14, pixmap->height() - 422);
diff --git a/src/plugins/Ui/skinned/skinned.pro b/src/plugins/Ui/skinned/skinned.pro
index 58b7c75f4..f1ab2f846 100644
--- a/src/plugins/Ui/skinned/skinned.pro
+++ b/src/plugins/Ui/skinned/skinned.pro
@@ -136,21 +136,3 @@ PKGCONFIG += x11
INCLUDEPATH += ../../../
RESOURCES += translations/translations.qrc
-TRANSLATIONS = translations/skinned_plugin_ru.ts \
- translations/skinned_plugin_tr.ts \
- translations/skinned_plugin_zh_CN.ts \
- translations/skinned_plugin_cs.ts \
- translations/skinned_plugin_pt_BR.ts \
- translations/skinned_plugin_uk_UA.ts \
- translations/skinned_plugin_zh_TW.ts \
- translations/skinned_plugin_de.ts \
- translations/skinned_plugin_pl_PL.ts \
- translations/skinned_plugin_it.ts \
- translations/skinned_plugin_lt.ts \
- translations/skinned_plugin_hu.ts \
- translations/skinned_plugin_nl.ts \
- translations/skinned_plugin_ja.ts \
- translations/skinned_plugin_es.ts \
- translations/skinned_plugin_sk.ts \
- translations/skinned_plugin_sr_BA.ts \
- translations/skinned_plugin_sr_RS.ts
diff --git a/src/plugins/Visual/analyzer/CMakeLists.txt b/src/plugins/Visual/analyzer/CMakeLists.txt
index 5a363b2fc..c9de44a21 100644
--- a/src/plugins/Visual/analyzer/CMakeLists.txt
+++ b/src/plugins/Visual/analyzer/CMakeLists.txt
@@ -38,19 +38,10 @@ SET(libanalyzer_HDRS
fft.h
)
-SET(libanalyzer_MOC_HDRS
- analyzer.h
- colorwidget.h
- settingsdialog.h
- visualanalyzerfactory.h
-)
-
SET(libanalyzer_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libanalyzer_RCC_SRCS ${libanalyzer_RCCS})
-QT4_WRAP_CPP(libanalyzer_MOC_SRCS ${libanalyzer_MOC_HDRS})
-
# user interface
@@ -63,7 +54,7 @@ QT4_WRAP_UI(libanalyzer_UIS_H ${libanalyzer_UIS})
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(analyzer MODULE ${libanalyzer_SRCS} ${libanalyzer_MOC_SRCS} ${libanalyzer_UIS_H}
+ADD_LIBRARY(analyzer MODULE ${libanalyzer_SRCS} ${libanalyzer_UIS_H}
${libanalyzer_RCC_SRCS} ${libanalyzer_HDRS})
add_dependencies(analyzer qmmp)
target_link_libraries(analyzer ${QT_LIBRARIES} -lqmmp)
diff --git a/src/plugins/Visual/projectm/CMakeLists.txt b/src/plugins/Visual/projectm/CMakeLists.txt
index 0d698f232..4afdfd25e 100644
--- a/src/plugins/Visual/projectm/CMakeLists.txt
+++ b/src/plugins/Visual/projectm/CMakeLists.txt
@@ -54,25 +54,15 @@ SET(libprojectm_SRCS
projectmwrapper.cpp
)
-SET(libprojectm_MOC_HDRS
- projectmwidget.h
- projectmplugin.h
- visualprojectmfactory.h
- projectmwrapper.h
-)
-
SET(libprojectm_RCCS translations/translations.qrc)
QT4_ADD_RESOURCES(libprojectm_RCC_SRCS ${libprojectm_RCCS})
-QT4_WRAP_CPP(libprojectm_MOC_SRCS ${libprojectm_MOC_HDRS})
-
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
IF(PROJECTM_FOUND)
-ADD_LIBRARY(projectm MODULE ${libprojectm_SRCS} ${libprojectm_MOC_SRCS} ${libprojectm_RCC_SRCS})
+ADD_LIBRARY(projectm MODULE ${libprojectm_SRCS} ${libprojectm_RCC_SRCS})
add_dependencies(projectm qmmp)
target_link_libraries(projectm ${QT_LIBRARIES} -lqmmp ${PROJECTM_LDFLAGS} -lGL)
install(TARGETS projectm DESTINATION ${LIB_DIR}/qmmp/Visual)
diff --git a/src/qmmp/CMakeLists.txt b/src/qmmp/CMakeLists.txt
index 74690bb8e..6ddc9071d 100644
--- a/src/qmmp/CMakeLists.txt
+++ b/src/qmmp/CMakeLists.txt
@@ -1,6 +1,6 @@
project(libqmmp)
-cmake_minimum_required(VERSION 2.4.7)
+cmake_minimum_required(VERSION 2.8.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 OLD)
@@ -92,21 +92,6 @@ SET(libqmmp_HDRS
channelconverter_p.h
)
-SET(libqmmp_MOC_HDRS
- visual.h
- outputwriter_p.h
- soundcore.h
- statehandler.h
- volumecontrol_p.h
- metadatamodel.h
- qmmpaudioengine_p.h
- abstractengine.h
- inputsource.h
- fileinputsource_p.h
- emptyinputsource_p.h
- qmmpsettings.h
-)
-
SET(libqmmp_DEVEL_HDRS
abstractengine.h
audioparameters.h
@@ -135,13 +120,11 @@ SET(libqmmp_DEVEL_HDRS
channelmap.h
)
-QT4_WRAP_CPP(libqmmp_MOC_SRCS ${libqmmp_MOC_HDRS})
-
# Don't forget to include output directory, otherwise
# the UI file won't be wrapped!
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(libqmmp SHARED ${libqmmp_SRCS} ${libqmmp_MOC_SRCS} ${libqmmp_HDRS})
+ADD_LIBRARY(libqmmp SHARED ${libqmmp_SRCS} ${libqmmp_HDRS})
target_link_libraries(libqmmp ${QT_LIBRARIES})
SET_TARGET_PROPERTIES(libqmmp PROPERTIES VERSION ${QMMP_VERSION} SOVERSION ${QMMP_SOVERSION} OUTPUT_NAME qmmp)
install(TARGETS libqmmp LIBRARY DESTINATION ${LIB_DIR}
diff --git a/src/qmmp/equ/iir_fpu.c b/src/qmmp/equ/iir_fpu.c
index 81e698578..3c276dda4 100644
--- a/src/qmmp/equ/iir_fpu.c
+++ b/src/qmmp/equ/iir_fpu.c
@@ -364,8 +364,9 @@ __inline__ int iir32(void * d, int length, int nch)
__inline__ int iir24(void * d, int length, int nch)
{
int *data = (int *) d;
+ int samples = (length >> 2);
int index;
- for (index = 0; index < length; index++)
+ for (index = 0; index < samples; index++)
{
if(data[index] & 0x800000)
data[index] |= 0xff000000;
diff --git a/src/qmmp/outputwriter.cpp b/src/qmmp/outputwriter.cpp
index 4199ae93b..72988044c 100644
--- a/src/qmmp/outputwriter.cpp
+++ b/src/qmmp/outputwriter.cpp
@@ -72,11 +72,9 @@ OutputWriter::OutputWriter (QObject* parent) : QThread (parent)
m_pause = false;
m_prev_pause = false;
m_useEq = false;
- m_eqEnabled = false;
m_muted = false;
m_settings = QmmpSettings::instance();
connect(m_settings,SIGNAL(eqSettingsChanged()), SLOT(updateEqSettings()));
- updateEqSettings();
}
OutputWriter::~OutputWriter()
@@ -145,12 +143,8 @@ bool OutputWriter::initialize(quint32 freq, ChannelMap map, Qmmp::AudioFormat fo
m_visBufferSize = QMMP_BLOCK_FRAMES * 2 * m_channels; //16-bit samples
if(m_format != Qmmp::PCM_S16LE)
m_visBuffer = new unsigned char [m_visBufferSize];
- m_useEq = m_eqEnabled && m_frequency && m_format == Qmmp::PCM_S16LE;
- if(m_frequency)
- {
- init_iir(m_frequency, m_settings->eqSettings().bands());
- clean_history();
- }
+ updateEqSettings();
+ clean_history();
return true;
}
@@ -400,6 +394,7 @@ void OutputWriter::run()
mutex()->unlock();
if (b)
{
+ mutex()->lock();
if (m_useEq)
{
switch(m_format)
@@ -417,6 +412,7 @@ void OutputWriter::run()
;
}
}
+ mutex()->unlock();
dispatchVisual(b);
if (SoftwareVolume::instance())
SoftwareVolume::instance()->changeVolume(b, m_channels, m_format);
@@ -489,20 +485,22 @@ void OutputWriter::status()
void OutputWriter::updateEqSettings()
{
mutex()->lock();
- m_eqEnabled = m_settings->eqSettings().isEnabled();
- double preamp = m_settings->eqSettings().preamp();
- int bands = m_settings->eqSettings().bands();
+ if(m_settings->eqSettings().isEnabled())
+ {
+ double preamp = m_settings->eqSettings().preamp();
+ int bands = m_settings->eqSettings().bands();
- init_iir(m_frequency, bands);
+ init_iir(m_frequency, bands);
- set_preamp(0, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp);
- set_preamp(1, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp);
- for(int i = 0; i < bands; ++i)
- {
- double value = m_settings->eqSettings().gain(i);
- set_gain(i,0, 0.03*value+0.000999999*value*value);
- set_gain(i,1, 0.03*value+0.000999999*value*value);
+ set_preamp(0, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp);
+ set_preamp(1, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp);
+ for(int i = 0; i < bands; ++i)
+ {
+ double value = m_settings->eqSettings().gain(i);
+ set_gain(i,0, 0.03*value+0.000999999*value*value);
+ set_gain(i,1, 0.03*value+0.000999999*value*value);
+ }
}
- m_useEq = isRunning() && m_eqEnabled;
+ m_useEq = m_settings->eqSettings().isEnabled();
mutex()->unlock();
}
diff --git a/src/qmmp/outputwriter_p.h b/src/qmmp/outputwriter_p.h
index f4096a9f5..a19c06db6 100644
--- a/src/qmmp/outputwriter_p.h
+++ b/src/qmmp/outputwriter_p.h
@@ -134,7 +134,7 @@ private:
bool m_user_stop, m_pause;
bool m_prev_pause;
bool m_finish;
- bool m_useEq, m_eqEnabled;
+ bool m_useEq;
qint64 m_totalWritten, m_currentMilliseconds;
unsigned char *m_visBuffer;
qint64 m_visBufferSize;
diff --git a/src/qmmpui/CMakeLists.txt b/src/qmmpui/CMakeLists.txt
index 14525d47e..18aab75ce 100644
--- a/src/qmmpui/CMakeLists.txt
+++ b/src/qmmpui/CMakeLists.txt
@@ -1,6 +1,6 @@
project(libqmmpui)
-cmake_minimum_required(VERSION 2.4.7)
+cmake_minimum_required(VERSION 2.8.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 OLD)
@@ -59,6 +59,7 @@ SET(libqmmpui_SRCS
addurldialog.cpp
qmmpuiplugincache.cpp
tagupdater.cpp
+ playlisttask.cpp
)
SET(libqmmpui_HDRS
@@ -83,27 +84,6 @@ SET(libqmmpui_HDRS
qmmpuiplugincache_p.h
)
-SET(libqmmpui_MOC_HDRS
- uihelper.h
- filedialog.h
- qtfiledialog_p.h
- fileloader_p.h
- playlistmodel.h
- mediaplayer.h
- detailsdialog.h
- tageditor_p.h
- playlistmanager.h
- templateeditor.h
- jumptotrackdialog_p.h
- configdialog.h
- aboutdialog_p.h
- qmmpuisettings.h
- radioitemdelegate_p.h
- playlistdownloader.h
- addurldialog_p.h
- tagupdater_p.h
-)
-
SET(libqmmpui_DEVEL_HDRS
commandlinemanager.h
commandlineoption.h
@@ -145,11 +125,9 @@ QT4_WRAP_UI(libqmmpui_UIS_H ${libqmmpui_UIS})
QT4_ADD_RESOURCES(libqmmpui_RCC_SRCS translations/libqmmpui_locales.qrc txt/txt.qrc images/qmmpui_images.qrc)
-QT4_WRAP_CPP(libqmmpui_MOC_SRCS ${libqmmpui_MOC_HDRS})
-
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(qmmpui SHARED ${libqmmpui_SRCS} ${libqmmpui_MOC_SRCS} ${libqmmpui_RCC_SRCS} ${libqmmpui_UIS_H} ${libqmmpui_HDRS})
+ADD_LIBRARY(qmmpui SHARED ${libqmmpui_SRCS} ${libqmmpui_RCC_SRCS} ${libqmmpui_UIS_H} ${libqmmpui_HDRS})
target_link_libraries(qmmpui ${QT_LIBRARIES} -lqmmp)
add_dependencies(qmmpui libqmmp)
SET_TARGET_PROPERTIES(qmmpui PROPERTIES VERSION ${QMMP_VERSION} SOVERSION ${QMMP_SOVERSION})
diff --git a/src/qmmpui/aboutdialog.cpp b/src/qmmpui/aboutdialog.cpp
index 073a3187d..888f3ea68 100644
--- a/src/qmmpui/aboutdialog.cpp
+++ b/src/qmmpui/aboutdialog.cpp
@@ -1,5 +1,5 @@
-/***************************************************************************
-* Copyright (C) 2006-2013 by Ilya Kotov *
+/**************************************************************************
+* Copyright (C) 2006-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -68,7 +68,7 @@ QString AboutDialog::loadAbout()
text.append(tr("Using Qt %1 (compiled with Qt %2)" ).arg(qVersion()).arg(QT_VERSION_STR) + "</p>");
text.append("<p>");
- text.append(tr("(c) %1-%2 Qmmp Development Team").arg(2006).arg(2014)+"<br>");
+ text.append(tr("(c) %1-%2 Qmmp Development Team").arg(2006).arg(2015)+"<br>");
text.append("<a href=\"http://qmmp.ylsoftware.com/\">http://qmmp.ylsoftware.com/</a><br>");
text.append("<a href=\"http://code.google.com/p/qmmp/\">http://code.google.com/p/qmmp/</a>");
text.append("</p>");
diff --git a/src/qmmpui/groupedcontainer.cpp b/src/qmmpui/groupedcontainer.cpp
index e98cf88f6..c6628a845 100644
--- a/src/qmmpui/groupedcontainer.cpp
+++ b/src/qmmpui/groupedcontainer.cpp
@@ -23,7 +23,6 @@
GroupedContainer::GroupedContainer()
{
- m_reverted = false;
m_update = true;
}
@@ -65,31 +64,26 @@ void GroupedContainer::addTrack(PlayListTrack *track)
void GroupedContainer::addTracks(QList<PlayListTrack *> tracks)
{
- PlayListGroup *group = m_groups.isEmpty() ? 0 : m_groups.last();
+ bool found = false;
- foreach (PlayListTrack *track, tracks)
+ for(int i = 0; i < tracks.count(); ++i)
{
- if(!group || track->groupName() != group->formattedTitle())
+ found = false;
+ for(int j = m_groups.count() - 1; j >= 0; --j)
{
- group = 0;
- foreach(PlayListGroup *g, m_groups)
+ if(m_groups.at(j)->formattedTitle() == tracks.at(i)->groupName())
{
- if(track->groupName() == g->formattedTitle())
- {
- group = g;
- break;
- }
+ found = true;
+ m_groups.at(j)->trackList.append(tracks[i]);
+ break;
}
}
- if(!group)
- {
- group = new PlayListGroup(track->groupName());
- m_groups.append(group);
- m_update = true;
- }
+ if(found)
+ continue;
- group->trackList.append(track);
+ m_groups << new PlayListGroup(tracks.at(i)->groupName());
+ m_groups.last()->trackList.append(tracks.at(i));
}
m_update = true;
}
@@ -123,11 +117,31 @@ void GroupedContainer::insertTrack(int index, PlayListTrack *track)
addTrack(track);
}
+void GroupedContainer::replaceTracks(QList<PlayListTrack *> tracks)
+{
+ foreach (PlayListGroup *g, m_groups)
+ {
+ g->trackList.clear();
+ }
+ clear();
+ addTracks(tracks);
+}
+
QList<PlayListGroup *> GroupedContainer::groups() const
{
return m_groups;
}
+QList<PlayListTrack *> GroupedContainer::tracks() const
+{
+ QList<PlayListTrack *> trackList;
+ for(int i = 0; i < m_groups.count(); ++i)
+ {
+ trackList.append(m_groups[i]->trackList);
+ }
+ return trackList;
+}
+
QList<PlayListItem *> GroupedContainer::items() const
{
updateCache();
@@ -389,55 +403,21 @@ void GroupedContainer::reverseList()
void GroupedContainer::randomizeList()
{
- QList<PlayListTrack *> tracks = takeAllTracks();
-
- for (int i = 0; i < tracks.size(); i++)
- tracks.swap(qrand()%tracks.size(),qrand()%tracks.size());
-
- addTracks(tracks);
-}
-
-void GroupedContainer::sort(int mode)
-{
- if(mode == PlayListModel::ARTIST || mode == PlayListModel::ALBUM
- || mode == PlayListModel::DATE || mode == PlayListModel::GROUP)
- {
- QList<PlayListTrack *> tracks = takeAllTracks();
- doSort(mode, tracks, m_reverted);
- addTracks(tracks);
- }
- else
+ for(int i = 0; i < m_groups.count(); ++i)
{
- foreach (PlayListGroup *g, m_groups)
+ for (int j = 0; j < m_groups[i]->trackList.size(); j++)
{
- doSort(mode, g->trackList, m_reverted);
+ m_groups[i]->trackList.swap(qrand() % m_groups[i]->trackList.size(),
+ qrand() % m_groups[i]->trackList.size());
}
- m_update = true;
}
- m_reverted = !m_reverted;
-}
-void GroupedContainer::sortSelection(int mode)
-{
- QList<PlayListTrack *> tracks = takeAllTracks();
- QList<PlayListTrack *> selected_tracks;
- QList<int> selected_indexes;
- for(int i = 0; i < tracks.count(); ++i)
+ for(int i = 0; i < m_groups.count(); ++i)
{
- if(tracks[i]->isSelected())
- {
- selected_tracks.append(tracks[i]);
- selected_indexes.append(i);
- }
+ m_groups.swap(qrand() % m_groups.size(), qrand() % m_groups.size());
}
- doSort(mode, selected_tracks, m_reverted);
-
- for (int i = 0; i < selected_indexes.count(); i++)
- tracks.replace(selected_indexes[i], selected_tracks[i]);
- addTracks(tracks);
-
- m_reverted = !m_reverted;
+ m_update = true;
}
void GroupedContainer::updateCache() const
diff --git a/src/qmmpui/groupedcontainer_p.h b/src/qmmpui/groupedcontainer_p.h
index 241b07fc4..449493144 100644
--- a/src/qmmpui/groupedcontainer_p.h
+++ b/src/qmmpui/groupedcontainer_p.h
@@ -37,7 +37,9 @@ public:
void addTrack(PlayListTrack *track);
void addTracks(QList<PlayListTrack *> tracks);
void insertTrack(int index, PlayListTrack *track);
+ void replaceTracks(QList<PlayListTrack *> tracks);
QList<PlayListGroup *> groups() const;
+ QList<PlayListTrack *> tracks() const;
QList<PlayListItem *> items() const;
int count() const;
int trackCount() const;
@@ -61,13 +63,10 @@ public:
void reverseList();
void randomizeList();
- void sort(int mode);
- void sortSelection(int mode);
private:
void updateCache() const;
QList<PlayListGroup *> m_groups;
- bool m_reverted;
mutable QList<PlayListItem *> m_items;
mutable bool m_update;
diff --git a/src/qmmpui/normalcontainer.cpp b/src/qmmpui/normalcontainer.cpp
index 4e585b9d6..b26b33d06 100644
--- a/src/qmmpui/normalcontainer.cpp
+++ b/src/qmmpui/normalcontainer.cpp
@@ -21,9 +21,7 @@
#include "normalcontainer_p.h"
NormalContainer::NormalContainer()
-{
- m_reverted = false;
-}
+{}
NormalContainer::~NormalContainer()
{
@@ -46,11 +44,25 @@ void NormalContainer::insertTrack(int index, PlayListTrack *track)
m_items.append(track);
}
+void NormalContainer::replaceTracks(QList<PlayListTrack *> tracks)
+{
+ m_items.clear();
+ addTracks(tracks);
+}
+
QList<PlayListGroup *> NormalContainer::groups() const
{
return QList<PlayListGroup *>();
}
+QList<PlayListTrack *> NormalContainer::tracks() const
+{
+ QList<PlayListTrack *> trackList;
+ for(int i = 0; i < m_items.count(); ++i)
+ trackList.append(dynamic_cast<PlayListTrack *>(m_items[i]));
+ return trackList;
+}
+
QList<PlayListItem *> NormalContainer::items() const
{
return m_items;
@@ -205,33 +217,3 @@ void NormalContainer::randomizeList()
for (int i = 0; i < m_items.size(); i++)
m_items.swap(qrand()%m_items.size(), qrand()%m_items.size());
}
-
-void NormalContainer::sort(int mode)
-{
- QList<PlayListTrack *> tracks = takeAllTracks();
- doSort(mode, tracks, m_reverted);
- addTracks(tracks);
- m_reverted = !m_reverted;
-}
-
-void NormalContainer::sortSelection(int mode)
-{
- QList<PlayListTrack *> tracks = takeAllTracks();
- QList<PlayListTrack *> selected_tracks;
- QList<int> selected_indexes;
- for(int i = 0; i < tracks.count(); ++i)
- {
- if(tracks[i]->isSelected())
- {
- selected_tracks.append(tracks[i]);
- selected_indexes.append(i);
- }
- }
- doSort(mode, selected_tracks, m_reverted);
-
- for (int i = 0; i < selected_indexes.count(); i++)
- tracks.replace(selected_indexes[i], selected_tracks[i]);
-
- addTracks(tracks);
- m_reverted = !m_reverted;
-}
diff --git a/src/qmmpui/normalcontainer_p.h b/src/qmmpui/normalcontainer_p.h
index c2aab57f1..803b8ada0 100644
--- a/src/qmmpui/normalcontainer_p.h
+++ b/src/qmmpui/normalcontainer_p.h
@@ -36,7 +36,9 @@ public:
void addTracks(QList<PlayListTrack *> tracks);
void insertTrack(int index, PlayListTrack *track);
+ void replaceTracks(QList<PlayListTrack *> tracks);
QList<PlayListGroup *> groups() const;
+ QList<PlayListTrack *> tracks() const;
QList<PlayListItem *> items() const;
int count() const;
int trackCount() const;
@@ -60,12 +62,9 @@ public:
void reverseList();
void randomizeList();
- void sort(int mode);
- void sortSelection(int mode);
private:
QList<PlayListItem *> m_items;
- bool m_reverted;
};
#endif // NORMALCONTAINER_P_H
diff --git a/src/qmmpui/playlistcontainer.cpp b/src/qmmpui/playlistcontainer.cpp
index 7772d1b3e..c7aaf3482 100644
--- a/src/qmmpui/playlistcontainer.cpp
+++ b/src/qmmpui/playlistcontainer.cpp
@@ -28,208 +28,3 @@ void PlayListContainer::addTrack(PlayListTrack *track)
{
addTracks(QList<PlayListTrack *> () << track);
}
-
-////===============THE BEGINNING OF SORT IMPLEMENTATION =======================////
-
-// First we'll implement bundle of static compare procedures
-// to sort items in different ways
-
-//by title
-static bool _titleLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::TITLE), s2->value(Qmmp::TITLE)) < 0;
-}
-
-static bool _titleGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::TITLE), s2->value(Qmmp::TITLE)) > 0;
-}
-//by album+disc
-static bool _discnumberLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::DISCNUMBER), s2->value(Qmmp::DISCNUMBER)) < 0;
-}
-
-static bool _discnumberGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::DISCNUMBER), s2->value(Qmmp::DISCNUMBER)) > 0;
-}
-//by album
-static bool _albumLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ALBUM), s2->value(Qmmp::ALBUM)) < 0;
-}
-
-static bool _albumGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ALBUM), s2->value(Qmmp::ALBUM)) > 0;
-}
-//by artist
-static bool _artistLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ARTIST), s2->value(Qmmp::ARTIST)) < 0;
-}
-
-static bool _artistGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ARTIST), s2->value(Qmmp::ARTIST)) > 0;
-}
-//by album artist
-static bool _albumArtistLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ALBUMARTIST), s2->value(Qmmp::ALBUMARTIST)) < 0;
-}
-
-static bool _albumArtistGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->value(Qmmp::ALBUMARTIST), s2->value(Qmmp::ALBUMARTIST)) > 0;
-}
-//by path
-static bool _pathAndFilenameLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->url(), s2->url()) < 0;
-}
-
-static bool _pathAndFilenameGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->url(), s2->url()) > 0;
-}
-//by file name
-static bool _filenameLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- QFileInfo i_s1(s1->url());
- QFileInfo i_s2(s2->url());
- return QString::localeAwareCompare (i_s1.baseName(), i_s2.baseName()) < 0;
-}
-
-static bool _filenameGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- QFileInfo i_s1(s1->url());
- QFileInfo i_s2(s2->url());
- return QString::localeAwareCompare (i_s1.baseName(), i_s2.baseName()) > 0;
-}
-//by date
-static bool _dateLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return s1->value(Qmmp::YEAR).toInt() < s2->value(Qmmp::YEAR).toInt();
-}
-
-static bool _dateGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return s1->value(Qmmp::YEAR).toInt() > s2->value(Qmmp::YEAR).toInt();
-}
-//by track
-static bool _trackLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return s1->value(Qmmp::TRACK).toInt() < s2->value(Qmmp::TRACK).toInt();
-}
-
-static bool _trackGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return s1->value(Qmmp::TRACK).toInt() > s2->value(Qmmp::TRACK).toInt();
-}
-//by file creation date
-static bool _fileCreationDateLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QFileInfo(s1->value(Qmmp::URL)).created() < QFileInfo(s2->value(Qmmp::URL)).created();
-}
-
-static bool _fileCreationDateGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QFileInfo(s1->value(Qmmp::URL)).created() > QFileInfo(s2->value(Qmmp::URL)).created();
-}
-//by file modification date
-static bool _fileModificationDateLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QFileInfo(s1->value(Qmmp::URL)).lastModified() < QFileInfo(s2->value(Qmmp::URL)).lastModified();
-}
-
-static bool _fileModificationDateGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QFileInfo(s1->value(Qmmp::URL)).lastModified() > QFileInfo(s2->value(Qmmp::URL)).lastModified();
-}
-
-//by group
-static bool _groupLessComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->groupName(), s2->groupName()) < 0;
-}
-
-static bool _groupGreaterComparator(PlayListTrack* s1,PlayListTrack* s2)
-{
- return QString::localeAwareCompare (s1->groupName(), s2->groupName()) > 0;
-}
-
-void PlayListContainer::doSort(int sort_mode, QList<PlayListTrack*>& list_to_sort, bool reverted)
-{
- QList<PlayListTrack*>::iterator begin;
- QList<PlayListTrack*>::iterator end;
-
- begin = list_to_sort.begin();
- end = list_to_sort.end();
-
- bool(*compareLessFunc)(PlayListTrack*,PlayListTrack*) = 0;
- bool(*compareGreaterFunc)(PlayListTrack*,PlayListTrack*) = 0;
-
- switch (sort_mode)
- {
- case PlayListModel::TITLE:
- compareLessFunc = _titleLessComparator;
- compareGreaterFunc = _titleGreaterComparator;
- break;
- case PlayListModel::DISCNUMBER:
- compareLessFunc = _discnumberLessComparator;
- compareGreaterFunc = _discnumberGreaterComparator;
- break;
- case PlayListModel::ALBUM:
- compareLessFunc = _albumLessComparator;
- compareGreaterFunc = _albumGreaterComparator;
- break;
- case PlayListModel::ARTIST:
- compareLessFunc = _artistLessComparator;
- compareGreaterFunc = _artistGreaterComparator;
- break;
- case PlayListModel::ALBUMARTIST:
- compareLessFunc = _albumArtistLessComparator;
- compareGreaterFunc = _albumArtistGreaterComparator;
- break;
- case PlayListModel::FILENAME:
- compareLessFunc = _filenameLessComparator;
- compareGreaterFunc = _filenameGreaterComparator;
- break;
- case PlayListModel::PATH_AND_FILENAME:
- compareLessFunc = _pathAndFilenameLessComparator;
- compareGreaterFunc = _pathAndFilenameGreaterComparator;
- break;
- case PlayListModel::DATE:
- compareLessFunc = _dateLessComparator;
- compareGreaterFunc = _dateGreaterComparator;
- break;
- case PlayListModel::TRACK:
- compareLessFunc = _trackLessComparator;
- compareGreaterFunc = _trackGreaterComparator;
- break;
- case PlayListModel::FILE_CREATION_DATE:
- compareLessFunc = _fileCreationDateLessComparator;
- compareGreaterFunc = _fileCreationDateGreaterComparator;
- break;
- case PlayListModel::FILE_MODIFICATION_DATE:
- compareLessFunc = _fileModificationDateLessComparator;
- compareGreaterFunc = _fileModificationDateGreaterComparator;
- break;
- case PlayListModel::GROUP:
- compareLessFunc = _groupLessComparator;
- compareGreaterFunc = _groupGreaterComparator;
- break;
- default:
- compareLessFunc = _titleLessComparator;
- compareGreaterFunc = _titleGreaterComparator;
- }
-
- if(reverted)
- qStableSort(begin,end,compareGreaterFunc);
- else
- qStableSort(begin,end,compareLessFunc);
-}
-
-////=============== THE END OF SORT IMPLEMENTATION =======================////
diff --git a/src/qmmpui/playlistcontainer_p.h b/src/qmmpui/playlistcontainer_p.h
index b72aa4519..351a3b30f 100644
--- a/src/qmmpui/playlistcontainer_p.h
+++ b/src/qmmpui/playlistcontainer_p.h
@@ -41,8 +41,10 @@ public:
virtual void addTrack(PlayListTrack *track);
virtual void addTracks(QList<PlayListTrack *> tracks) = 0;
virtual void insertTrack(int index, PlayListTrack *track) = 0;
+ virtual void replaceTracks(QList<PlayListTrack *> tracks) = 0;
virtual QList<PlayListGroup *> groups() const = 0;
virtual QList<PlayListItem *> items() const = 0;
+ virtual QList<PlayListTrack *> tracks() const = 0;
virtual int count() const = 0;
virtual int trackCount() const = 0;
virtual QList<PlayListItem *> mid(int pos, int count) const = 0;
@@ -65,14 +67,6 @@ public:
virtual void reverseList() = 0;
virtual void randomizeList() = 0;
- virtual void sort(int mode) = 0;
- virtual void sortSelection(int mode) = 0;
-
-protected:
- /*!
- * This internal method performs sorting of \b list_to_sort list of items.
- */
- void doSort(int sort_mode, QList<PlayListTrack*>& list_to_sort, bool reverted);
};
#endif // PLAYLISTCONTAINER_P_H
diff --git a/src/qmmpui/playlistgroup.cpp b/src/qmmpui/playlistgroup.cpp
index d5d5ba42b..ad3a5bc16 100644
--- a/src/qmmpui/playlistgroup.cpp
+++ b/src/qmmpui/playlistgroup.cpp
@@ -31,14 +31,10 @@ PlayListGroup::~PlayListGroup()
{
PlayListTrack* mf = trackList.takeFirst();
- if (mf->flag() == PlayListTrack::FREE)
- {
+ if (mf->isUsed())
+ mf->deleteLater();
+ else
delete mf;
- }
- else if (mf->flag() == PlayListTrack::EDITING)
- {
- mf->setFlag(PlayListTrack::SCHEDULED_FOR_DELETION);
- }
}
}
diff --git a/src/qmmpui/playlistmanager.cpp b/src/qmmpui/playlistmanager.cpp
index e99a49a81..17dbd67e8 100644
--- a/src/qmmpui/playlistmanager.cpp
+++ b/src/qmmpui/playlistmanager.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2014 by Ilya Kotov *
+ * Copyright (C) 2009-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -166,7 +166,7 @@ PlayListModel *PlayListManager::createPlayList(const QString &name)
}
m_models.append(model);
connect(model, SIGNAL(nameChanged(QString)), SIGNAL(playListsChanged()));
- connect(model, SIGNAL(countChanged()), SLOT(onCountChanged()));
+ connect(model, SIGNAL(listChanged(int)), SLOT(onListChanged(int)));
emit playListAdded(m_models.indexOf(model));
selectPlayList(model);
return model;
@@ -314,7 +314,7 @@ void PlayListManager::readPlayLists()
foreach(PlayListModel *model, m_models)
{
connect(model, SIGNAL(nameChanged(QString)), SIGNAL(playListsChanged()));
- connect(model, SIGNAL(countChanged()), SLOT(onCountChanged()));
+ connect(model, SIGNAL(listChanged(int)), SLOT(onListChanged(int)));
}
}
@@ -373,9 +373,9 @@ void PlayListManager::writePlayLists()
}
}
-void PlayListManager::onCountChanged()
+void PlayListManager::onListChanged(int flags)
{
- if(m_ui_settings->autoSavePlayList())
+ if((flags & PlayListModel::STRUCTURE) && m_ui_settings->autoSavePlayList())
m_timer->start();
}
diff --git a/src/qmmpui/playlistmanager.h b/src/qmmpui/playlistmanager.h
index 6962fb2ba..4222273aa 100644
--- a/src/qmmpui/playlistmanager.h
+++ b/src/qmmpui/playlistmanager.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2014 by Ilya Kotov *
+ * Copyright (C) 2009-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -239,7 +239,7 @@ public slots:
private slots:
void writePlayLists();
- void onCountChanged();
+ void onListChanged(int flags);
private:
void readPlayLists();
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp
index c41bd11c1..52392ed64 100644
--- a/src/qmmpui/playlistmodel.cpp
+++ b/src/qmmpui/playlistmodel.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright(C) 2006-2014 by Ilya Kotov *
+ * Copyright(C) 2006-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -27,6 +27,7 @@
#include "playlistcontainer_p.h"
#include "groupedcontainer_p.h"
#include "normalcontainer_p.h"
+#include "playlisttask_p.h"
#include "fileloader_p.h"
#include "playstate_p.h"
#include "detailsdialog.h"
@@ -46,6 +47,7 @@ PlayListModel::PlayListModel(const QString &name, QObject *parent)
m_stop_track = 0;
m_name = name;
m_loader = new FileLoader(this);
+ m_task = new PlayListTask(this);
if(m_ui_settings->isGroupsEnabled())
m_container = new GroupedContainer;
else
@@ -62,6 +64,7 @@ PlayListModel::PlayListModel(const QString &name, QObject *parent)
SLOT(insert(PlayListItem*, PlayListTrack*)), Qt::QueuedConnection);
connect(m_loader, SIGNAL(finished()), SLOT(preparePlayState()));
connect(m_loader, SIGNAL(finished()), SIGNAL(loaderFinished()));
+ connect(m_task, SIGNAL(finished()), SLOT(onTaskFinished()));
}
PlayListModel::~PlayListModel()
@@ -91,21 +94,21 @@ void PlayListModel::add(PlayListTrack *track)
{
m_container->addTrack(track);
m_total_length += track->length();
+ int flags = 0;
if(m_container->trackCount() == 1)
{
m_current_track = track;
m_current = m_container->indexOf(track);
- emit currentChanged();
+ flags |= CURRENT;
}
else if(m_ui_settings->isGroupsEnabled())
{
//update current index for grouped container only
m_current = m_container->indexOf(m_current_track);
}
- emit trackAdded(track);
- emit listChanged();
- emit countChanged();
+ flags |= STRUCTURE;
+ emit listChanged(flags);
}
void PlayListModel::add(QList<PlayListTrack *> tracks)
@@ -113,13 +116,15 @@ void PlayListModel::add(QList<PlayListTrack *> tracks)
if(tracks.isEmpty())
return;
+ int flags = 0;
+
m_container->addTracks(tracks);
if(m_container->trackCount() == tracks.count())
{
m_current_track = tracks.first();
m_current = m_container->indexOf(m_current_track);
- emit currentChanged();
+ flags |= CURRENT;
}
else if(m_ui_settings->isGroupsEnabled())
{
@@ -133,23 +138,32 @@ void PlayListModel::add(QList<PlayListTrack *> tracks)
emit trackAdded(track);
}
preparePlayState();
- emit listChanged();
- emit countChanged();
+ flags |= STRUCTURE;
+ emit listChanged(flags);
}
void PlayListModel::add(const QString &path)
{
- m_loader->add(path);
- loadPlaylist(path);
+ QStringList paths = PlayListParser::loadPlaylist(path);
+ if(paths.isEmpty())
+ m_loader->add(path);
+ else
+ m_loader->add(paths);
}
void PlayListModel::add(const QStringList &paths)
{
- m_loader->add(paths);
- foreach(QString str, paths)
+ QStringList urls, pl_urls;
+ foreach(QString path, paths)
{
- loadPlaylist(str);
+ pl_urls = PlayListParser::loadPlaylist(path); //is it playlist?
+ if(pl_urls.isEmpty())
+ urls.append(path);
+ else
+ urls.append(pl_urls);
+
}
+ m_loader->add(urls);
}
void PlayListModel::insert(int index, PlayListTrack *track)
@@ -157,11 +171,13 @@ void PlayListModel::insert(int index, PlayListTrack *track)
m_container->insertTrack(index, track);
m_total_length += track->length();
+ int flags = 0;
+
if(m_container->trackCount() == 1)
{
m_current_track = track;
m_current = m_container->indexOf(track);
- emit currentChanged();
+ flags |= CURRENT;
}
else
{
@@ -169,8 +185,8 @@ void PlayListModel::insert(int index, PlayListTrack *track)
m_current = m_container->indexOf(m_current_track);
}
emit trackAdded(track);
- emit listChanged();
- emit countChanged();
+ flags |= STRUCTURE;
+ emit listChanged(flags);
}
void PlayListModel::insert(PlayListItem *before, PlayListTrack *track)
@@ -183,6 +199,8 @@ void PlayListModel::insert(int index, QList<PlayListTrack *> tracks)
if(tracks.isEmpty())
return;
+ int flags = 0;
+
PlayListItem *prevItem = m_container->item(index);
foreach(PlayListTrack *track, tracks)
{
@@ -194,15 +212,15 @@ void PlayListModel::insert(int index, QList<PlayListTrack *> tracks)
{
m_current_track = track;
m_current = m_container->indexOf(track);
- emit currentChanged();
+ flags |= CURRENT;
}
emit trackAdded(track);
}
//update current index
m_current = m_container->indexOf(m_current_track);
preparePlayState();
- emit listChanged();
- emit countChanged();
+ flags |= STRUCTURE;
+ emit listChanged(flags);
}
void PlayListModel::insert(int index, const QString &path)
@@ -304,8 +322,7 @@ bool PlayListModel::setCurrent(int index)
}
m_current = index;
m_current_track = dynamic_cast<PlayListTrack*> (item);
- emit currentChanged();
- emit listChanged();
+ emit listChanged(CURRENT);
return true;
}
@@ -335,12 +352,14 @@ bool PlayListModel::next()
if(m_stop_track == currentTrack())
{
m_stop_track = 0;
- emit listChanged();
+ emit listChanged(STOP_AFTER);
return false;
}
- if (!isEmptyQueue())
+ if (!m_queued_songs.isEmpty())
{
- setCurrentToQueued();
+ m_current_track = m_queued_songs.dequeue();
+ m_current = m_container->indexOf(m_current_track);
+ emit listChanged(CURRENT | QUEUE);
return true;
}
@@ -365,14 +384,13 @@ void PlayListModel::clear()
m_queued_songs.clear();
m_total_length = 0;
m_play_state->resetState();
- emit listChanged();
- emit countChanged();
+ emit listChanged(STRUCTURE | QUEUE | STOP_AFTER | CURRENT | SELECTION);
}
void PlayListModel::clearSelection()
{
m_container->clearSelection();
- emit listChanged();
+ emit listChanged(SELECTION);
}
QList<PlayListItem *> PlayListModel::mid(int pos, int count) const
@@ -411,21 +429,21 @@ PlayListTrack *PlayListModel::findTrack(int number) const
void PlayListModel::setSelected(int index, bool selected)
{
m_container->setSelected(index, selected);
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::setSelected(QList<PlayListTrack *> tracks, bool selected)
{
foreach(PlayListTrack *t, tracks)
t->setSelected(selected);
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::setSelected(QList<PlayListItem *> items, bool selected)
{
foreach(PlayListItem *i, items)
i->setSelected(selected);
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::setSelected(int first, int last, bool selected)
@@ -442,7 +460,7 @@ void PlayListModel::setSelected(int first, int last, bool selected)
continue;
i->setSelected(selected);
}
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::removeSelected()
@@ -457,55 +475,9 @@ void PlayListModel::removeUnselected()
void PlayListModel::removeTrack (int i)
{
- bool current_changed = false;
- if ((i < count()) && (i >= 0))
- {
- PlayListTrack* track = m_container->track(i);
- if(!track)
- return;
- m_queued_songs.removeAll(track);
- m_container->removeTrack(track);
- if(m_stop_track == track)
- m_stop_track = 0;
- m_total_length -= track->length();
- m_total_length = qMax(0, m_total_length);
-
- if(m_current_track == track)
- {
- if(m_container->isEmpty())
- m_current_track = 0;
- else
- {
- current_changed = true;
- int current = qMin(i - 1, m_container->count() - 1);
- current = qMax(current, 0);
- m_current_track = m_container->track(current);
- if(!m_current_track)
- {
- m_current_track = current > 0 ? m_container->track(current-1) :
- m_container->track(1);
- }
- }
- }
-
- if (track->flag() == PlayListTrack::FREE)
- {
- delete track;
- track = NULL;
- }
- else if (track->flag() == PlayListTrack::EDITING)
- track->setFlag(PlayListTrack::SCHEDULED_FOR_DELETION);
-
-
- m_current = m_current_track ? m_container->indexOf(m_current_track) : -1;
- m_play_state->prepare();
-
- if(current_changed)
- emit currentChanged();
-
- emit listChanged();
- emit countChanged();
- }
+ int flags = removeTrackInternal(i);
+ if(flags)
+ emit listChanged(flags);
}
void PlayListModel::removeTrack (PlayListItem *track)
@@ -518,16 +490,14 @@ void PlayListModel::removeSelection(bool inverted)
{
int i = 0;
int select_after_delete = -1;
- PlayListTrack *prev_current_track = m_current_track;
+ int flags = 0;
while (!m_container->isEmpty() && i < m_container->count())
{
PlayListItem *item = m_container->item(i);
if (!item->isGroup() && item->isSelected() ^ inverted)
{
- blockSignals(true);
- removeTrack(i);
- blockSignals(false);
+ flags |= removeTrackInternal(i);
if(m_container->isEmpty())
continue;
@@ -538,33 +508,83 @@ void PlayListModel::removeSelection(bool inverted)
i++;
}
- if (select_after_delete >= m_container->count())
- select_after_delete = m_container->count() - 1;
+ select_after_delete = qMin(select_after_delete, m_container->count() - 1);
- if(select_after_delete != -1)
+ if(select_after_delete >= 0)
+ {
m_container->setSelected(select_after_delete, true);
+ flags |= SELECTION;
+ }
m_play_state->prepare();
- if(prev_current_track != m_current_track)
- emit currentChanged();
+ if(flags)
+ emit listChanged(flags);
+}
- emit listChanged();
- emit countChanged();
+int PlayListModel::removeTrackInternal(int i)
+{
+ if((i < 0) || (i >= count()))
+ return 0;
+
+ int flags = 0;
+ PlayListTrack* track = m_container->track(i);
+ if(!track)
+ return flags;
+ if(m_queued_songs.removeAll(track) > 0)
+ flags |= QUEUE;
+ m_container->removeTrack(track);
+ if(m_stop_track == track)
+ {
+ flags |= STOP_AFTER;
+ m_stop_track = 0;
+ }
+ if(track->isSelected())
+ flags |= SELECTION;
+
+ m_total_length -= track->length();
+ m_total_length = qMax(0, m_total_length);
+
+ if(m_current_track == track)
+ {
+ flags |= CURRENT;
+ if(m_container->isEmpty())
+ m_current_track = 0;
+ else
+ {
+ m_current = i > 0 ? qMin(i - 1, m_container->count() - 1) : 0;
+ if(!(m_current_track = m_container->track(m_current)))
+ {
+ m_current_track = m_current > 0 ? m_container->track(m_current - 1) :
+ m_container->track(1);
+ }
+ }
+ }
+
+ if (track->isUsed())
+ track->deleteLater();
+ else
+ delete track;
+
+ m_current = m_current_track ? m_container->indexOf(m_current_track) : -1;
+ m_play_state->prepare();
+
+ flags |= STRUCTURE;
+ return flags;
}
void PlayListModel::invertSelection()
{
for (int i = 0; i < m_container->count(); ++i)
m_container->setSelected(i, !m_container->isSelected(i));
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::selectAll()
{
for (int i = 0; i < m_container->count(); ++i)
m_container->setSelected(i, true);
- emit listChanged();
+ emit listChanged(SELECTION);
}
void PlayListModel::showDetails(QWidget *parent)
@@ -576,9 +596,8 @@ void PlayListModel::showDetails(QWidget *parent)
if(!m_container->isSelected(i))
continue;
PlayListTrack *track = m_container->track(i);
- if(!track || track->flag() != PlayListTrack::FREE)
- continue;
- selected_tracks.append(track);
+ if(track)
+ selected_tracks.append(track);
}
if(!selected_tracks.isEmpty())
@@ -640,7 +659,7 @@ void PlayListModel::moveItems(int from, int to)
if(m_container->move(selected_indexes, from, to))
{
m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+ emit listChanged(STRUCTURE);
}
}
@@ -714,9 +733,11 @@ QList<PlayListItem *> PlayListModel::items() const
void PlayListModel::addToQueue()
{
QList<PlayListTrack*> selected_tracks = selectedTracks();
+ blockSignals(true);
foreach(PlayListTrack* track, selected_tracks)
setQueued(track);
- emit listChanged();
+ blockSignals(false);
+ emit listChanged(QUEUE);
}
void PlayListModel::setQueued(PlayListTrack *item)
@@ -725,7 +746,7 @@ void PlayListModel::setQueued(PlayListTrack *item)
m_queued_songs.removeAll(item);
else
m_queued_songs.enqueue(item);
- emit listChanged();
+ emit listChanged(QUEUE);
}
bool PlayListModel::isQueued(PlayListTrack *f) const
@@ -733,11 +754,6 @@ bool PlayListModel::isQueued(PlayListTrack *f) const
return m_queued_songs.contains(f);
}
-void PlayListModel::setCurrentToQueued()
-{
- setCurrent(indexOf(m_queued_songs.dequeue()));
-}
-
bool PlayListModel::isEmptyQueue() const
{
return m_queued_songs.isEmpty();
@@ -764,7 +780,7 @@ void PlayListModel::randomizeList()
return;
m_container->randomizeList();
m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+ emit listChanged(STRUCTURE);
}
void PlayListModel::reverseList()
@@ -773,25 +789,23 @@ void PlayListModel::reverseList()
return;
m_container->reverseList();
m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+ emit listChanged(STRUCTURE);
}
void PlayListModel::sortSelection(int mode)
{
if(m_container->isEmpty())
return;
- m_container->sortSelection(mode);
- m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+
+ m_task->sortSelection(m_container->tracks(), (PlayListModel::SortMode) mode);
}
void PlayListModel::sort(int mode)
{
if(m_container->isEmpty())
return;
- m_container->sort(mode);
- m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+
+ m_task->sort(m_container->tracks(), (PlayListModel::SortMode) mode);
}
void PlayListModel::prepareForShufflePlaying(bool val)
@@ -817,13 +831,60 @@ void PlayListModel::prepareGroups(bool enabled)
m_container = container;
if(!m_container->isEmpty())
m_current = m_container->indexOf(m_current_track);
- emit listChanged();
+ emit listChanged(STRUCTURE);
+}
+
+void PlayListModel::onTaskFinished()
+{
+ if(m_task->isChanged(m_container)) //update unchanged container only
+ return;
+
+ if(m_task->type() == PlayListTask::SORT || m_task->type() == PlayListTask::SORT_SELECTION)
+ {
+ m_container->replaceTracks(m_task->takeResults(&m_current_track));
+ m_current = m_container->indexOf(m_current_track);
+ emit listChanged(STRUCTURE);
+ }
+ else if(m_task->type() == PlayListTask::REMOVE_INVALID
+ || m_task->type() == PlayListTask::REMOVE_DUPLICATES)
+ {
+ PlayListTrack *prev_current_track = m_current_track;
+ bool prev_count = m_container->count();
+
+ m_container->replaceTracks(m_task->takeResults(&m_current_track));
+
+ if(prev_count != m_container->count())
+ {
+ int flags = STRUCTURE;
+ m_current = m_container->indexOf(m_current_track);
+ if(prev_current_track != m_current_track)
+ flags |= CURRENT;
+
+ if(m_stop_track && !m_container->contains(m_stop_track))
+ {
+ m_stop_track = 0;
+ flags |= STOP_AFTER;
+ }
+
+ foreach (PlayListTrack *t, m_queued_songs)
+ {
+ if(!m_container->contains(t))
+ {
+ flags |= QUEUE;
+ m_queued_songs.removeAll(t);
+ }
+ }
+
+ emit listChanged(flags);
+ }
+ }
}
void PlayListModel::doCurrentVisibleRequest()
{
- emit currentChanged();
- emit listChanged();
+ //TODO check these signals
+ //emit currentChanged();
+ //emit listChanged();
}
void PlayListModel::loadPlaylist(const QString &f_name)
@@ -855,70 +916,25 @@ void PlayListModel::preparePlayState()
void PlayListModel::removeInvalidTracks()
{
- bool ok = false;
-
- for(int i = m_container->count() - 1; i >= 0; i--)
- {
- if(i >= m_container->count() || !isTrack(i))
- continue;
-
- PlayListTrack *track = m_container->track(i);
-
- if(track->url().contains("://"))
- ok = MetaDataManager::instance()->protocols().contains(track->url().section("://",0,0));
- else
- ok = MetaDataManager::instance()->supports(track->url());
- if(!ok)
- removeTrack(i);
-
- }
+ m_task->removeInvalidTracks(m_container->tracks(), m_current_track);
}
void PlayListModel::removeDuplicates()
{
- QStringList urls;
- bool modified = false;
- PlayListTrack *prev_current = m_current_track;
-
- for(int i = 0; i < m_container->count(); ++i)
- {
- if(!isTrack(i))
- continue;
-
- if(urls.contains(track(i)->url()))
- {
- blockSignals(true);
- removeTrack(i);
- blockSignals(false);
- modified = true;
- i--;
- }
- else
- {
- urls.append(track(i)->url());
- }
- }
-
- if(modified)
- {
- if(m_current_track != prev_current)
- emit currentChanged();
-
- emit listChanged();
- emit countChanged();
- }
+ m_task->removeDuplicates(m_container->tracks(), m_current_track);
}
void PlayListModel::clearQueue()
{
m_queued_songs.clear();
m_stop_track = 0;
- emit listChanged();
+ emit listChanged(QUEUE);
}
void PlayListModel::stopAfterSelected()
{
QList<PlayListTrack*> selected_tracks = selectedTracks();
+ int flags = STOP_AFTER;
if(!m_queued_songs.isEmpty())
{
m_stop_track = m_stop_track != m_queued_songs.last() ? m_queued_songs.last() : 0;
@@ -929,15 +945,18 @@ void PlayListModel::stopAfterSelected()
}
else if(selected_tracks.count() > 1)
{
+ blockSignals(true);
addToQueue();
+ blockSignals(false);
+ flags |= QUEUE;
m_stop_track = m_queued_songs.last();
}
else
return;
- emit listChanged();
+ emit listChanged(flags);
}
-void PlayListModel::updateGroups()
+void PlayListModel::rebuildGroups()
{
if(m_ui_settings->isGroupsEnabled())
prepareGroups(true);
diff --git a/src/qmmpui/playlistmodel.h b/src/qmmpui/playlistmodel.h
index 06333fb61..a4f411f34 100644
--- a/src/qmmpui/playlistmodel.h
+++ b/src/qmmpui/playlistmodel.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2014 by Ilya Kotov *
+ * Copyright (C) 2006-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -37,6 +37,7 @@ class PlayListFormat;
class PlayListModel;
class PlayListContainer;
class QmmpUiSettings;
+class PlayListTask;
/*! @brief Helper class that keeps track of a view's selected items.
*
@@ -214,10 +215,6 @@ public:
*/
bool isQueued(PlayListTrack* item) const;
/*!
- * Sets current song to the file that is nex in queue, if queue is empty - does nothing
- */
- void setCurrentToQueued();
- /*!
* Returns \b true if play queue is empty,otherwise returns - \b false.
*/
bool isEmptyQueue()const;
@@ -304,15 +301,21 @@ public:
PlayListTrack *findTrack(int number) const;
+
+ enum UpdateFlags
+ {
+ STRUCTURE = 0x01, //added/removed/moved
+ SELECTION = 0x02,
+ QUEUE = 0x04,
+ CURRENT = 0x08,
+ STOP_AFTER = 0x10
+ };
+
signals:
/*!
* Emitted when the state of PlayListModel has changed.
*/
- void listChanged();
- /*!
- * Emitted when current item has changed.
- */
- void currentChanged();
+ void listChanged(int flags);
/*!
* Emitted when new track has added.
* @param track Pointer of the new playlist track.
@@ -327,10 +330,6 @@ signals:
* Emitted when playlist loader thread has finished.
*/
void loaderFinished();
- /*!
- * Emitted when playlist items are added or removed.
- */
- void countChanged();
public slots:
/*!
@@ -466,7 +465,7 @@ public slots:
/*!
* Rebuilds groups
*/
- void updateGroups();
+ void rebuildGroups();
private:
/*!
@@ -483,6 +482,8 @@ private:
*/
void removeSelection(bool inverted = false);
+ int removeTrackInternal(int i);
+
private slots:
/*!
* Prepares play state object
@@ -498,6 +499,8 @@ private slots:
*/
void prepareGroups(bool enabled);
+ void onTaskFinished();
+
private:
PlayListTrack* m_current_track;
PlayListTrack* m_stop_track;
@@ -510,6 +513,7 @@ private:
QString m_name;
PlayListContainer *m_container;
QmmpUiSettings *m_ui_settings;
+ PlayListTask *m_task;
};
#endif
diff --git a/src/qmmpui/playlisttask.cpp b/src/qmmpui/playlisttask.cpp
index fc23618e5..f1859135e 100644
--- a/src/qmmpui/playlisttask.cpp
+++ b/src/qmmpui/playlisttask.cpp
@@ -18,14 +18,381 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
+#include <QFileInfo>
+#include <QDateTime>
+#include <QTime>
+#include <qmmp/metadatamanager.h>
+#include "qmmpuisettings.h"
+#include "playlisttrack.h"
#include "playlisttask_p.h"
-PlayListTask::PlayListTask(QObject *parent) :
- QRunnable(parent)
+struct TrackField
{
+ PlayListTrack *track;
+ QString value;
+ QString groupName;
+};
+
+struct GroupdField
+{
+ QList <TrackField *> fields;
+ QString groupName;
+};
+
+////===============THE BEGINNING OF SORT IMPLEMENTATION =======================////
+
+// First we'll implement bundle of static compare procedures
+// to sort items in different ways
+
+//by string
+static bool _stringLessComparator(TrackField* s1, TrackField* s2)
+{
+ return QString::localeAwareCompare (s1->value, s2->value) < 0;
+}
+
+static bool _stringGreaterComparator(TrackField* s1, TrackField* s2)
+{
+ return QString::localeAwareCompare (s1->value, s2->value) > 0;
+}
+//by number
+static bool _numberLessComparator(TrackField* s1, TrackField* s2)
+{
+ return s1->value.toInt() < s2->value.toInt();
+}
+
+static bool _numberGreaterComparator(TrackField* s1, TrackField* s2)
+{
+ return s1->value.toInt() > s2->value.toInt();
+}
+//by file creation date
+static bool _fileCreationDateLessComparator(TrackField* s1, TrackField* s2)
+{
+ return QFileInfo(s1->value).created() < QFileInfo(s2->value).created();
+}
+
+static bool _fileCreationDateGreaterComparator(TrackField* s1, TrackField* s2)
+{
+ return QFileInfo(s1->value).created() > QFileInfo(s2->value).created();
+}
+//by file modification date
+static bool _fileModificationDateLessComparator(TrackField* s1, TrackField* s2)
+{
+ return QFileInfo(s1->value).lastModified() < QFileInfo(s2->value).lastModified();
+}
+
+static bool _fileModificationDateGreaterComparator(TrackField* s1, TrackField* s2)
+{
+ return QFileInfo(s1->value).lastModified() > QFileInfo(s2->value).lastModified();
+}
+//by file name
+static bool _filenameLessComparator(TrackField* s1, TrackField* s2)
+{
+ QFileInfo i_s1(s1->value);
+ QFileInfo i_s2(s2->value);
+ return QString::localeAwareCompare (i_s1.baseName(), i_s2.baseName()) < 0;
+}
+
+static bool _filenameGreaterComparator(TrackField* s1, TrackField* s2)
+{
+ QFileInfo i_s1(s1->value);
+ QFileInfo i_s2(s2->value);
+ return QString::localeAwareCompare (i_s1.baseName(), i_s2.baseName()) > 0;
+}
+////=============== THE END OF SORT IMPLEMENTATION =======================////
+
+PlayListTask::PlayListTask(QObject *parent) : QThread(parent)
+{
+ m_reverted = true;
+ m_align_groups = false;
+ m_current_track = 0;
+ m_task = EMPTY;
+
+ m_sort_keys.insert(PlayListModel::TITLE, Qmmp::TITLE);
+ m_sort_keys.insert(PlayListModel::DISCNUMBER, Qmmp::DISCNUMBER);
+ m_sort_keys.insert(PlayListModel::ALBUM, Qmmp::ALBUM);
+ m_sort_keys.insert(PlayListModel::ARTIST, Qmmp::ARTIST);
+ m_sort_keys.insert(PlayListModel::ALBUMARTIST, Qmmp::ALBUMARTIST);
+ m_sort_keys.insert(PlayListModel::FILENAME, Qmmp::URL);
+ m_sort_keys.insert(PlayListModel::PATH_AND_FILENAME, Qmmp::URL);
+ m_sort_keys.insert(PlayListModel::DATE, Qmmp::YEAR);
+ m_sort_keys.insert(PlayListModel::TRACK, Qmmp::TRACK);
+ m_sort_keys.insert(PlayListModel::FILE_CREATION_DATE, Qmmp::URL);
+ m_sort_keys.insert(PlayListModel::FILE_MODIFICATION_DATE, Qmmp::URL);
+}
+
+PlayListTask::~PlayListTask()
+{}
+
+void PlayListTask::sort(QList<PlayListTrack *> tracks, int mode)
+{
+ if(isRunning())
+ return;
+ clear();
+ m_reverted = !m_reverted;
+ m_sort_mode = mode;
+ m_task = SORT;
+ m_input_tracks = tracks;
+ Qmmp::MetaData key = m_sort_keys.value(mode);
+
+ m_align_groups = QmmpUiSettings::instance()->isGroupsEnabled() && (mode != PlayListModel::GROUP);
+
+ foreach (PlayListTrack *t, tracks)
+ {
+ TrackField *f = new TrackField;
+ f->track = t;
+ f->value = (mode == PlayListModel::GROUP) ? t->groupName() : t->value(key);
+ if(m_align_groups)
+ f->groupName = t->groupName();
+ m_fields.append(f);
+ }
+
+ start();
+}
+
+void PlayListTask::sortSelection(QList<PlayListTrack *> tracks, int mode)
+{
+ if(isRunning())
+ return;
+ clear();
+ m_reverted = !m_reverted;
+ m_sort_mode = mode;
+ m_task = SORT_SELECTION;
+ m_tracks = tracks;
+ m_input_tracks = tracks;
+ Qmmp::MetaData key = m_sort_keys.value(mode);
+
+ for(int i = 0; i < tracks.count(); ++i)
+ {
+ if(!tracks[i]->isSelected())
+ continue;
+
+ TrackField *f = new TrackField;
+ f->track = tracks[i];
+ f->value = (mode == PlayListModel::GROUP) ? f->track->groupName() : f->track->value(key);
+ m_fields.append(f);
+ m_indexes.append(i);
+ }
+
+ start();
+}
+
+void PlayListTask::removeInvalidTracks(QList<PlayListTrack *> tracks, PlayListTrack *current_track)
+{
+ if(isRunning())
+ return;
+ clear();
+ m_task = REMOVE_INVALID;
+ m_input_tracks = tracks;
+ m_tracks = tracks;
+ m_current_track = current_track;
+
+ for(int i = 0; i < tracks.count(); ++i)
+ {
+ TrackField *f = new TrackField;
+ f->track = tracks[i];
+ f->value = f->track->value(Qmmp::URL);
+ m_fields.append(f);
+ }
+ MetaDataManager::instance()->prepareForAnotherThread();
+ start();
+}
+
+void PlayListTask::removeDuplicates(QList<PlayListTrack *> tracks, PlayListTrack *current_track)
+{
+ if(isRunning())
+ return;
+ clear();
+ m_task = REMOVE_DUPLICATES;
+ m_input_tracks = tracks;
+ m_tracks = tracks;
+ m_current_track = current_track;
+
+ for(int i = 0; i < tracks.count(); ++i)
+ {
+ TrackField *f = new TrackField;
+ f->track = tracks[i];
+ f->value = f->track->value(Qmmp::URL);
+ m_fields.append(f);
+ }
+ MetaDataManager::instance()->prepareForAnotherThread();
+ start();
}
void PlayListTask::run()
{
+ qDebug("PlayListTask: started");
+
+ if(m_task == SORT || m_task == SORT_SELECTION)
+ {
+ bool(*compareLessFunc)(TrackField*, TrackField*) = 0;
+ bool(*compareGreaterFunc)(TrackField*, TrackField*) = 0;
+
+ QList<TrackField*>::iterator begin = m_fields.begin();
+ QList<TrackField*>::iterator end = m_fields.end();
+
+ if(m_sort_mode == PlayListModel::FILE_CREATION_DATE)
+ {
+ compareLessFunc = _fileCreationDateLessComparator;
+ compareGreaterFunc = _fileCreationDateGreaterComparator;
+ }
+ else if(m_sort_mode == PlayListModel::FILE_MODIFICATION_DATE)
+ {
+ compareLessFunc = _fileModificationDateLessComparator;
+ compareGreaterFunc = _fileModificationDateGreaterComparator;
+ }
+ else if(m_sort_mode == PlayListModel::TRACK || m_sort_mode == PlayListModel::DATE)
+ {
+ compareLessFunc = _numberLessComparator;
+ compareGreaterFunc = _numberGreaterComparator;
+ }
+ else if(m_sort_mode == PlayListModel::FILENAME)
+ {
+ compareLessFunc = _filenameLessComparator;
+ compareGreaterFunc = _filenameGreaterComparator;
+ }
+ else
+ {
+ compareLessFunc = _stringLessComparator;
+ compareGreaterFunc = _stringGreaterComparator;
+ }
+
+ if(m_reverted)
+ qStableSort(begin,end,compareGreaterFunc);
+ else
+ qStableSort(begin,end,compareLessFunc);
+
+ //align track list by group name (optimization)
+ if(m_align_groups)
+ {
+ QList<GroupdField *> groups;
+ bool found = false;
+ for(int i = 0; i < m_fields.count(); ++i)
+ {
+ found = false;
+ for(int j = groups.count() - 1; j >= 0; j--)
+ {
+ if(groups[j]->groupName == m_fields[i]->groupName)
+ {
+ groups[j]->fields.append(m_fields[i]);
+ found = true;
+ break;
+ }
+ }
+
+ if(!found)
+ {
+ groups << new GroupdField;
+ groups.last()->fields.append(m_fields[i]);
+ groups.last()->groupName = m_fields[i]->groupName;
+ }
+ }
+
+ m_fields.clear();
+ for(int j = 0; j < groups.count(); ++j)
+ {
+ m_fields.append(groups[j]->fields);
+ }
+ qDeleteAll(groups);
+ groups.clear();
+ }
+ }
+ else if(m_task == REMOVE_INVALID)
+ {
+ TrackField *f = 0;
+ bool ok = false;
+ for(int i = 0; i < m_fields.count(); ++i)
+ {
+ f = m_fields.at(i);
+
+ if(f->value.contains("://"))
+ ok = MetaDataManager::instance()->protocols().contains(f->value.section("://",0,0)); //url
+ else
+ ok = MetaDataManager::instance()->supports(f->value); //local file
+
+ if(!ok)
+ m_indexes << i;
+ }
+ }
+ else if(m_task == REMOVE_DUPLICATES)
+ {
+ QStringList urls;
+ TrackField *f = 0;
+ for(int i = 0; i < m_fields.count(); ++i)
+ {
+ f = m_fields.at(i);
+
+ if(urls.contains(f->value))
+ {
+ m_indexes.append(i);
+ }
+ else
+ {
+ urls.append(f->value);
+ }
+ }
+ }
+ qDebug("PlayListTask: finished");
+}
+
+PlayListTask::TaskType PlayListTask::type() const
+{
+ return m_task;
+}
+
+bool PlayListTask::isChanged(PlayListContainer *container)
+{
+ if(m_input_tracks.count() != container->trackCount())
+ return true;
+
+ return m_input_tracks != container->tracks();
+}
+QList<PlayListTrack *> PlayListTask::takeResults(PlayListTrack **current_track)
+{
+ if(m_task == SORT)
+ {
+ foreach (TrackField *f, m_fields)
+ m_tracks.append(f->track);
+ }
+ else if(m_task == SORT_SELECTION)
+ {
+ for (int i = 0; i < m_indexes.count(); i++)
+ m_tracks.replace(m_indexes[i], m_fields[i]->track);
+ }
+ else if(m_task == REMOVE_INVALID || m_task == REMOVE_DUPLICATES)
+ {
+ int index = 0;
+ PlayListTrack *t = 0;
+ for (int i = m_indexes.count() - 1; i >= 0; i--)
+ {
+ index = m_indexes.at(i);
+ t = m_tracks.takeAt(index);
+ if(t == m_current_track)
+ {
+ if(m_tracks.isEmpty())
+ m_current_track = 0;
+ else if(index > 0 && index <= m_tracks.count())
+ m_current_track = m_tracks[index - 1];
+ else
+ m_current_track = m_tracks[0];
+ *current_track = m_current_track;
+ }
+ if(t->isUsed())
+ t->deleteLater();
+ else
+ delete t;
+ }
+ }
+ return m_tracks;
+}
+
+void PlayListTask::clear()
+{
+ qDeleteAll(m_fields);
+ m_fields.clear();
+ m_align_groups = false;
+ m_indexes.clear();
+ m_input_tracks.clear();
+ m_tracks.clear();
+ m_current_track = 0;
}
diff --git a/src/qmmpui/playlisttask_p.h b/src/qmmpui/playlisttask_p.h
index 39159cfdf..14442b06b 100644
--- a/src/qmmpui/playlisttask_p.h
+++ b/src/qmmpui/playlisttask_p.h
@@ -21,16 +21,60 @@
#ifndef PLAYLISTTASK_P_H
#define PLAYLISTTASK_P_H
-#include <QRunnable>
+#include <QThread>
#include <QObject>
+#include <QHash>
+#include <QList>
+#include "playlistmodel.h"
+#include "playlistcontainer_p.h"
-class PlayListTask : public QRunnable, public QObject
+class PlayListTrack;
+struct TrackField;
+
+
+class PlayListTask : public QThread
{
Q_OBJECT
public:
- explicit PlayListTask(QObject *parent = 0);
-void run();
+ enum TaskType
+ {
+ EMPTY = -1,
+ SORT = 0,
+ SORT_SELECTION,
+ REMOVE_INVALID,
+ REMOVE_DUPLICATES
+ };
+ explicit PlayListTask(QObject *parent);
+
+ ~PlayListTask();
+
+ void sort(QList<PlayListTrack *> tracks, int mode);
+ void sortSelection(QList<PlayListTrack *> tracks, int mode);
+ void removeInvalidTracks(QList<PlayListTrack *> tracks, PlayListTrack *current_track);
+ void removeDuplicates(QList<PlayListTrack *> tracks, PlayListTrack *current_track);
+
+ void run();
+
+ TaskType type() const;
+ bool isChanged(PlayListContainer *container);
+ QList<PlayListTrack *> takeResults(PlayListTrack **current_track);
+ PlayListTrack *currentTrack() const;
+
+
+
+private:
+ void clear();
+ QList <TrackField *> m_fields;
+ QList <PlayListTrack *> m_tracks;
+ QList <PlayListTrack *> m_input_tracks;
+ QList<int> m_indexes;
+ PlayListTrack *m_current_track;
+ int m_sort_mode;
+ TaskType m_task;
+ bool m_reverted;
+ bool m_align_groups;
+ QHash<int, Qmmp::MetaData> m_sort_keys;
};
diff --git a/src/qmmpui/playlisttrack.cpp b/src/qmmpui/playlisttrack.cpp
index 32a918ffd..e1bee339d 100644
--- a/src/qmmpui/playlisttrack.cpp
+++ b/src/qmmpui/playlisttrack.cpp
@@ -23,37 +23,46 @@
#include "qmmpuisettings.h"
#include "playlisttrack.h"
-PlayListTrack::PlayListTrack() : QMap<Qmmp::MetaData, QString>(), PlayListItem(), m_flag(FREE)
+PlayListTrack::PlayListTrack() : QMap<Qmmp::MetaData, QString>(), PlayListItem()
{
m_settings = QmmpUiSettings::instance();
m_length = 0;
+ m_refCount = 0;
+ m_sheduledForDeletion = false;
}
PlayListTrack::PlayListTrack(const PlayListTrack &other) : QMap<Qmmp::MetaData, QString>(other),
- PlayListItem(),m_flag(FREE)
+ PlayListItem()
{
m_settings = QmmpUiSettings::instance();
+ m_refCount = 0;
+ m_sheduledForDeletion = false;
+
m_formattedTitle = other.m_formattedTitle;
m_group = other.m_group;
m_formattedLength = other.m_formattedLength;
m_titleFormat = other.m_titleFormat;
m_groupFormat = other.m_groupFormat;
setSelected(other.isSelected());
- setFlag(other.flag());
m_length = other.m_length;
m_formattedLength = other.m_formattedLength;
}
PlayListTrack::PlayListTrack(FileInfo *info) : QMap<Qmmp::MetaData, QString>(info->metaData()),
- PlayListItem(), m_flag(FREE)
+ PlayListItem()
{
m_settings = QmmpUiSettings::instance();
setLength(m_length = info->length());
insert(Qmmp::URL, info->path());
+ m_refCount = 0;
+ m_sheduledForDeletion = false;
}
PlayListTrack::~PlayListTrack()
-{}
+{
+ if(m_refCount != 0)
+ qWarning("PlayListTrack: deleting busy track");
+}
void PlayListTrack::updateMetaData(const QMap <Qmmp::MetaData, QString> &metaData)
{
@@ -92,6 +101,31 @@ bool PlayListTrack::isGroup() const
return false;
}
+void PlayListTrack::beginUsage()
+{
+ m_refCount++;
+}
+
+void PlayListTrack::endUsage()
+{
+ m_refCount--;
+}
+
+void PlayListTrack::deleteLater()
+{
+ m_sheduledForDeletion = true;
+}
+
+bool PlayListTrack::isSheduledForDeletion() const
+{
+ return m_sheduledForDeletion;
+}
+
+bool PlayListTrack::isUsed() const
+{
+ return (m_refCount != 0);
+}
+
const QString PlayListTrack::formattedTitle()
{
if(m_formattedTitle.isEmpty() || m_titleFormat != m_settings->titleFormat())
@@ -130,16 +164,6 @@ const QString PlayListTrack::url() const
return value(Qmmp::URL);
}
-void PlayListTrack::setFlag(FLAGS f)
-{
- m_flag = f;
-}
-
-PlayListTrack::FLAGS PlayListTrack::flag() const
-{
- return m_flag;
-}
-
void PlayListTrack::formatTitle()
{
MetaDataFormatter f(m_settings->titleFormat());
diff --git a/src/qmmpui/playlisttrack.h b/src/qmmpui/playlisttrack.h
index e21b8f286..810be411a 100644
--- a/src/qmmpui/playlisttrack.h
+++ b/src/qmmpui/playlisttrack.h
@@ -34,19 +34,6 @@ class PlayListTrack : public QMap <Qmmp::MetaData, QString>, public PlayListItem
{
public:
/*!
- * Current state of playlist item.
- * FREE - instance is free and may be deleted
- * EDITING - instance is currently busy in some kind of operation(tags editing etc.)
- * and can't be deleted at the moment. Set flag SCHEDULED_FOR_DELETION for it
- * instead of delete operator call.
- */
- enum FLAGS
- {
- FREE = 0, /*!< instance is free and may be deleted */
- EDITING, /*!< instance is currently busy */
- SCHEDULED_FOR_DELETION /*!< instance is sheduled for deletion */
- };
- /*!
* Constructs an empty plalist item.
*/
PlayListTrack();
@@ -100,14 +87,19 @@ public:
* Returns \b false.
*/
bool isGroup() const;
+
+
+ void beginUsage();
+ void endUsage();
+ void deleteLater();
+
+
+ bool isSheduledForDeletion() const;
/*!
- * Returns current state of the playlist item.
- */
- FLAGS flag() const;
- /*!
- * Sets state of the playlist item.
+ * Indicates that instance is currently busy in some kind of operation (tags editing etc.)
+ * and can't be deleted at the moment. Call \b deleteLater() instead of delete operator call.
*/
- void setFlag(FLAGS);
+ bool isUsed() const;
private:
void formatTitle();
@@ -119,7 +111,8 @@ private:
QString m_groupFormat;
QmmpUiSettings *m_settings;
qint64 m_length;
- FLAGS m_flag;
+ int m_refCount;
+ bool m_sheduledForDeletion;
};
#endif
diff --git a/src/qmmpui/qmmpuisettings.cpp b/src/qmmpui/qmmpuisettings.cpp
index 37b56ec2c..67e5c0559 100644
--- a/src/qmmpui/qmmpuisettings.cpp
+++ b/src/qmmpui/qmmpuisettings.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012-2014 by Ilya Kotov *
+ * Copyright (C) 2012-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -146,7 +146,7 @@ void QmmpUiSettings::setGroupFormat(const QString &groupFormat)
m_group_format = groupFormat;
foreach(PlayListModel *model, PlayListManager::instance()->playLists())
{
- model->updateGroups();
+ model->rebuildGroups();
}
}
}
diff --git a/src/qmmpui/qmmpuisettings.h b/src/qmmpui/qmmpuisettings.h
index b51f778a5..f9d6fd99b 100644
--- a/src/qmmpui/qmmpuisettings.h
+++ b/src/qmmpui/qmmpuisettings.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by Ilya Kotov *
+ * Copyright (C) 2012-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
diff --git a/src/qmmpui/tagupdater.cpp b/src/qmmpui/tagupdater.cpp
index 02f0c4590..21bc6aaf9 100644
--- a/src/qmmpui/tagupdater.cpp
+++ b/src/qmmpui/tagupdater.cpp
@@ -24,7 +24,7 @@ TagUpdater::TagUpdater(QObject* o, QList<PlayListTrack *> tracks) : m_observable
{
m_tracks = tracks;
foreach(PlayListTrack *t, m_tracks)
- t->setFlag(PlayListTrack::EDITING);
+ t->beginUsage();
connect(m_observable, SIGNAL(destroyed(QObject *)),SLOT(updateTags()));
connect(m_observable, SIGNAL(destroyed(QObject *)),SLOT(deleteLater()));
}
@@ -33,7 +33,8 @@ void TagUpdater::updateTags()
{
foreach (PlayListTrack *t, m_tracks)
{
- if (t->flag() == PlayListTrack::SCHEDULED_FOR_DELETION)
+ t->endUsage();
+ if (!t->isUsed() && t->isSheduledForDeletion())
{
delete t;
t = 0;
@@ -41,7 +42,6 @@ void TagUpdater::updateTags()
else
{
t->updateMetaData();
- t->setFlag(PlayListTrack::FREE);
}
}
m_tracks.clear();