Fix iterator

svn path=/trunk/KDE/kdegraphics/okular/; revision=882957
This commit is contained in:
Laurent Montel 2008-11-11 18:48:40 +00:00
parent dbd7fa12a9
commit c2fc9836e8
18 changed files with 126 additions and 126 deletions

View file

@ -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.end();\
QMap< int, DocumentObserver * >::const_iterator it = d->document->m_observers.constBegin(), end = d->document->m_observers.constEnd();\
for ( ; it != end ; ++ it ) { (*it)-> cmd ; } }
class OkularBookmarkAction : public KBookmarkAction

View file

@ -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.end() )
if ( !m_loadedGenerators.isEmpty() && genIt != m_loadedGenerators.constEnd() )
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.end();
QVector< Page * >::const_iterator pIt = m_pagesVector.constBegin(), pEnd = m_pagesVector.constEnd();
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.end() )
if ( backIterator != m_viewportHistory.constEnd() )
{
// go back up to OKULAR_HISTORY_SAVEDSTEPS steps from the current viewportIterator
int backSteps = OKULAR_HISTORY_SAVEDSTEPS;
while ( backSteps-- && backIterator != m_viewportHistory.begin() )
while ( backSteps-- && backIterator != m_viewportHistory.constBegin() )
--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.end();
QMap< int, DocumentObserver * >::const_iterator it = m_observers.constBegin(), end = m_observers.constEnd();
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.end();
QVector<Page*>::const_iterator it = m_pagesVector.constBegin(), end = m_pagesVector.constEnd();
for ( ; it != end; ++it ) {
(*it)->deletePixmaps();
}
// [MEM] remove allocation descriptors
QLinkedList< AllocatedPixmap * >::const_iterator aIt = m_allocatedPixmapsFifo.begin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = m_allocatedPixmapsFifo.end();
QLinkedList< AllocatedPixmap * >::const_iterator aIt = m_allocatedPixmapsFifo.constBegin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = m_allocatedPixmapsFifo.constEnd();
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.end();
QMap< int, PagePrivate::PixmapObject >::ConstIterator it = page->d->m_pixmaps.constBegin(), itEnd = page->d->m_pixmaps.constEnd();
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->begin();
itEnd = pageMatches->end();
it = pageMatches->constBegin();
itEnd = pageMatches->constEnd();
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->begin();
itEnd = pageMatches->end();
it = pageMatches->constBegin();
itEnd = pageMatches->constEnd();
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.end();
QSet< View * >::const_iterator viewIt = d->m_views.constBegin(), viewEnd = d->m_views.constEnd();
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.begin();
QLinkedList< PixmapRequest * >::const_iterator sEnd = d->m_pixmapRequestsStack.end();
QLinkedList< PixmapRequest * >::const_iterator sIt = d->m_pixmapRequestsStack.constBegin();
QLinkedList< PixmapRequest * >::const_iterator sEnd = d->m_pixmapRequestsStack.constEnd();
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.begin();
QVector< Page * >::const_iterator pEnd = d->m_pagesVector.end();
QVector< Page * >::const_iterator pIt = d->m_pagesVector.constBegin();
QVector< Page * >::const_iterator pEnd = d->m_pagesVector.constEnd();
for ( ; pIt != pEnd; ++pIt )
delete *pIt;
d->m_pagesVector.clear();
// clear 'memory allocation' descriptors
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.begin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.end();
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.constBegin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.constEnd();
for ( ; aIt != aEnd; ++aIt )
delete *aIt;
d->m_allocatedPixmapsFifo.clear();
// clear 'running searches' descriptors
QMap< int, RunningSearch * >::const_iterator rIt = d->m_searches.begin();
QMap< int, RunningSearch * >::const_iterator rEnd = d->m_searches.end();
QMap< int, RunningSearch * >::const_iterator rIt = d->m_searches.constBegin();
QMap< int, RunningSearch * >::const_iterator rEnd = d->m_searches.constEnd();
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.begin();
QVector< VisiblePageRect * >::const_iterator vEnd = d->m_pageRects.end();
QVector< VisiblePageRect * >::const_iterator vIt = d->m_pageRects.constBegin();
QVector< VisiblePageRect * >::const_iterator vEnd = d->m_pageRects.constEnd();
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.end();
QVector<Page*>::const_iterator it = d->m_pagesVector.constBegin(), end = d->m_pagesVector.constEnd();
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.end();
QVector<Page*>::const_iterator it = d->m_pagesVector.constBegin(), end = d->m_pagesVector.constEnd();
for ( ; it != end; ++it ) {
(*it)->deletePixmaps();
}
// [MEM] remove allocation descriptors
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.begin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.end();
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.constBegin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.constEnd();
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.begin();
QVector< VisiblePageRect * >::const_iterator vEnd = d->m_pageRects.end();
QVector< VisiblePageRect * >::const_iterator vIt = d->m_pageRects.constBegin();
QVector< VisiblePageRect * >::const_iterator vEnd = d->m_pageRects.constEnd();
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.end();
QMap< int, DocumentObserver * >::const_iterator it = d->m_observers.constBegin(), end = d->m_observers.constEnd();
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.end();
QLinkedList< PixmapRequest * >::const_iterator rIt = requests.constBegin(), rEnd = requests.constEnd();
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.end();
QLinkedList< PixmapRequest * >::const_iterator rIt = requests.constBegin(), rEnd = requests.constEnd();
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.end();
QLinkedList< PixmapRequest * >::const_iterator rIt = requests.constBegin(), rEnd = requests.constEnd();
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.end();
QMap< int, DocumentObserver * >::const_iterator it = d->m_observers.constBegin(), end = d->m_observers.constEnd();
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.end();
QMap< int, DocumentObserver * >::const_iterator it = d->m_observers.constBegin(), end = d->m_observers.constEnd();
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.end() )
if ( it != editors.constEnd() )
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.end();
KService::List::ConstIterator it = offers.constBegin(), itEnd = offers.constEnd();
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.begin();
QVector< Okular::Page * >::const_iterator pEnd = m_pagesVector.end();
QVector< Okular::Page * >::const_iterator pIt = m_pagesVector.constBegin();
QVector< Okular::Page * >::const_iterator pEnd = m_pagesVector.constEnd();
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.begin();
QVector< Okular::Page * >::const_iterator pEnd = d->m_pagesVector.end();
QVector< Okular::Page * >::const_iterator pIt = d->m_pagesVector.constBegin();
QVector< Okular::Page * >::const_iterator pEnd = d->m_pagesVector.constEnd();
for ( ; pIt != pEnd; ++pIt )
(*pIt)->d->changeSize( size );
// clear 'memory allocation' descriptors
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.begin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.end();
QLinkedList< AllocatedPixmap * >::const_iterator aIt = d->m_allocatedPixmapsFifo.constBegin();
QLinkedList< AllocatedPixmap * >::const_iterator aEnd = d->m_allocatedPixmapsFifo.constEnd();
for ( ; aIt != aEnd; ++aIt )
delete *aIt;
d->m_allocatedPixmapsFifo.clear();

View file

@ -69,7 +69,7 @@ int FilePrinter::doPrintFiles( QPrinter &printer, QStringList fileList, FileDele
return -8;
}
for (QStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it) {
for (QStringList::ConstIterator it = fileList.constBegin(); it != fileList.constEnd(); ++it) {
if (!QFile::exists(*it)) {
return -7;
}

View file

@ -759,8 +759,8 @@ void PagePrivate::restoreLocalContents( const QDomNode & pageNode )
if ( !ok )
continue;
QHash<int, FormField*>::const_iterator wantedIt = hashedforms.find( index );
if ( wantedIt == hashedforms.end() )
QHash<int, FormField*>::const_iterator wantedIt = hashedforms.constFind( index );
if ( wantedIt == hashedforms.constEnd() )
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.end();
QLinkedList< Annotation * >::const_iterator aIt = m_page->m_annotations.constBegin(), aEnd = m_page->m_annotations.constEnd();
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.end();
QLinkedList< FormField * >::const_iterator fIt = formfields.constBegin(), fItEnd = formfields.constEnd();
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.find( pixID );
if ( itPixmap != d->m_pixmaps.end() )
QMap< int, PagePrivate::PixmapObject >::const_iterator itPixmap = d->m_pixmaps.constFind( pixID );
if ( itPixmap != d->m_pixmaps.constEnd() )
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.end();
QMap< int, PagePrivate::PixmapObject >::const_iterator it = d->m_pixmaps.constBegin(), end = d->m_pixmaps.constEnd();
for ( ; it != end; ++it )
{
int pixWidth = (*it).m_pixmap->width(),

View file

@ -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.end();
QVector< Page * >::const_iterator pIt = doc->m_pagesVector.constBegin(), pEnd = doc->m_pagesVector.constEnd();
for ( ; pIt != pEnd; ++pIt )
{
const QLinkedList< Okular::FormField * > pageFields = (*pIt)->formFields();
QLinkedList< Okular::FormField * >::const_iterator ffIt = pageFields.begin(), ffEnd = pageFields.end();
QLinkedList< Okular::FormField * >::const_iterator ffIt = pageFields.constBegin(), ffEnd = pageFields.constEnd();
for ( ; ffIt != ffEnd; ++ffIt )
{
if ( (*ffIt)->name() == cName )

View file

@ -132,7 +132,7 @@ TextPage::TextPage()
TextPage::TextPage( const TextEntity::List &words )
: d( new TextPagePrivate() )
{
TextEntity::List::ConstIterator it = words.begin(), itEnd = words.end();
TextEntity::List::ConstIterator it = words.constBegin(), itEnd = words.constEnd();
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.end();
TextList::ConstIterator it = d->m_words.constBegin(), itEnd = d->m_words.constEnd();
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.find( searchID );
if ( sIt == d->m_searchPoints.end() )
QMap< int, SearchPoint* >::const_iterator sIt = d->m_searchPoints.constFind( searchID );
if ( sIt == d->m_searchPoints.constEnd() )
{
// 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.begin();
end = d->m_words.end();
start = d->m_words.constBegin();
end = d->m_words.constEnd();
break;
case FromBottom:
start = d->m_words.end();
end = d->m_words.begin();
start = d->m_words.constEnd();
end = d->m_words.constBegin();
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.end();
end = d->m_words.constEnd();
if ( ( start + 1 ) != end )
++start;
break;
case PreviousResult:
start = (*sIt)->it_begin;
end = d->m_words.begin();
end = d->m_words.constBegin();
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.end();
TextList::ConstIterator it = d->m_words.constBegin(), itEnd = d->m_words.constEnd();
QString ret;
if ( area )
{

View file

@ -336,9 +336,9 @@ QString LCHMFileImpl::decodeEntity( const QString & entity )
}
else
{
QMap<QString, QString>::const_iterator it = m_entityDecodeMap.find( entity );
QMap<QString, QString>::const_iterator it = m_entityDecodeMap.constFind( entity );
if ( it == m_entityDecodeMap.end() )
if ( it == m_entityDecodeMap.constEnd() )
{
qWarning ("LCHMFileImpl::decodeEntity: could not decode HTML entity '%s'", qPrintable( entity ));
return QString::null;

View file

@ -711,8 +711,8 @@ void KDjVu::closeFile()
QVariant KDjVu::metaData( const QString & key ) const
{
QHash<QString, QVariant>::ConstIterator it = d->m_metaData.find( key );
return it != d->m_metaData.end() ? it.value() : QVariant();
QHash<QString, QVariant>::ConstIterator it = d->m_metaData.constFind( key );
return it != d->m_metaData.constEnd() ? it.value() : QVariant();
}
const QDomDocument * KDjVu::documentBookmarks() const

View file

@ -312,8 +312,8 @@ const Okular::DocumentSynopsis *DviGenerator::generateDocumentSynopsis()
QStack<QDomElement> stack;
QVector<PreBookmark>::ConstIterator it = prebookmarks.begin();
QVector<PreBookmark>::ConstIterator itEnd = prebookmarks.end();
QVector<PreBookmark>::ConstIterator it = prebookmarks.constBegin();
QVector<PreBookmark>::ConstIterator itEnd = prebookmarks.constEnd();
for( ; it != itEnd; ++it )
{
QDomElement domel = m_docSynopsis->createElement( (*it).title );

View file

@ -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.find( id );
if ( it == points.end() )
QHash<int, pdfsyncpoint>::const_iterator it = points.constFind( id );
if ( it == points.constEnd() )
{
pdfsyncpoint pt;
pt.x = 0;

View file

@ -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.find( mime_to_check );
if ( it != compressedMimeMap.end() )
QHash< QString, QString >::const_iterator it = compressedMimeMap.constFind( mime_to_check );
if ( it != compressedMimeMap.constEnd() )
return it.value();
return QString();

View file

@ -67,8 +67,8 @@ void FilePrinterPreviewPrivate::getPart()
KService::List offers =
KMimeTypeTrader::self()->query("application/postscript", "KParts/ReadOnlyPart");
KService::List::ConstIterator it = offers.begin();
while (!factory && it != offers.end()) {
KService::List::ConstIterator it = offers.constBegin();
while (!factory && it != offers.constEnd()) {
KPluginLoader loader(**it);
factory = loader.factory();
if (!factory) {

View file

@ -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.end() )
if ( idsIt != (*it).ids.constEnd() )
{
(*it).group->addButton( widget->button() );
return (*it).group;

View file

@ -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.begin();
for ( ; it != d->searchColumns.end(); ++it ) {
QList<int>::ConstIterator it = d->searchColumns.constBegin();
for ( ; it != d->searchColumns.constEnd(); ++it ) {
if ( *it < columncount &&
index.child( row, *it ).data( Qt::DisplayRole ).toString().indexOf( pattern, 0, d->caseSensitive ) >= 0 )
return true;

View file

@ -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.end();
QLinkedList< Okular::HighlightAreaRect * >::const_iterator h2It = page->m_highlights.constBegin(), hEnd = page->m_highlights.constEnd();
Okular::HighlightAreaRect::const_iterator hIt;
for ( ; h2It != hEnd; ++h2It )
for (hIt=(*h2It)->begin(); hIt!=(*h2It)->end(); ++hIt)
for (hIt=(*h2It)->constBegin(); hIt!=(*h2It)->constEnd(); ++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->end();
Okular::HighlightAreaRect::const_iterator hIt = textSelection->constBegin(), hEnd = textSelection->constEnd();
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.end();
QLinkedList< Okular::Annotation * >::const_iterator aIt = page->m_annotations.constBegin(), aEnd = page->m_annotations.constEnd();
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->end();
QList< QPair<QColor, Okular::NormalizedRect> >::const_iterator hIt = bufferedHighlights->constBegin(), hEnd = bufferedHighlights->constEnd();
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->end();
QList< Okular::Annotation * >::const_iterator aIt = bufferedAnnotations->constBegin(), aEnd = bufferedAnnotations->constEnd();
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.begin();
QLinkedList<Okular::NormalizedPoint>::const_iterator itEnd = points.end();
QLinkedList<Okular::NormalizedPoint>::const_iterator it = points.constBegin();
QLinkedList<Okular::NormalizedPoint>::const_iterator itEnd = points.constEnd();
for ( ; it != itEnd; ++it )
{
Okular::NormalizedPoint point;
@ -490,7 +490,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
const QLinkedList<Okular::NormalizedPoint> & inkPath = transformedInkPaths[ p ];
// normalize page point to image
QLinkedList<Okular::NormalizedPoint>::const_iterator pIt = inkPath.begin(), pEnd = inkPath.end();
QLinkedList<Okular::NormalizedPoint>::const_iterator pIt = inkPath.constBegin(), pEnd = inkPath.constEnd();
for ( ; pIt != pEnd; ++pIt )
{
const Okular::NormalizedPoint & inkPoint = *pIt;
@ -518,7 +518,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
if ( unbufferedAnnotations )
{
// iterate over annotations and paint AText, AGeom, AStamp
QList< Okular::Annotation * >::const_iterator aIt = unbufferedAnnotations->begin(), aEnd = unbufferedAnnotations->end();
QList< Okular::Annotation * >::const_iterator aIt = unbufferedAnnotations->constBegin(), aEnd = unbufferedAnnotations->constEnd();
for ( ; aIt != aEnd; ++aIt )
{
Okular::Annotation * a = *aIt;
@ -668,7 +668,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
QRect limitsEnlarged = limits;
limitsEnlarged.adjust( -2, -2, 2, 2 );
// draw rects that are inside the 'limits' paint region as opaque rects
QLinkedList< Okular::ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end();
QLinkedList< Okular::ObjectRect * >::const_iterator lIt = page->m_rects.constBegin(), lEnd = page->m_rects.constEnd();
for ( ; lIt != lEnd; ++lIt )
{
Okular::ObjectRect * rect = *lIt;

View file

@ -392,7 +392,7 @@ PageView::~PageView()
// delete the local storage structure
qDeleteAll(d->m_annowindows);
// delete all widgets
QVector< PageViewItem * >::const_iterator dIt = d->items.begin(), dEnd = d->items.end();
QVector< PageViewItem * >::const_iterator dIt = d->items.constBegin(), dEnd = d->items.constEnd();
for ( ; dIt != dEnd; ++dIt )
delete *dIt;
delete d->formsWidgetController;
@ -601,8 +601,8 @@ void PageView::setAnnotationWindow( Okular::Annotation * annotation )
// find the annot window
AnnotWindow* existWindow = 0;
QHash< Okular::Annotation *, AnnotWindow * >::ConstIterator it = d->m_annowindows.find( annotation );
if ( it != d->m_annowindows.end() )
QHash< Okular::Annotation *, AnnotWindow * >::ConstIterator it = d->m_annowindows.constFind( annotation );
if ( it != d->m_annowindows.constEnd() )
{
existWindow = *it;
}
@ -721,7 +721,7 @@ void PageView::selectAll()
if ( d->mouseMode != MouseTextSelect )
return;
QVector< PageViewItem * >::const_iterator it = d->items.begin(), itEnd = d->items.end();
QVector< PageViewItem * >::const_iterator it = d->items.constBegin(), itEnd = d->items.constEnd();
for ( ; it < itEnd; ++it )
{
Okular::RegularAreaRect * area = textSelectionForItem( *it );
@ -746,7 +746,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
}
// delete all widgets (one for each page in pageSet)
QVector< PageViewItem * >::const_iterator dIt = d->items.begin(), dEnd = d->items.end();
QVector< PageViewItem * >::const_iterator dIt = d->items.constBegin(), dEnd = d->items.constEnd();
for ( ; dIt != dEnd; ++dIt )
delete *dIt;
d->items.clear();
@ -759,7 +759,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
bool haspages = !pageSet.isEmpty();
bool hasformwidgets = false;
// create children widgets
QVector< Okular::Page * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
QVector< Okular::Page * >::const_iterator setIt = pageSet.constBegin(), setEnd = pageSet.constEnd();
for ( ; setIt != setEnd; ++setIt )
{
PageViewItem * item = new PageViewItem( *setIt );
@ -768,7 +768,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
kDebug().nospace() << "cropped geom for " << d->items.last()->pageNumber() << " is " << d->items.last()->croppedGeometry();
#endif
const QLinkedList< Okular::FormField * > pageFields = (*setIt)->formFields();
QLinkedList< Okular::FormField * >::const_iterator ffIt = pageFields.begin(), ffEnd = pageFields.end();
QLinkedList< Okular::FormField * >::const_iterator ffIt = pageFields.constBegin(), ffEnd = pageFields.constEnd();
for ( ; ffIt != ffEnd; ++ffIt )
{
Okular::FormField * ff = *ffIt;
@ -784,7 +784,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
}
}
const QLinkedList< Okular::Annotation * > annotations = (*setIt)->annotations();
QLinkedList< Okular::Annotation * >::const_iterator aIt = annotations.begin(), aEnd = annotations.end();
QLinkedList< Okular::Annotation * >::const_iterator aIt = annotations.constBegin(), aEnd = annotations.constEnd();
for ( ; aIt != aEnd; ++aIt )
{
Okular::Annotation * a = *aIt;
@ -882,7 +882,7 @@ void PageView::notifyViewportChanged( bool smoothMove )
// find PageViewItem matching the viewport description
const Okular::DocumentViewport & vp = d->document->viewport();
PageViewItem * item = 0;
QVector< PageViewItem * >::const_iterator iIt = d->items.begin(), iEnd = d->items.end();
QVector< PageViewItem * >::const_iterator iIt = d->items.constBegin(), iEnd = d->items.constEnd();
for ( ; iIt != iEnd; ++iIt )
if ( (*iIt)->pageNumber() == vp.pageNumber )
{
@ -1002,7 +1002,7 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags )
}
// iterate over visible items: if page(pageNumber) is one of them, repaint it
QLinkedList< PageViewItem * >::const_iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
QLinkedList< PageViewItem * >::const_iterator iIt = d->visibleItems.constBegin(), iEnd = d->visibleItems.constEnd();
for ( ; iIt != iEnd; ++iIt )
if ( (*iIt)->pageNumber() == pageNumber && (*iIt)->isVisible() )
{
@ -1041,7 +1041,7 @@ bool PageView::canUnloadPixmap( int pageNumber ) const
if ( Okular::Settings::memoryLevel() != Okular::Settings::EnumMemoryLevel::Aggressive )
{
// if the item is visible, forbid unloading
QLinkedList< PageViewItem * >::const_iterator vIt = d->visibleItems.begin(), vEnd = d->visibleItems.end();
QLinkedList< PageViewItem * >::const_iterator vIt = d->visibleItems.constBegin(), vEnd = d->visibleItems.constEnd();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
return false;
@ -1049,7 +1049,7 @@ bool PageView::canUnloadPixmap( int pageNumber ) const
else
{
// forbid unloading of the visible items, and of the previous and next
QLinkedList< PageViewItem * >::const_iterator vIt = d->visibleItems.begin(), vEnd = d->visibleItems.end();
QLinkedList< PageViewItem * >::const_iterator vIt = d->visibleItems.constBegin(), vEnd = d->visibleItems.constEnd();
for ( ; vIt != vEnd; ++vIt )
if ( abs( (*vIt)->pageNumber() - pageNumber ) <= 1 )
return false;
@ -1952,7 +1952,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
{
// grab text in selection by extracting it from all intersected pages
const Okular::Page * okularPage=0;
QVector< PageViewItem * >::const_iterator iIt = d->items.begin(), iEnd = d->items.end();
QVector< PageViewItem * >::const_iterator iIt = d->items.constBegin(), iEnd = d->items.constEnd();
for ( ; iIt != iEnd; ++iIt )
{
PageViewItem * item = *iIt;
@ -2279,7 +2279,7 @@ void PageView::drawDocumentOnPainter( const QRect & contentsRect, QPainter * p )
QRegion remainingArea( contentsRect );
// iterate over all items painting the ones intersecting contentsRect
QVector< PageViewItem * >::const_iterator iIt = d->items.begin(), iEnd = d->items.end();
QVector< PageViewItem * >::const_iterator iIt = d->items.constBegin(), iEnd = d->items.constEnd();
for ( ; iIt != iEnd; ++iIt )
{
// check if a piece of the page intersects the contents rect
@ -2753,7 +2753,7 @@ void PageView::center(int cx, int cy)
void PageView::toggleFormWidgets( bool on )
{
bool somehadfocus = false;
QVector< PageViewItem * >::const_iterator dIt = d->items.begin(), dEnd = d->items.end();
QVector< PageViewItem * >::const_iterator dIt = d->items.constBegin(), dEnd = d->items.constEnd();
for ( ; dIt != dEnd; ++dIt )
{
bool hadfocus = (*dIt)->setFormWidgetsVisible( on );
@ -2798,7 +2798,7 @@ void PageView::slotRelayoutPages()
}
// common iterator used in this method and viewport parameters
QVector< PageViewItem * >::const_iterator iIt, iEnd = d->items.end();
QVector< PageViewItem * >::const_iterator iIt, iEnd = d->items.constEnd();
int viewportWidth = viewport()->width(),
viewportHeight = viewport()->height(),
fullWidth = 0,
@ -2844,7 +2844,7 @@ void PageView::slotRelayoutPages()
// 1) find the maximum columns width and rows height for a grid in
// which each page must well-fit inside a cell
for ( iIt = d->items.begin(); iIt != iEnd; ++iIt )
for ( iIt = d->items.constBegin(); iIt != iEnd; ++iIt )
{
PageViewItem * item = *iIt;
// update internal page size (leaving a little margin in case of Fit* modes)
@ -2896,7 +2896,7 @@ void PageView::slotRelayoutPages()
for ( int i = 0; i < cIdx; ++i )
insertX += colWidth[ i ];
}
for ( iIt = d->items.begin(); iIt != iEnd; ++iIt )
for ( iIt = d->items.constBegin(); iIt != iEnd; ++iIt )
{
PageViewItem * item = *iIt;
int cWidth = colWidth[ cIdx ],
@ -3003,7 +3003,7 @@ void PageView::slotRequestVisiblePixmaps( int newValue )
d->visibleItems.clear();
QLinkedList< Okular::PixmapRequest * > requestedPixmaps;
QVector< Okular::VisiblePageRect * > visibleRects;
QVector< PageViewItem * >::const_iterator iIt = d->items.begin(), iEnd = d->items.end();
QVector< PageViewItem * >::const_iterator iIt = d->items.constBegin(), iEnd = d->items.constEnd();
for ( ; iIt != iEnd; ++iIt )
{
PageViewItem * i = *iIt;
@ -3392,7 +3392,7 @@ void PageView::slotRefreshPage()
void PageView::slotSpeakDocument()
{
QString text;
QVector< PageViewItem * >::const_iterator it = d->items.begin(), itEnd = d->items.end();
QVector< PageViewItem * >::const_iterator it = d->items.constBegin(), itEnd = d->items.constEnd();
for ( ; it < itEnd; ++it )
{
Okular::RegularAreaRect * area = textSelectionForItem( *it );

View file

@ -1309,7 +1309,7 @@ void PresentationWidget::setScreen( int newScreen )
m_height = height();
// update the frames
QVector< PresentationFrame * >::const_iterator fIt = m_frames.begin(), fEnd = m_frames.end();
QVector< PresentationFrame * >::const_iterator fIt = m_frames.constBegin(), fEnd = m_frames.constEnd();
const float screenRatio = (float)m_height / (float)m_width;
for ( ; fIt != fEnd; ++fIt )
{

View file

@ -141,7 +141,7 @@ ThumbnailListPrivate::~ThumbnailListPrivate()
ThumbnailWidget* ThumbnailListPrivate::itemFor( const QPoint & p ) const
{
QVector< ThumbnailWidget * >::const_iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
QVector< ThumbnailWidget * >::const_iterator tIt = m_thumbnails.constBegin(), tEnd = m_thumbnails.constEnd();
for ( ; tIt != tEnd; ++tIt )
{
if ( (*tIt)->rect().contains( p ) )
@ -153,7 +153,7 @@ ThumbnailWidget* ThumbnailListPrivate::itemFor( const QPoint & p ) const
void ThumbnailListPrivate::paintEvent( QPaintEvent * e )
{
QPainter painter( this );
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.constBegin(), tEnd = m_thumbnails.constEnd();
for ( ; tIt != tEnd; ++tIt )
{
QRect rect = e->rect().intersected( (*tIt)->rect() );
@ -219,7 +219,7 @@ void ThumbnailList::notifySetup( const QVector< Okular::Page * > & pages, int se
}
// delete all the Thumbnails
QVector<ThumbnailWidget *>::const_iterator tIt = d->m_thumbnails.begin(), tEnd = d->m_thumbnails.end();
QVector<ThumbnailWidget *>::const_iterator tIt = d->m_thumbnails.constBegin(), tEnd = d->m_thumbnails.constEnd();
for ( ; tIt != tEnd; ++tIt )
delete *tIt;
d->m_thumbnails.clear();
@ -237,7 +237,7 @@ void ThumbnailList::notifySetup( const QVector< Okular::Page * > & pages, int se
//RESTORE THIS int flags = Okular::Settings::filterBookmarks() ? Okular::Page::Bookmark : Okular::Page::Highlight;
// if no page matches filter rule, then display all pages
QVector< Okular::Page * >::const_iterator pIt = pages.begin(), pEnd = pages.end();
QVector< Okular::Page * >::const_iterator pIt = pages.constBegin(), pEnd = pages.constEnd();
bool skipCheck = true;
for ( ; pIt != pEnd ; ++pIt )
//if ( (*pIt)->attributes() & flags )
@ -247,7 +247,7 @@ void ThumbnailList::notifySetup( const QVector< Okular::Page * > & pages, int se
// generate Thumbnails for the given set of pages
int width = viewport()->width();
int height = 0;
for ( pIt = pages.begin(); pIt != pEnd ; ++pIt )
for ( pIt = pages.constBegin(); pIt != pEnd ; ++pIt )
//if ( skipCheck || (*pIt)->attributes() & flags )
if ( skipCheck || (*pIt)->hasHighlights( SW_SEARCH_ID ) )
{
@ -291,7 +291,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ )
// select the page with viewport and ensure it's centered in the view
d->m_vectorIndex = 0;
QVector<ThumbnailWidget *>::const_iterator tIt = d->m_thumbnails.begin(), tEnd = d->m_thumbnails.end();
QVector<ThumbnailWidget *>::const_iterator tIt = d->m_thumbnails.constBegin(), tEnd = d->m_thumbnails.constEnd();
for ( ; tIt != tEnd; ++tIt )
{
if ( (*tIt)->pageNumber() == newPage )
@ -317,7 +317,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int changedFlags )
return;
// iterate over visible items: if page(pageNumber) is one of them, repaint it
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.begin(), vEnd = d->m_visibleThumbnails.end();
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.constBegin(), vEnd = d->m_visibleThumbnails.constEnd();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
{
@ -361,7 +361,7 @@ void ThumbnailList::notifyVisibleRectsChanged()
bool ThumbnailList::canUnloadPixmap( int pageNumber ) const
{
// if the thubnail 'pageNumber' is one of the visible ones, forbid unloading
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.begin(), vEnd = d->m_visibleThumbnails.end();
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.constBegin(), vEnd = d->m_visibleThumbnails.constEnd();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
return false;
@ -375,7 +375,7 @@ void ThumbnailList::updateWidgets()
{
// find all widgets that intersects the viewport and update them
QRect viewportRect = viewport()->rect().translated( viewport()->pos() );
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.begin(), vEnd = d->m_visibleThumbnails.end();
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.constBegin(), vEnd = d->m_visibleThumbnails.constEnd();
for ( ; vIt != vEnd; ++vIt )
{
ThumbnailWidget * t = *vIt;
@ -394,8 +394,8 @@ void ThumbnailListPrivate::forwardTrack( const Okular::Page * p, const QPoint &p
QVector< Okular::VisiblePageRect * > vVpr = m_document->visiblePageRects();
QVector< Okular::VisiblePageRect * >::const_iterator vIt = vVpr.begin();
QVector< Okular::VisiblePageRect * >::const_iterator vEnd = vVpr.end();
QVector< Okular::VisiblePageRect * >::const_iterator vIt = vVpr.constBegin();
QVector< Okular::VisiblePageRect * >::const_iterator vEnd = vVpr.constEnd();
for ( ; vIt != vEnd; ++vIt )
{
Okular::VisiblePageRect *vpr = ( *vIt );
@ -507,7 +507,7 @@ void ThumbnailListPrivate::viewportResizeEvent( QResizeEvent * e )
// resize and reposition items
int newWidth = q->viewport()->width();
int newHeight = 0;
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.constBegin(), tEnd = m_thumbnails.constEnd();
for ( ; tIt != tEnd; ++tIt )
{
ThumbnailWidget *t = *tIt;
@ -563,7 +563,7 @@ void ThumbnailListPrivate::slotRequestVisiblePixmaps( int /*newContentsY*/ )
// scroll from the top to the last visible thumbnail
m_visibleThumbnails.clear();
QLinkedList< Okular::PixmapRequest * > requestedPixmaps;
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
QVector<ThumbnailWidget *>::const_iterator tIt = m_thumbnails.constBegin(), tEnd = m_thumbnails.constEnd();
QRect viewportRect = q->viewport()->rect().translated( q->horizontalScrollBar()->value(), q->verticalScrollBar()->value() );
for ( ; tIt != tEnd; ++tIt )
{