mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
Don't stop loading if document contains no Pictures directory...
svn path=/trunk/playground/graphics/okular/; revision=585227
This commit is contained in:
parent
dd5b91ca40
commit
c4ace82830
1 changed files with 7 additions and 9 deletions
|
@ -55,16 +55,14 @@ bool Document::open()
|
|||
file = static_cast<const KArchiveFile*>( directory->entry( "meta.xml" ) );
|
||||
mMeta = file->data();
|
||||
|
||||
if ( !entries.contains( "Pictures" ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( entries.contains( "Pictures" ) ) {
|
||||
const KArchiveDirectory *imagesDirectory = static_cast<const KArchiveDirectory*>( directory->entry( "Pictures" ) );
|
||||
|
||||
const KArchiveDirectory *imagesDirectory = static_cast<const KArchiveDirectory*>( directory->entry( "Pictures" ) );
|
||||
|
||||
const QStringList imagesEntries = imagesDirectory->entries();
|
||||
for ( int i = 0; i < imagesEntries.count(); ++i ) {
|
||||
file = static_cast<const KArchiveFile*>( imagesDirectory->entry( imagesEntries[ i ] ) );
|
||||
mImages.insert( QString( "Pictures/%1" ).arg( imagesEntries[ i ] ), file->data() );
|
||||
const QStringList imagesEntries = imagesDirectory->entries();
|
||||
for ( int i = 0; i < imagesEntries.count(); ++i ) {
|
||||
file = static_cast<const KArchiveFile*>( imagesDirectory->entry( imagesEntries[ i ] ) );
|
||||
mImages.insert( QString( "Pictures/%1" ).arg( imagesEntries[ i ] ), file->data() );
|
||||
}
|
||||
}
|
||||
|
||||
zip.close();
|
||||
|
|
Loading…
Reference in a new issue