Only get pdf page count on pdfs
This commit is contained in:
parent
5aa2afcc63
commit
a41fbe067f
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "convertchecker.h"
|
||||
#include <QProcess>
|
||||
#include <QtDebug>
|
||||
#include "mimer.h"
|
||||
|
||||
ConvertChecker::ConvertChecker()
|
||||
{
|
||||
|
@ -61,8 +62,8 @@ ConvertChecker* ConvertChecker::instance()
|
|||
quint32 ConvertChecker::pdfPages(QString filename)
|
||||
{
|
||||
quint32 pages = 0;
|
||||
if(!_pdf)
|
||||
{
|
||||
if(!_pdf || (Mimer::instance()->get_type(filename) != Mimer::PDF))
|
||||
{ // pdfinfo is a bit slow to return on some non-PDFs
|
||||
return pages;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue