Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
Okular
Commits
7da5adce
Commit
7da5adce
authored
Mar 05, 2017
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indent++
parent
e4de08a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
generators/djvu/kdjvu.cpp
generators/djvu/kdjvu.cpp
+20
-20
No files found.
generators/djvu/kdjvu.cpp
View file @
7da5adce
...
...
@@ -909,27 +909,27 @@ QImage KDjVu::image( int page, int width, int height, int rotation )
{
if
(
d
->
m_cacheEnabled
)
{
bool
found
=
false
;
QList
<
ImageCacheItem
*>::
Iterator
it
=
d
->
mImgCache
.
begin
(),
itEnd
=
d
->
mImgCache
.
end
();
for
(
;
(
it
!=
itEnd
)
&&
!
found
;
++
it
)
{
ImageCacheItem
*
cur
=
*
it
;
if
(
(
cur
->
page
==
page
)
&&
(
rotation
%
2
==
0
?
cur
->
width
==
width
&&
cur
->
height
==
height
:
cur
->
width
==
height
&&
cur
->
height
==
width
)
)
found
=
true
;
}
if
(
found
)
{
// taking the element and pushing to the top of the list
--
it
;
ImageCacheItem
*
cur2
=
*
it
;
d
->
mImgCache
.
erase
(
it
);
d
->
mImgCache
.
push_front
(
cur2
);
bool
found
=
false
;
QList
<
ImageCacheItem
*>::
Iterator
it
=
d
->
mImgCache
.
begin
(),
itEnd
=
d
->
mImgCache
.
end
();
for
(
;
(
it
!=
itEnd
)
&&
!
found
;
++
it
)
{
ImageCacheItem
*
cur
=
*
it
;
if
(
(
cur
->
page
==
page
)
&&
(
rotation
%
2
==
0
?
cur
->
width
==
width
&&
cur
->
height
==
height
:
cur
->
width
==
height
&&
cur
->
height
==
width
)
)
found
=
true
;
}
if
(
found
)
{
// taking the element and pushing to the top of the list
--
it
;
ImageCacheItem
*
cur2
=
*
it
;
d
->
mImgCache
.
erase
(
it
);
d
->
mImgCache
.
push_front
(
cur2
);
return
cur2
->
img
;
}
return
cur2
->
img
;
}
}
if
(
!
d
->
m_pages_cache
.
at
(
page
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment