aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/covermanager
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-01-11 12:10:05 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-01-11 12:10:05 +0000
commit2cb4349cf939cc46519d9e484874ee88346dae88 (patch)
treea6fee9da07e9a20a58306c7bb5dc5d0654fe2bbe /src/plugins/General/covermanager
parentfc75b7cd788d5afd973bf2cc6e7af15050c5de00 (diff)
downloadqmmp-2cb4349cf939cc46519d9e484874ee88346dae88.tar.gz
qmmp-2cb4349cf939cc46519d9e484874ee88346dae88.tar.bz2
qmmp-2cb4349cf939cc46519d9e484874ee88346dae88.zip
cover manager: added substituting image
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1498 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/covermanager')
-rw-r--r--src/plugins/General/covermanager/CMakeLists.txt5
-rw-r--r--src/plugins/General/covermanager/covermanager.cpp4
-rw-r--r--src/plugins/General/covermanager/covermanager.pro3
-rw-r--r--src/plugins/General/covermanager/images/cm_images.qrc5
-rw-r--r--src/plugins/General/covermanager/images/cm_no_cover.pngbin0 -> 4585 bytes
5 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/General/covermanager/CMakeLists.txt b/src/plugins/General/covermanager/CMakeLists.txt
index 5c7d7e2de..01fabe8ae 100644
--- a/src/plugins/General/covermanager/CMakeLists.txt
+++ b/src/plugins/General/covermanager/CMakeLists.txt
@@ -41,7 +41,10 @@ SET(libcovermanager_MOC_HDRS
covermanagerfactory.h
)
-SET(libcovermanager_RCCS translations/translations.qrc)
+SET(libcovermanager_RCCS
+ translations/translations.qrc
+ images/cm_images.qrc
+)
QT4_ADD_RESOURCES(libcovermanager_RCC_SRCS ${libcovermanager_RCCS})
diff --git a/src/plugins/General/covermanager/covermanager.cpp b/src/plugins/General/covermanager/covermanager.cpp
index 557a4b5af..93d2f9af0 100644
--- a/src/plugins/General/covermanager/covermanager.cpp
+++ b/src/plugins/General/covermanager/covermanager.cpp
@@ -47,9 +47,7 @@ void CoverManager::showWindow()
CoverWidget *w = new CoverWidget(qApp->activeWindow ());
QPixmap pix = MetaDataManager::instance()->getCover(items.at(0)->url());
if(pix.isNull())
- {
- return;
- }
+ pix = QPixmap(":/cm_no_cover.png");
w->setPixmap(pix);
MetaDataFormatter formatter("%p%if(%p&%t, - ,)%if(%t,%t,%f)");
w->setWindowTitle(formatter.parse(items.at(0)->metaData()));
diff --git a/src/plugins/General/covermanager/covermanager.pro b/src/plugins/General/covermanager/covermanager.pro
index e618330c0..7b921d1cb 100644
--- a/src/plugins/General/covermanager/covermanager.pro
+++ b/src/plugins/General/covermanager/covermanager.pro
@@ -17,7 +17,8 @@ TRANSLATIONS = translations/covermanager_plugin_cs.ts \
translations/covermanager_plugin_it.ts \
translations/covermanager_plugin_tr.ts \
translations/covermanager_plugin_lt.ts
-RESOURCES = translations/translations.qrc
+RESOURCES = translations/translations.qrc \
+ images/cm_images.qrc
unix {
isEmpty(LIB_DIR):LIB_DIR = /lib
target.path = $$LIB_DIR/qmmp/General
diff --git a/src/plugins/General/covermanager/images/cm_images.qrc b/src/plugins/General/covermanager/images/cm_images.qrc
new file mode 100644
index 000000000..fd231a852
--- /dev/null
+++ b/src/plugins/General/covermanager/images/cm_images.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>cm_no_cover.png</file>
+ </qresource>
+</RCC>
diff --git a/src/plugins/General/covermanager/images/cm_no_cover.png b/src/plugins/General/covermanager/images/cm_no_cover.png
new file mode 100644
index 000000000..018208bb2
--- /dev/null
+++ b/src/plugins/General/covermanager/images/cm_no_cover.png
Binary files differ