Commit 7360b071 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix memory leak

parent 000937fa
......@@ -120,7 +120,15 @@ QSizeF ImageItem::sizeHint(Qt::SizeHint /*which*/, const QSizeF& /*constraint*/)
// ------------- ImageStripScene ------------------------------------------------------ //
ImageStripScene::ImageStripScene():
m_imgSize(80), m_loader(0) { }
m_imgSize(80)
, m_loader(0)
{
}
ImageStripScene::~ImageStripScene()
{
delete m_loader;
}
bool ImageStripScene::setCurrentDirectory(const QString& path)
{
......
......@@ -89,9 +89,9 @@ public:
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget=0);
private:
float m_size;
float m_size;
ImageLoader* m_loader;
QString m_path;
QString m_path;
};
class ImageStripScene: public QGraphicsScene
......@@ -100,6 +100,7 @@ class ImageStripScene: public QGraphicsScene
public:
ImageStripScene();
~ImageStripScene();
bool setCurrentDirectory(const QString& path);
signals:
......@@ -112,10 +113,10 @@ private slots:
void slotItemContentChanged(ImageItem* item);
private:
float m_imgSize;
quint32 m_numItems;
float m_imgSize;
quint32 m_numItems;
ImageLoader* m_loader;
QMutex m_mutex;
QMutex m_mutex;
};
#endif // H_IMAGE_STRIP_SCENE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment