mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12
This commit is contained in:
commit
94f30e8343
|
@ -185,11 +185,17 @@ void Document::pages( QVector<Okular::Page*> * pagesVector )
|
|||
{
|
||||
QSize pageSize = reader.size();
|
||||
if ( !pageSize.isValid() ) {
|
||||
pageSize = reader.read().size();
|
||||
const QImage i = reader.read();
|
||||
if ( !i.isNull() )
|
||||
pageSize = i.size();
|
||||
}
|
||||
if ( pageSize.isValid() ) {
|
||||
pagesVector->replace( count, new Okular::Page( count, pageSize.width(), pageSize.height(), Okular::Rotation0 ) );
|
||||
mPageMap.append(file);
|
||||
count++;
|
||||
} else {
|
||||
kDebug() << "Ignoring" << file << "doesn't seem to be an image even if QImageReader::canRead returned true";
|
||||
}
|
||||
pagesVector->replace( count, new Okular::Page( count, pageSize.width(), pageSize.height(), Okular::Rotation0 ) );
|
||||
mPageMap.append(file);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue