comparison src/pngplayer.cpp @ 20:6b5e7d6bf4a2 0.0.1

Emit warning when a picture can not be loaded
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Apr 2015 18:56:54 +0200
parents f290e8c4e097
children 64a51a42c01f
comparison
equal deleted inserted replaced
19:45553ac1eef8 20:6b5e7d6bf4a2
106 const QDateTime& timestamp) { 106 const QDateTime& timestamp) {
107 QPixmap pic(mBaseDir.filePath(fileName)); 107 QPixmap pic(mBaseDir.filePath(fileName));
108 /* If this is too slow we could use a pixmap cache here and do 108 /* If this is too slow we could use a pixmap cache here and do
109 * some intelligent preloading */ 109 * some intelligent preloading */
110 if (pic.isNull()) { 110 if (pic.isNull()) {
111 qWarning() << "Failed to load picture: " << fileName;
111 // emit error(tr("Failed to load picture: '%1'").arg(fileName)); 112 // emit error(tr("Failed to load picture: '%1'").arg(fileName));
112 return; 113 return;
113 } 114 }
114 mPNGLabel->setPixmap(pic); 115 mPNGLabel->setPixmap(pic);
115 updatePositions(current, max, timestamp); 116 updatePositions(current, max, timestamp);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)