Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andi Sardina Ramos
Okular
Commits
c2fc9836
Commit
c2fc9836
authored
Nov 11, 2008
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix iterator
svn path=/trunk/KDE/kdegraphics/okular/; revision=882957
parent
dbd7fa12
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
126 additions
and
126 deletions
+126
-126
core/bookmarkmanager.cpp
core/bookmarkmanager.cpp
+1
-1
core/document.cpp
core/document.cpp
+44
-44
core/fileprinter.cpp
core/fileprinter.cpp
+1
-1
core/page.cpp
core/page.cpp
+7
-7
core/script/kjs_document.cpp
core/script/kjs_document.cpp
+2
-2
core/textpage.cpp
core/textpage.cpp
+11
-11
generators/chm/lib/libchmfileimpl.cpp
generators/chm/lib/libchmfileimpl.cpp
+2
-2
generators/djvu/kdjvu.cpp
generators/djvu/kdjvu.cpp
+2
-2
generators/dvi/generator_dvi.cpp
generators/dvi/generator_dvi.cpp
+2
-2
generators/poppler/generator_pdf.cpp
generators/poppler/generator_pdf.cpp
+2
-2
part.cpp
part.cpp
+2
-2
ui/fileprinterpreview.cpp
ui/fileprinterpreview.cpp
+2
-2
ui/formwidgets.cpp
ui/formwidgets.cpp
+1
-1
ui/ktreeviewsearchline.cpp
ui/ktreeviewsearchline.cpp
+2
-2
ui/pagepainter.cpp
ui/pagepainter.cpp
+11
-11
ui/pageview.cpp
ui/pageview.cpp
+20
-20
ui/presentationwidget.cpp
ui/presentationwidget.cpp
+1
-1
ui/thumbnaillist.cpp
ui/thumbnaillist.cpp
+13
-13
No files found.
core/bookmarkmanager.cpp
View file @
c2fc9836
...
...
@@ -25,7 +25,7 @@
using
namespace
Okular
;
#define foreachObserver( cmd ) {\
QMap< int, DocumentObserver * >::const_iterator it = d->document->m_observers.
begin(), end = d->document->m_observers.e
nd();\
QMap< int, DocumentObserver * >::const_iterator it = d->document->m_observers.
constBegin(), end = d->document->m_observers.constE
nd();\
for ( ; it != end ; ++ it ) { (*it)-> cmd ; } }
class
OkularBookmarkAction
:
public
KBookmarkAction
...
...
core/document.cpp
View file @
c2fc9836
...
...
@@ -536,7 +536,7 @@ void DocumentPrivate::loadServiceList( const KService::List& offers )
QString
propName
=
offers
.
at
(
i
)
->
name
();
// don't load already loaded generators
QHash
<
QString
,
GeneratorInfo
>::
const_iterator
genIt
=
m_loadedGenerators
.
constFind
(
propName
);
if
(
!
m_loadedGenerators
.
isEmpty
()
&&
genIt
!=
m_loadedGenerators
.
e
nd
()
)
if
(
!
m_loadedGenerators
.
isEmpty
()
&&
genIt
!=
m_loadedGenerators
.
constE
nd
()
)
continue
;
Generator
*
g
=
loadGeneratorLibrary
(
offers
.
at
(
i
)
);
...
...
@@ -687,7 +687,7 @@ void DocumentPrivate::saveDocumentInfo() const
QDomElement
pageList
=
doc
.
createElement
(
"pageList"
);
root
.
appendChild
(
pageList
);
// <page list><page number='x'>.... </page> save pages that hold data
QVector
<
Page
*
>::
const_iterator
pIt
=
m_pagesVector
.
begin
(),
pEnd
=
m_pagesVector
.
e
nd
();
QVector
<
Page
*
>::
const_iterator
pIt
=
m_pagesVector
.
constBegin
(),
pEnd
=
m_pagesVector
.
constE
nd
();
for
(
;
pIt
!=
pEnd
;
++
pIt
)
(
*
pIt
)
->
d
->
saveLocalContents
(
pageList
,
doc
);
...
...
@@ -703,11 +703,11 @@ void DocumentPrivate::saveDocumentInfo() const
}
// <general info><history> ... </history> save history up to OKULAR_HISTORY_SAVEDSTEPS viewports
QLinkedList
<
DocumentViewport
>::
const_iterator
backIterator
=
m_viewportIterator
;
if
(
backIterator
!=
m_viewportHistory
.
e
nd
()
)
if
(
backIterator
!=
m_viewportHistory
.
constE
nd
()
)
{
// go back up to OKULAR_HISTORY_SAVEDSTEPS steps from the current viewportIterator
int
backSteps
=
OKULAR_HISTORY_SAVEDSTEPS
;
while
(
backSteps
--
&&
backIterator
!=
m_viewportHistory
.
b
egin
()
)
while
(
backSteps
--
&&
backIterator
!=
m_viewportHistory
.
constB
egin
()
)
--
backIterator
;
// create history root node
...
...
@@ -825,7 +825,7 @@ void DocumentPrivate::sendGeneratorRequest()
void
DocumentPrivate
::
rotationFinished
(
int
page
)
{
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
m_observers
.
begin
(),
end
=
m_observers
.
e
nd
();
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
m_observers
.
constBegin
(),
end
=
m_observers
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
{
(
*
it
)
->
notifyPageChanged
(
page
,
DocumentObserver
::
Pixmap
|
DocumentObserver
::
Annotations
);
}
...
...
@@ -872,14 +872,14 @@ void DocumentPrivate::slotGeneratorConfigChanged( const QString& )
if
(
configchanged
)
{
// invalidate pixmaps
QVector
<
Page
*>::
const_iterator
it
=
m_pagesVector
.
begin
(),
end
=
m_pagesVector
.
e
nd
();
QVector
<
Page
*>::
const_iterator
it
=
m_pagesVector
.
constBegin
(),
end
=
m_pagesVector
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
{
(
*
it
)
->
deletePixmaps
();
}
// [MEM] remove allocation descriptors
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
m_allocatedPixmapsFifo
.
b
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
m_allocatedPixmapsFifo
.
e
nd
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
m_allocatedPixmapsFifo
.
constB
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
m_allocatedPixmapsFifo
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
delete
*
aIt
;
m_allocatedPixmapsFifo
.
clear
();
...
...
@@ -902,7 +902,7 @@ void DocumentPrivate::refreshPixmaps( int pageNumber )
return
;
QLinkedList
<
Okular
::
PixmapRequest
*
>
requestedPixmaps
;
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
ConstIterator
it
=
page
->
d
->
m_pixmaps
.
begin
(),
itEnd
=
page
->
d
->
m_pixmaps
.
e
nd
();
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
ConstIterator
it
=
page
->
d
->
m_pixmaps
.
constBegin
(),
itEnd
=
page
->
d
->
m_pixmaps
.
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
QSize
size
=
(
*
it
).
m_pixmap
->
size
();
...
...
@@ -1187,8 +1187,8 @@ void DocumentPrivate::doContinueAllDocumentSearch(void *pagesToNotifySet, void *
RunningSearch
*
s
=
m_searches
[
searchID
];
bool
foundAMatch
=
pageMatches
->
count
()
!=
0
;
QMap
<
Page
*
,
QVector
<
RegularAreaRect
*>
>::
const_iterator
it
,
itEnd
;
it
=
pageMatches
->
b
egin
();
itEnd
=
pageMatches
->
e
nd
();
it
=
pageMatches
->
constB
egin
();
itEnd
=
pageMatches
->
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
foreach
(
RegularAreaRect
*
match
,
it
.
value
())
...
...
@@ -1303,8 +1303,8 @@ void DocumentPrivate::doContinueGooglesDocumentSearch(void *pagesToNotifySet, vo
RunningSearch
*
s
=
m_searches
[
searchID
];
bool
foundAMatch
=
pageMatches
->
count
()
!=
0
;
QMap
<
Page
*
,
QVector
<
MatchColor
>
>::
const_iterator
it
,
itEnd
;
it
=
pageMatches
->
b
egin
();
itEnd
=
pageMatches
->
e
nd
();
it
=
pageMatches
->
constB
egin
();
itEnd
=
pageMatches
->
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
foreach
(
const
MatchColor
&
mc
,
it
.
value
())
...
...
@@ -1409,7 +1409,7 @@ Document::~Document()
// delete generator, pages, and related stuff
closeDocument
();
QSet
<
View
*
>::
const_iterator
viewIt
=
d
->
m_views
.
begin
(),
viewEnd
=
d
->
m_views
.
e
nd
();
QSet
<
View
*
>::
const_iterator
viewIt
=
d
->
m_views
.
constBegin
(),
viewEnd
=
d
->
m_views
.
constE
nd
();
for
(
;
viewIt
!=
viewEnd
;
++
viewIt
)
{
View
*
v
=
*
viewIt
;
...
...
@@ -1706,8 +1706,8 @@ void Document::closeDocument()
d
->
m_rotation
=
Rotation0
;
// remove requests left in queue
d
->
m_pixmapRequestsMutex
.
lock
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
sIt
=
d
->
m_pixmapRequestsStack
.
b
egin
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
sEnd
=
d
->
m_pixmapRequestsStack
.
e
nd
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
sIt
=
d
->
m_pixmapRequestsStack
.
constB
egin
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
sEnd
=
d
->
m_pixmapRequestsStack
.
constE
nd
();
for
(
;
sIt
!=
sEnd
;
++
sIt
)
delete
*
sIt
;
d
->
m_pixmapRequestsStack
.
clear
();
...
...
@@ -1717,29 +1717,29 @@ void Document::closeDocument()
foreachObserver
(
notifySetup
(
QVector
<
Page
*
>
(),
DocumentObserver
::
DocumentChanged
)
);
// delete pages and clear 'd->m_pagesVector' container
QVector
<
Page
*
>::
const_iterator
pIt
=
d
->
m_pagesVector
.
b
egin
();
QVector
<
Page
*
>::
const_iterator
pEnd
=
d
->
m_pagesVector
.
e
nd
();
QVector
<
Page
*
>::
const_iterator
pIt
=
d
->
m_pagesVector
.
constB
egin
();
QVector
<
Page
*
>::
const_iterator
pEnd
=
d
->
m_pagesVector
.
constE
nd
();
for
(
;
pIt
!=
pEnd
;
++
pIt
)
delete
*
pIt
;
d
->
m_pagesVector
.
clear
();
// clear 'memory allocation' descriptors
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
b
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
e
nd
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
constB
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
delete
*
aIt
;
d
->
m_allocatedPixmapsFifo
.
clear
();
// clear 'running searches' descriptors
QMap
<
int
,
RunningSearch
*
>::
const_iterator
rIt
=
d
->
m_searches
.
b
egin
();
QMap
<
int
,
RunningSearch
*
>::
const_iterator
rEnd
=
d
->
m_searches
.
e
nd
();
QMap
<
int
,
RunningSearch
*
>::
const_iterator
rIt
=
d
->
m_searches
.
constB
egin
();
QMap
<
int
,
RunningSearch
*
>::
const_iterator
rEnd
=
d
->
m_searches
.
constE
nd
();
for
(
;
rIt
!=
rEnd
;
++
rIt
)
delete
*
rIt
;
d
->
m_searches
.
clear
();
// clear the visible areas and notify the observers
QVector
<
VisiblePageRect
*
>::
const_iterator
vIt
=
d
->
m_pageRects
.
b
egin
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vEnd
=
d
->
m_pageRects
.
e
nd
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vIt
=
d
->
m_pageRects
.
constB
egin
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vEnd
=
d
->
m_pageRects
.
constE
nd
();
for
(
;
vIt
!=
vEnd
;
++
vIt
)
delete
*
vIt
;
d
->
m_pageRects
.
clear
();
...
...
@@ -1776,7 +1776,7 @@ void Document::removeObserver( DocumentObserver * pObserver )
{
// free observer's pixmap data
int
observerId
=
pObserver
->
observerId
();
QVector
<
Page
*>::
const_iterator
it
=
d
->
m_pagesVector
.
begin
(),
end
=
d
->
m_pagesVector
.
e
nd
();
QVector
<
Page
*>::
const_iterator
it
=
d
->
m_pagesVector
.
constBegin
(),
end
=
d
->
m_pagesVector
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
(
*
it
)
->
deletePixmap
(
observerId
);
...
...
@@ -1813,14 +1813,14 @@ void Document::reparseConfig()
if
(
configchanged
)
{
// invalidate pixmaps
QVector
<
Page
*>::
const_iterator
it
=
d
->
m_pagesVector
.
begin
(),
end
=
d
->
m_pagesVector
.
e
nd
();
QVector
<
Page
*>::
const_iterator
it
=
d
->
m_pagesVector
.
constBegin
(),
end
=
d
->
m_pagesVector
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
{
(
*
it
)
->
deletePixmaps
();
}
// [MEM] remove allocation descriptors
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
b
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
e
nd
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
constB
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
delete
*
aIt
;
d
->
m_allocatedPixmapsFifo
.
clear
();
...
...
@@ -1951,13 +1951,13 @@ const QVector< VisiblePageRect * > & Document::visiblePageRects() const
void
Document
::
setVisiblePageRects
(
const
QVector
<
VisiblePageRect
*
>
&
visiblePageRects
,
int
excludeId
)
{
QVector
<
VisiblePageRect
*
>::
const_iterator
vIt
=
d
->
m_pageRects
.
b
egin
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vEnd
=
d
->
m_pageRects
.
e
nd
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vIt
=
d
->
m_pageRects
.
constB
egin
();
QVector
<
VisiblePageRect
*
>::
const_iterator
vEnd
=
d
->
m_pageRects
.
constE
nd
();
for
(
;
vIt
!=
vEnd
;
++
vIt
)
delete
*
vIt
;
d
->
m_pageRects
=
visiblePageRects
;
// notify change to all other (different from id) observers
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
begin
(),
end
=
d
->
m_observers
.
e
nd
();
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
constBegin
(),
end
=
d
->
m_observers
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
if
(
it
.
key
()
!=
excludeId
)
(
*
it
)
->
notifyVisibleRectsChanged
();
...
...
@@ -2107,7 +2107,7 @@ void Document::requestPixmaps( const QLinkedList< PixmapRequest * > & requests,
if
(
!
d
->
m_generator
)
{
// delete requests..
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
begin
(),
rEnd
=
requests
.
e
nd
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
constBegin
(),
rEnd
=
requests
.
constE
nd
();
for
(
;
rIt
!=
rEnd
;
++
rIt
)
delete
*
rIt
;
// ..and return
...
...
@@ -2118,7 +2118,7 @@ void Document::requestPixmaps( const QLinkedList< PixmapRequest * > & requests,
int
requesterID
=
requests
.
first
()
->
id
();
QSet
<
int
>
requestedPages
;
{
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
begin
(),
rEnd
=
requests
.
e
nd
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
constBegin
(),
rEnd
=
requests
.
constE
nd
();
for
(
;
rIt
!=
rEnd
;
++
rIt
)
requestedPages
.
insert
(
(
*
rIt
)
->
pageNumber
()
);
}
...
...
@@ -2140,7 +2140,7 @@ void Document::requestPixmaps( const QLinkedList< PixmapRequest * > & requests,
// 2. [ADD TO STACK] add requests to stack
bool
threadingDisabled
=
!
Settings
::
enableThreading
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
begin
(),
rEnd
=
requests
.
e
nd
();
QLinkedList
<
PixmapRequest
*
>::
const_iterator
rIt
=
requests
.
constBegin
(),
rEnd
=
requests
.
constE
nd
();
for
(
;
rIt
!=
rEnd
;
++
rIt
)
{
// set the 'page field' (see PixmapRequest) and check if it is valid
...
...
@@ -2338,7 +2338,7 @@ void Document::setViewport( const DocumentViewport & viewport, int excludeId, bo
}
// notify change to all other (different from id) observers
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
begin
(),
end
=
d
->
m_observers
.
e
nd
();
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
constBegin
(),
end
=
d
->
m_observers
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
if
(
it
.
key
()
!=
excludeId
)
(
*
it
)
->
notifyViewportChanged
(
smoothMove
);
...
...
@@ -2368,7 +2368,7 @@ void Document::setViewport( const DocumentViewport & viewport, int excludeId, bo
void
Document
::
setZoom
(
int
factor
,
int
excludeId
)
{
// notify change to all other (different from id) observers
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
begin
(),
end
=
d
->
m_observers
.
e
nd
();
QMap
<
int
,
DocumentObserver
*
>::
const_iterator
it
=
d
->
m_observers
.
constBegin
(),
end
=
d
->
m_observers
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
if
(
it
.
key
()
!=
excludeId
)
(
*
it
)
->
notifyZoom
(
factor
);
...
...
@@ -2866,7 +2866,7 @@ void Document::processSourceReference( const SourceReference * ref )
QHash
<
int
,
QString
>::
const_iterator
it
=
editors
.
constFind
(
Settings
::
externalEditor
()
);
QString
p
;
if
(
it
!=
editors
.
e
nd
()
)
if
(
it
!=
editors
.
constE
nd
()
)
p
=
*
it
;
else
p
=
Settings
::
externalEditorCommand
();
...
...
@@ -2982,7 +2982,7 @@ QStringList Document::supportedMimeTypes() const
QString
constraint
(
"(Library == 'okularpart')"
);
QLatin1String
basePartService
(
"KParts/ReadOnlyPart"
);
KService
::
List
offers
=
KServiceTypeTrader
::
self
()
->
query
(
basePartService
,
constraint
);
KService
::
List
::
ConstIterator
it
=
offers
.
begin
(),
itEnd
=
offers
.
e
nd
();
KService
::
List
::
ConstIterator
it
=
offers
.
constBegin
(),
itEnd
=
offers
.
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
KService
::
Ptr
service
=
*
it
;
...
...
@@ -3219,8 +3219,8 @@ void DocumentPrivate::setRotationInternal( int r, bool notify )
return
;
// tell the pages to rotate
QVector
<
Okular
::
Page
*
>::
const_iterator
pIt
=
m_pagesVector
.
b
egin
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pEnd
=
m_pagesVector
.
e
nd
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pIt
=
m_pagesVector
.
constB
egin
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pEnd
=
m_pagesVector
.
constE
nd
();
for
(
;
pIt
!=
pEnd
;
++
pIt
)
(
*
pIt
)
->
d
->
rotateAt
(
rotation
);
if
(
notify
)
...
...
@@ -3251,13 +3251,13 @@ void Document::setPageSize( const PageSize &size )
return
;
// tell the pages to change size
QVector
<
Okular
::
Page
*
>::
const_iterator
pIt
=
d
->
m_pagesVector
.
b
egin
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pEnd
=
d
->
m_pagesVector
.
e
nd
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pIt
=
d
->
m_pagesVector
.
constB
egin
();
QVector
<
Okular
::
Page
*
>::
const_iterator
pEnd
=
d
->
m_pagesVector
.
constE
nd
();
for
(
;
pIt
!=
pEnd
;
++
pIt
)
(
*
pIt
)
->
d
->
changeSize
(
size
);
// clear 'memory allocation' descriptors
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
b
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
e
nd
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aIt
=
d
->
m_allocatedPixmapsFifo
.
constB
egin
();
QLinkedList
<
AllocatedPixmap
*
>::
const_iterator
aEnd
=
d
->
m_allocatedPixmapsFifo
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
delete
*
aIt
;
d
->
m_allocatedPixmapsFifo
.
clear
();
...
...
core/fileprinter.cpp
View file @
c2fc9836
...
...
@@ -69,7 +69,7 @@ int FilePrinter::doPrintFiles( QPrinter &printer, QStringList fileList, FileDele
return
-
8
;
}
for
(
QStringList
::
ConstIterator
it
=
fileList
.
begin
();
it
!=
fileList
.
e
nd
();
++
it
)
{
for
(
QStringList
::
ConstIterator
it
=
fileList
.
constBegin
();
it
!=
fileList
.
constE
nd
();
++
it
)
{
if
(
!
QFile
::
exists
(
*
it
))
{
return
-
7
;
}
...
...
core/page.cpp
View file @
c2fc9836
...
...
@@ -759,8 +759,8 @@ void PagePrivate::restoreLocalContents( const QDomNode & pageNode )
if
(
!
ok
)
continue
;
QHash
<
int
,
FormField
*>::
const_iterator
wantedIt
=
hashedforms
.
f
ind
(
index
);
if
(
wantedIt
==
hashedforms
.
e
nd
()
)
QHash
<
int
,
FormField
*>::
const_iterator
wantedIt
=
hashedforms
.
constF
ind
(
index
);
if
(
wantedIt
==
hashedforms
.
constE
nd
()
)
continue
;
QString
value
=
formElement
.
attribute
(
"value"
);
...
...
@@ -800,7 +800,7 @@ void PagePrivate::saveLocalContents( QDomNode & parentNode, QDomDocument & docum
QDomElement
annotListElement
=
document
.
createElement
(
"annotationList"
);
// add every annotation to the annotationList
QLinkedList
<
Annotation
*
>::
const_iterator
aIt
=
m_page
->
m_annotations
.
begin
(),
aEnd
=
m_page
->
m_annotations
.
e
nd
();
QLinkedList
<
Annotation
*
>::
const_iterator
aIt
=
m_page
->
m_annotations
.
constBegin
(),
aEnd
=
m_page
->
m_annotations
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
{
// get annotation
...
...
@@ -828,7 +828,7 @@ void PagePrivate::saveLocalContents( QDomNode & parentNode, QDomDocument & docum
QDomElement
formListElement
=
document
.
createElement
(
"forms"
);
// add every form data to the formList
QLinkedList
<
FormField
*
>::
const_iterator
fIt
=
formfields
.
begin
(),
fItEnd
=
formfields
.
e
nd
();
QLinkedList
<
FormField
*
>::
const_iterator
fIt
=
formfields
.
constBegin
(),
fItEnd
=
formfields
.
constE
nd
();
for
(
;
fIt
!=
fItEnd
;
++
fIt
)
{
// get the form field
...
...
@@ -862,14 +862,14 @@ const QPixmap * Page::_o_nearestPixmap( int pixID, int w, int h ) const
const
QPixmap
*
pixmap
=
0
;
// if a pixmap is present for given id, use it
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
const_iterator
itPixmap
=
d
->
m_pixmaps
.
f
ind
(
pixID
);
if
(
itPixmap
!=
d
->
m_pixmaps
.
e
nd
()
)
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
const_iterator
itPixmap
=
d
->
m_pixmaps
.
constF
ind
(
pixID
);
if
(
itPixmap
!=
d
->
m_pixmaps
.
constE
nd
()
)
pixmap
=
itPixmap
.
value
().
m_pixmap
;
// else find the closest match using pixmaps of other IDs (great optim!)
else
if
(
!
d
->
m_pixmaps
.
isEmpty
()
)
{
int
minDistance
=
-
1
;
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
const_iterator
it
=
d
->
m_pixmaps
.
begin
(),
end
=
d
->
m_pixmaps
.
e
nd
();
QMap
<
int
,
PagePrivate
::
PixmapObject
>::
const_iterator
it
=
d
->
m_pixmaps
.
constBegin
(),
end
=
d
->
m_pixmaps
.
constE
nd
();
for
(
;
it
!=
end
;
++
it
)
{
int
pixWidth
=
(
*
it
).
m_pixmap
->
width
(),
...
...
core/script/kjs_document.cpp
View file @
c2fc9836
...
...
@@ -184,11 +184,11 @@ static KJSObject docGetField( KJSContext *context, void *object,
QString
cName
=
arguments
.
at
(
0
).
toString
(
context
);
QVector
<
Page
*
>::
const_iterator
pIt
=
doc
->
m_pagesVector
.
begin
(),
pEnd
=
doc
->
m_pagesVector
.
e
nd
();
QVector
<
Page
*
>::
const_iterator
pIt
=
doc
->
m_pagesVector
.
constBegin
(),
pEnd
=
doc
->
m_pagesVector
.
constE
nd
();
for
(
;
pIt
!=
pEnd
;
++
pIt
)
{
const
QLinkedList
<
Okular
::
FormField
*
>
pageFields
=
(
*
pIt
)
->
formFields
();
QLinkedList
<
Okular
::
FormField
*
>::
const_iterator
ffIt
=
pageFields
.
begin
(),
ffEnd
=
pageFields
.
e
nd
();
QLinkedList
<
Okular
::
FormField
*
>::
const_iterator
ffIt
=
pageFields
.
constBegin
(),
ffEnd
=
pageFields
.
constE
nd
();
for
(
;
ffIt
!=
ffEnd
;
++
ffIt
)
{
if
(
(
*
ffIt
)
->
name
()
==
cName
)
...
...
core/textpage.cpp
View file @
c2fc9836
...
...
@@ -132,7 +132,7 @@ TextPage::TextPage()
TextPage
::
TextPage
(
const
TextEntity
::
List
&
words
)
:
d
(
new
TextPagePrivate
()
)
{
TextEntity
::
List
::
ConstIterator
it
=
words
.
begin
(),
itEnd
=
words
.
e
nd
();
TextEntity
::
List
::
ConstIterator
it
=
words
.
constBegin
(),
itEnd
=
words
.
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
TextEntity
*
e
=
*
it
;
...
...
@@ -285,7 +285,7 @@ RegularAreaRect * TextPage::textArea ( TextSelection * sel) const
double
endCx
=
endC
.
x
;
double
endCy
=
endC
.
y
;
TextList
::
ConstIterator
it
=
d
->
m_words
.
begin
(),
itEnd
=
d
->
m_words
.
e
nd
();
TextList
::
ConstIterator
it
=
d
->
m_words
.
constBegin
(),
itEnd
=
d
->
m_words
.
constE
nd
();
MergeSide
side
=
d
->
m_page
?
(
MergeSide
)
d
->
m_page
->
m_page
->
totalOrientation
()
:
MergeRight
;
for
(
;
it
!=
itEnd
;
++
it
)
{
...
...
@@ -311,8 +311,8 @@ RegularAreaRect* TextPage::findText( int searchID, const QString &query, SearchD
return
0
;
TextList
::
ConstIterator
start
;
TextList
::
ConstIterator
end
;
QMap
<
int
,
SearchPoint
*
>::
const_iterator
sIt
=
d
->
m_searchPoints
.
f
ind
(
searchID
);
if
(
sIt
==
d
->
m_searchPoints
.
e
nd
()
)
QMap
<
int
,
SearchPoint
*
>::
const_iterator
sIt
=
d
->
m_searchPoints
.
constF
ind
(
searchID
);
if
(
sIt
==
d
->
m_searchPoints
.
constE
nd
()
)
{
// if no previous run of this search is found, then set it to start
// from the beginning (respecting the search direction)
...
...
@@ -325,12 +325,12 @@ RegularAreaRect* TextPage::findText( int searchID, const QString &query, SearchD
switch
(
dir
)
{
case
FromTop
:
start
=
d
->
m_words
.
b
egin
();
end
=
d
->
m_words
.
e
nd
();
start
=
d
->
m_words
.
constB
egin
();
end
=
d
->
m_words
.
constE
nd
();
break
;
case
FromBottom
:
start
=
d
->
m_words
.
e
nd
();
end
=
d
->
m_words
.
b
egin
();
start
=
d
->
m_words
.
constE
nd
();
end
=
d
->
m_words
.
constB
egin
();
Q_ASSERT
(
start
!=
end
);
// we can safely go one step back, as we already checked
// that the list is not empty
...
...
@@ -339,13 +339,13 @@ RegularAreaRect* TextPage::findText( int searchID, const QString &query, SearchD
break
;
case
NextResult
:
start
=
(
*
sIt
)
->
it_end
;
end
=
d
->
m_words
.
e
nd
();
end
=
d
->
m_words
.
constE
nd
();
if
(
(
start
+
1
)
!=
end
)
++
start
;
break
;
case
PreviousResult
:
start
=
(
*
sIt
)
->
it_begin
;
end
=
d
->
m_words
.
b
egin
();
end
=
d
->
m_words
.
constB
egin
();
if
(
start
!=
end
)
--
start
;
forward
=
false
;
...
...
@@ -610,7 +610,7 @@ QString TextPage::text(const RegularAreaRect *area) const
if
(
area
&&
area
->
isNull
()
)
return
QString
();
TextList
::
ConstIterator
it
=
d
->
m_words
.
begin
(),
itEnd
=
d
->
m_words
.
e
nd
();
TextList
::
ConstIterator
it
=
d
->
m_words
.
constBegin
(),
itEnd
=
d
->
m_words
.
constE
nd
();
QString
ret
;
if
(
area
)
{
...
...
generators/chm/lib/libchmfileimpl.cpp
View file @
c2fc9836
...
...
@@ -336,9 +336,9 @@ QString LCHMFileImpl::decodeEntity( const QString & entity )
}
else
{
QMap
<
QString
,
QString
>::
const_iterator
it
=
m_entityDecodeMap
.
f
ind
(
entity
);
QMap
<
QString
,
QString
>::
const_iterator
it
=
m_entityDecodeMap
.
constF
ind
(
entity
);
if
(
it
==
m_entityDecodeMap
.
e
nd
()
)
if
(
it
==
m_entityDecodeMap
.
constE
nd
()
)
{
qWarning
(
"LCHMFileImpl::decodeEntity: could not decode HTML entity '%s'"
,
qPrintable
(
entity
));
return
QString
::
null
;
...
...
generators/djvu/kdjvu.cpp
View file @
c2fc9836
...
...
@@ -711,8 +711,8 @@ void KDjVu::closeFile()
QVariant
KDjVu
::
metaData
(
const
QString
&
key
)
const
{
QHash
<
QString
,
QVariant
>::
ConstIterator
it
=
d
->
m_metaData
.
f
ind
(
key
);
return
it
!=
d
->
m_metaData
.
e
nd
()
?
it
.
value
()
:
QVariant
();
QHash
<
QString
,
QVariant
>::
ConstIterator
it
=
d
->
m_metaData
.
constF
ind
(
key
);
return
it
!=
d
->
m_metaData
.
constE
nd
()
?
it
.
value
()
:
QVariant
();
}
const
QDomDocument
*
KDjVu
::
documentBookmarks
()
const
...
...
generators/dvi/generator_dvi.cpp
View file @
c2fc9836
...
...
@@ -312,8 +312,8 @@ const Okular::DocumentSynopsis *DviGenerator::generateDocumentSynopsis()
QStack
<
QDomElement
>
stack
;
QVector
<
PreBookmark
>::
ConstIterator
it
=
prebookmarks
.
b
egin
();
QVector
<
PreBookmark
>::
ConstIterator
itEnd
=
prebookmarks
.
e
nd
();
QVector
<
PreBookmark
>::
ConstIterator
it
=
prebookmarks
.
constB
egin
();
QVector
<
PreBookmark
>::
ConstIterator
itEnd
=
prebookmarks
.
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{
QDomElement
domel
=
m_docSynopsis
->
createElement
(
(
*
it
).
title
);
...
...
generators/poppler/generator_pdf.cpp
View file @
c2fc9836
...
...
@@ -1457,8 +1457,8 @@ void PDFGenerator::loadPdfSync( const QString & filePath, QVector<Okular::Page*>
if
(
line
.
startsWith
(
QLatin1Char
(
'l'
)
)
&&
linere
.
exactMatch
(
line
)
)
{
int
id
=
linere
.
cap
(
1
).
toInt
();
QHash
<
int
,
pdfsyncpoint
>::
const_iterator
it
=
points
.
f
ind
(
id
);
if
(
it
==
points
.
e
nd
()
)
QHash
<
int
,
pdfsyncpoint
>::
const_iterator
it
=
points
.
constF
ind
(
id
);
if
(
it
==
points
.
constE
nd
()
)
{
pdfsyncpoint
pt
;
pt
.
x
=
0
;
...
...
part.cpp
View file @
c2fc9836
...
...
@@ -172,8 +172,8 @@ static QString compressedMimeFor( const QString& mime_to_check )
compressedMimeMap
[
QString
::
fromLatin1
(
"application/x-bzdvi"
)
]
=
QString
::
fromLatin1
(
"application/x-bzip"
);
}
QHash
<
QString
,
QString
>::
const_iterator
it
=
compressedMimeMap
.
f
ind
(
mime_to_check
);
if
(
it
!=
compressedMimeMap
.
e
nd
()
)
QHash
<
QString
,
QString
>::
const_iterator
it
=
compressedMimeMap
.
constF
ind
(
mime_to_check
);
if
(
it
!=
compressedMimeMap
.
constE
nd
()
)
return
it
.
value
();
return
QString
();
...
...
ui/fileprinterpreview.cpp
View file @
c2fc9836
...
...
@@ -67,8 +67,8 @@ void FilePrinterPreviewPrivate::getPart()
KService
::
List
offers
=
KMimeTypeTrader
::
self
()
->
query
(
"application/postscript"
,
"KParts/ReadOnlyPart"
);
KService
::
List
::
ConstIterator
it
=
offers
.
b
egin
();
while
(
!
factory
&&
it
!=
offers
.
e
nd
())
{
KService
::
List
::
ConstIterator
it
=
offers
.
constB
egin
();
while
(
!
factory
&&
it
!=
offers
.
constE
nd
())
{
KPluginLoader
loader
(
**
it
);
factory
=
loader
.
factory
();
if
(
!
factory
)
{
...
...
ui/formwidgets.cpp
View file @
c2fc9836
...
...
@@ -45,7 +45,7 @@ QButtonGroup* FormWidgetsController::registerRadioButton( FormWidgetIface* widge
for
(
;
it
!=
itEnd
;
++
it
)
{
const
QList
<
int
>::
const_iterator
idsIt
=
qFind
(
(
*
it
).
ids
,
id
);
if
(
idsIt
!=
(
*
it
).
ids
.
e
nd
()
)
if
(
idsIt
!=
(
*
it
).
ids
.
constE
nd
()
)
{
(
*
it
).
group
->
addButton
(
widget
->
button
()
);
return
(
*
it
).
group
;
...
...
ui/ktreeviewsearchline.cpp
View file @
c2fc9836
...
...
@@ -392,8 +392,8 @@ bool KTreeViewSearchLine::itemMatches( const QModelIndex &index, int row, const
const
int
columncount
=
index
.
model
()
->
columnCount
(
index
);
if
(
!
d
->
searchColumns
.
isEmpty
()
)
{
QList
<
int
>::
ConstIterator
it
=
d
->
searchColumns
.
b
egin
();
for
(
;
it
!=
d
->
searchColumns
.
e
nd
();
++
it
)
{
QList
<
int
>::
ConstIterator
it
=
d
->
searchColumns
.
constB
egin
();
for
(
;
it
!=
d
->
searchColumns
.
constE
nd
();
++
it
)
{
if
(
*
it
<
columncount
&&
index
.
child
(
row
,
*
it
).
data
(
Qt
::
DisplayRole
).
toString
().
indexOf
(
pattern
,
0
,
d
->
caseSensitive
)
>=
0
)
return
true
;
...
...
ui/pagepainter.cpp
View file @
c2fc9836
...
...
@@ -134,10 +134,10 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
{*/
Okular
::
NormalizedRect
*
limitRect
=
new
Okular
::
NormalizedRect
(
nXMin
,
nYMin
,
nXMax
,
nYMax
);
QLinkedList
<
Okular
::
HighlightAreaRect
*
>::
const_iterator
h2It
=
page
->
m_highlights
.
begin
(),
hEnd
=
page
->
m_highlights
.
e
nd
();
QLinkedList
<
Okular
::
HighlightAreaRect
*
>::
const_iterator
h2It
=
page
->
m_highlights
.
constBegin
(),
hEnd
=
page
->
m_highlights
.
constE
nd
();
Okular
::
HighlightAreaRect
::
const_iterator
hIt
;
for
(
;
h2It
!=
hEnd
;
++
h2It
)
for
(
hIt
=
(
*
h2It
)
->
begin
();
hIt
!=
(
*
h2It
)
->
e
nd
();
++
hIt
)
for
(
hIt
=
(
*
h2It
)
->
constBegin
();
hIt
!=
(
*
h2It
)
->
constE
nd
();
++
hIt
)
{
if
((
*
hIt
).
intersects
(
limitRect
))
bufferedHighlights
->
append
(
qMakePair
((
*
h2It
)
->
color
,
*
hIt
)
);
...
...
@@ -153,7 +153,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
{*/
Okular
::
NormalizedRect
*
limitRect
=
new
Okular
::
NormalizedRect
(
nXMin
,
nYMin
,
nXMax
,
nYMax
);
const
Okular
::
RegularAreaRect
*
textSelection
=
page
->
textSelection
();
Okular
::
HighlightAreaRect
::
const_iterator
hIt
=
textSelection
->
begin
(),
hEnd
=
textSelection
->
e
nd
();
Okular
::
HighlightAreaRect
::
const_iterator
hIt
=
textSelection
->
constBegin
(),
hEnd
=
textSelection
->
constE
nd
();
for
(
;
hIt
!=
hEnd
;
++
hIt
)
{
if
(
(
*
hIt
).
intersects
(
limitRect
)
)
...
...
@@ -165,7 +165,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
// append annotations inside limits to the un/buffered list
if
(
canDrawAnnotations
)
{
QLinkedList
<
Okular
::
Annotation
*
>::
const_iterator
aIt
=
page
->
m_annotations
.
begin
(),
aEnd
=
page
->
m_annotations
.
e
nd
();
QLinkedList
<
Okular
::
Annotation
*
>::
const_iterator
aIt
=
page
->
m_annotations
.
constBegin
(),
aEnd
=
page
->
m_annotations
.
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
{
Okular
::
Annotation
*
ann
=
*
aIt
;
...
...
@@ -288,7 +288,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
if
(
bufferedHighlights
)
{
// draw highlights that are inside the 'limits' paint region
QList
<
QPair
<
QColor
,
Okular
::
NormalizedRect
>
>::
const_iterator
hIt
=
bufferedHighlights
->
begin
(),
hEnd
=
bufferedHighlights
->
e
nd
();
QList
<
QPair
<
QColor
,
Okular
::
NormalizedRect
>
>::
const_iterator
hIt
=
bufferedHighlights
->
constBegin
(),
hEnd
=
bufferedHighlights
->
constE
nd
();
for
(
;
hIt
!=
hEnd
;
++
hIt
)
{
const
Okular
::
NormalizedRect
&
r
=
(
*
hIt
).
second
;
...
...
@@ -334,7 +334,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
yScale
=
(
double
)
scaledHeight
/
(
double
)
limits
.
height
();
// paint all buffered annotations in the page
QList
<
Okular
::
Annotation
*
>::
const_iterator
aIt
=
bufferedAnnotations
->
begin
(),
aEnd
=
bufferedAnnotations
->
e
nd
();
QList
<
Okular
::
Annotation
*
>::
const_iterator
aIt
=
bufferedAnnotations
->
constBegin
(),
aEnd
=
bufferedAnnotations
->
constE
nd
();
for
(
;
aIt
!=
aEnd
;
++
aIt
)
{
Okular
::
Annotation
*
a
=
*
aIt
;
...
...
@@ -353,8 +353,8 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
NormalizedPath
path
;
// normalize page point to image
const
QLinkedList
<
Okular
::
NormalizedPoint
>
points
=
la
->
transformedLinePoints
();
QLinkedList
<
Okular
::
NormalizedPoint
>::
const_iterator
it
=
points
.
b
egin
();
QLinkedList
<
Okular
::
NormalizedPoint
>::
const_iterator
itEnd
=
points
.
e
nd
();
QLinkedList
<
Okular
::
NormalizedPoint
>::
const_iterator
it
=
points
.
constB
egin
();
QLinkedList
<
Okular
::
NormalizedPoint
>::
const_iterator
itEnd
=
points
.
constE
nd
();
for
(
;
it
!=
itEnd
;
++
it
)
{