diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp --- a/src/widgets/previewjob.cpp +++ b/src/widgets/previewjob.cpp @@ -415,8 +415,6 @@ void PreviewJobPrivate::cleanupTempFile() { if (!tempName.isEmpty()) { - Q_ASSERT(!QFileInfo(tempName).isDir()); - Q_ASSERT(QFileInfo(tempName).isFile()); QFile::remove(tempName); tempName.clear(); } @@ -610,7 +608,7 @@ // No plugin support access to this remote content, copy the file // to the local machine, then create the thumbnail state = PreviewJobPrivate::STATE_GETORIG; - QTemporaryFile localFile; + QTemporaryFile localFile(QStringLiteral("thumbnailXXXXXX")); localFile.setAutoRemove(false); localFile.open(); tempName = localFile.fileName();