[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdesdk/kbabel/catalogmanager
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2005-12-02 20:46:21
Message-ID: 1133556381.235886.7026.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 485087 by goutte:
Use const_iterator correctly with constBegin and constEnd
(It is a follow-up of revision 445282, which was not ported forward.)
M +16 -16 catalogmanagerview.cpp
--- branches/KDE/3.5/kdesdk/kbabel/catalogmanager/catalogmanagerview.cpp \
#485086:485087 @@ -489,18 +489,18 @@
// test validity of list items
QStringList testedList;
QStringList::const_iterator it;
- for( it=newMarkerList.begin() ; it!=newMarkerList.end() ; ++it )
+ for( it=newMarkerList.constBegin() ; it!=newMarkerList.constEnd() ; ++it )
if( _fileList[(*it)] != 0 ) testedList.append( (*it) );
// apply new list
- for( it=_markerList.begin() ; it!=_markerList.end() ; ++it )
+ for( it=_markerList.constBegin() ; it!=_markerList.constEnd() ; ++it )
{
CatManListItem* item = _fileList[(*it)];
if( item ) item->setMarked(false);
}
_markerList = testedList;
- for( it=_markerList.begin() ; it!=_markerList.end() ; ++it )
+ for( it=_markerList.constBegin() ; it!=_markerList.constEnd() ; ++it )
{
CatManListItem* item = _fileList[(*it)];
if( item ) item->setMarked(true);
@@ -667,7 +667,7 @@
QStringList markedDoList;
QStringList::const_iterator it;
- for( it = doList.begin(); it != doList.end(); ++it )
+ for( it = doList.constBegin(); it != doList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
if( item->marked() ) markedDoList.append(item->package());
@@ -690,7 +690,7 @@
int totalUntranslated=0;
QStringList::const_iterator it;
- for( it = childrenList.begin(); it != childrenList.end(); ++it )
+ for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -909,7 +909,7 @@
{
QStringList s = current->allChildrenList(true);
QStringList::const_iterator it;
- for( it = s.begin() ; it != s.end(); ++it )
+ for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
if( item ) result.append( item );
@@ -932,7 +932,7 @@
QPtrList<CatManListItem> result;
QStringList::const_iterator it;
- for( it = _markerList.begin() ; it != _markerList.end(); ++it )
+ for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
result.append( item );
@@ -951,7 +951,7 @@
QStringList childrenList = item->allChildrenList(true);
QStringList::const_iterator it;
- for (it = childrenList.begin(); it != childrenList.end(); ++it) {
+ for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToSend << i->poFile();
@@ -972,7 +972,7 @@
QStringList filesToSend;
QStringList::const_iterator it;
- for (it = _markerList.begin(); it != _markerList.end(); ++it) {
+ for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToSend << i->poFile();
@@ -989,7 +989,7 @@
QStringList childrenList = item->allChildrenList(true);
QStringList::const_iterator it;
- for (it = childrenList.begin(); it != childrenList.end(); ++it) {
+ for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToPackage << i->poFile();
@@ -1013,7 +1013,7 @@
QStringList filesToPackage;
QStringList::const_iterator it;
- for (it = _markerList.begin(); it != _markerList.end(); ++it) {
+ for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToPackage << i->poFile();
@@ -1086,7 +1086,7 @@
if ( _markerList.count( ) == 0 ) return;
QStringList fileList;
QStringList::const_iterator it;
- for ( it = _markerList.begin( ); it != _markerList.end( ); ++it ) {
+ for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) {
CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
fileList << i->potFile( );
@@ -1197,7 +1197,7 @@
if ( _markerList.count( ) == 0 ) return;
QStringList fileList;
QStringList::const_iterator it;
- for ( it = _markerList.begin( ); it != _markerList.end( ); ++it ) {
+ for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) \
{ CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
fileList << i->potFile( );
@@ -1251,7 +1251,7 @@
emit prepareFindProgressBar(childrenList.size());
QStringList::const_iterator it;
- for( it = childrenList.begin(); it != childrenList.end(); ++it )
+ for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1350,8 +1350,8 @@
bool CatalogManagerView::hasMatchingWords( QStringList &itemWords, QStringList \
&searchWords) {
- for( QStringList::const_iterator it1 = searchWords.begin() ; it1 != \
searchWords.end() ; ++it1 )
- for( QStringList::const_iterator it2 = itemWords.begin() ; it2 != itemWords.end() ; \
++it2 ) + for( QStringList::const_iterator it1 = searchWords.constBegin() ; it1 != \
searchWords.constEnd() ; ++it1 ) + for( QStringList::const_iterator it2 = \
itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 ) if( *it1 == *it2
|| (*it1).contains(*it2)
|| (*it2).contains(*it1) ) return true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic