Reimplemented PictureLoader as a singleton

* Removed remaining picture handling from card database and cardinfo
 * removed the “noCard object” hack
This commit is contained in:
Fabio Bas 2015-08-22 17:22:08 +02:00
parent 8125358052
commit f6c7f3355f
20 changed files with 654 additions and 704 deletions

View file

@ -8,6 +8,7 @@
#include "cardinfowidget.h"
#include "carditem.h"
#include "carddatabase.h"
#include "pictureloader.h"
#include "main.h"
#include "settingscache.h"
@ -195,10 +196,10 @@ void CardInfoWidget::updatePixmap()
return;
QPixmap resizedPixmap;
info->getPixmap(QSize(pixmapWidth, pixmapWidth * aspectRatio), resizedPixmap);
PictureLoader::getPixmap(resizedPixmap, info, QSize(pixmapWidth, pixmapWidth * aspectRatio));
if (resizedPixmap.isNull())
getCard()->getPixmap(QSize(pixmapWidth, pixmapWidth * aspectRatio), resizedPixmap);
PictureLoader::getPixmap(resizedPixmap, getCard(), QSize(pixmapWidth, pixmapWidth * aspectRatio));
cardPicture->setPixmap(resizedPixmap);
}