}
if (cover.isNull()) {
- kWarning(KIO_THUMB) << "Error creating the comic book thumbnail.";
+ kDebug(KIO_THUMB) << "Error creating the comic book thumbnail.";
return false;
}
/// Extracts the cover image out of the .cbr file.
// Check if unrar is available. Get its path in 'unrarPath'.
- QString unrar = unrarPath();
+ QString unrar = unrarPath("--version");
+ if (unrar.isEmpty()) {
+ unrar = unrarPath("-v");
+ }
if (unrar.isEmpty()) {
kWarning(KIO_THUMB) << "A suitable version of unrar is not available.";
return QImage();
return entries;
}
-QString ComicCreator::unrarPath() const
+QString ComicCreator::unrarPath(const QString& versionarg) const
{
/// Check the standard paths to see if a suitable unrar is available.
QString unrar = KStandardDirs::findExe("unrar");
}
if (!unrar.isEmpty()) {
QProcess proc;
- proc.start(unrar, QStringList() << "--version");
+ proc.start(unrar, QStringList() << versionarg);
proc.waitForFinished(-1);
const QStringList lines = QString::fromLocal8Bit(proc.readAllStandardOutput()).split
('\n', QString::SkipEmptyParts);
// For "rar" type files.
// Uses the non-free 'unrar' executable, if available.
QImage extractRARImage(const QString& path);
- QString unrarPath() const;
+ QString unrarPath(const QString& versionarg) const;
QStringList getRARFileList(const QString& path, const QString& unrarPath);
private slots: