Fix crash when reloading folder
This commit is contained in:
@@ -71,6 +71,12 @@ ImageRingList::ImageRingList(QObject *parent) : QObject(parent)
|
|||||||
connect(&m_fileSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(dirChanged(QString)));
|
connect(&m_fileSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(dirChanged(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageRingList::~ImageRingList()
|
||||||
|
{
|
||||||
|
QThreadPool::globalInstance()->clear();
|
||||||
|
QThreadPool::globalInstance()->waitForDone();
|
||||||
|
}
|
||||||
|
|
||||||
bool ImageRingList::setDir(const QString path, const QString ¤tFile)
|
bool ImageRingList::setDir(const QString path, const QString ¤tFile)
|
||||||
{
|
{
|
||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class ImageRingList : public QObject
|
|||||||
bool m_liveMode;
|
bool m_liveMode;
|
||||||
public:
|
public:
|
||||||
explicit ImageRingList(QObject *parent = 0);
|
explicit ImageRingList(QObject *parent = 0);
|
||||||
|
~ImageRingList();
|
||||||
bool setDir(const QString path, const QString ¤tFile = QString());
|
bool setDir(const QString path, const QString ¤tFile = QString());
|
||||||
void setFile(const QString &file);
|
void setFile(const QString &file);
|
||||||
ImagePtr currentImage();
|
ImagePtr currentImage();
|
||||||
|
|||||||
Reference in New Issue
Block a user