Do not attempt open not existing file
This commit is contained in:
+8
-5
@@ -176,11 +176,14 @@ bool ImageRingList::setDir(const QString path, const QString ¤tFile, bool
|
|||||||
|
|
||||||
void ImageRingList::setFile(const QString &file)
|
void ImageRingList::setFile(const QString &file)
|
||||||
{
|
{
|
||||||
QFileInfo info(file);
|
if(!file.isEmpty())
|
||||||
if(info.isDir())
|
{
|
||||||
setDir(file, QString(), true);
|
QFileInfo info(file);
|
||||||
else
|
if(info.isDir())
|
||||||
setDir(info.absolutePath(), file);
|
setDir(file, QString(), true);
|
||||||
|
else
|
||||||
|
setDir(info.absolutePath(), file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImagePtr ImageRingList::currentImage()
|
ImagePtr ImageRingList::currentImage()
|
||||||
|
|||||||
Reference in New Issue
Block a user