Commit 6b53a373 authored by Stephan Kulow's avatar Stephan Kulow
Browse files

removed uses of deprecated qlist functions

svn path=/trunk/KDE/kdebase/konqueror/; revision=535410
parent 861119ec
......@@ -965,9 +965,9 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries )
KFileItem* fileItem = item->item();
if ( !m_itemsToSelect.isEmpty() ) {
QStringList::Iterator tsit = m_itemsToSelect.find( fileItem->name() );
if ( tsit != m_itemsToSelect.end() ) {
m_itemsToSelect.erase( tsit );
int tsit = m_itemsToSelect.indexOf( fileItem->name() );
if ( tsit >= 0 ) {
m_itemsToSelect.removeAt( tsit );
m_pIconView->setSelected( item, true, true );
if ( m_bNeedSetCurrentItem ){
m_pIconView->setCurrentItem( item );
......
......@@ -170,7 +170,7 @@ ToggleViewGUIClient::ToggleViewGUIClient( KonqMainWindow *mainWindow )
if ( !prop.isValid() || !prop.toBool() ||
!orientation.isValid() || orientation.toString().isEmpty() )
{
offers.remove( it );
offers.erase( it );
it = offers.begin();
}
else
......
......@@ -205,9 +205,9 @@ void KonqInfoListViewWidget::slotNewItems( const KFileItemList& entries )
}
if ( !m_itemsToSelect.isEmpty() ) {
QStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() );
if ( tsit != m_itemsToSelect.end() ) {
m_itemsToSelect.erase( tsit );
int ind = m_itemsToSelect.indexOf( (*kit)->name() );
if ( ind >= 0 ) {
m_itemsToSelect.removeAt(ind);
setSelected( tmp, true );
}
}
......
......@@ -227,7 +227,7 @@ void KonqBaseListViewWidget::readProtocolConfig( const KUrl & url )
for ( int num = 1; extraFieldsIt != extraFields.end(); ++extraFieldsIt, ++num )
{
const QString column = (*extraFieldsIt).name;
if ( lstColumns.find(column) == lstColumns.end() )
if ( !lstColumns.contains(column) )
lstColumns << column;
const QVariant::Type type = static_cast<QVariant::Type>( (*extraFieldsIt).type ); // ## TODO use when sorting
confColumns[extraIndex++].setData( column, QString("Extra%1").arg(num), KIO::UDS_EXTRA, type, 0);
......@@ -317,8 +317,7 @@ void KonqBaseListViewWidget::readProtocolConfig( const KUrl & url )
continue;
}
QStringList::Iterator listIt = listingList.find( confColumns[i].desktopFileName );
if ( listIt == listingList.end() ) // not found -> hide
if ( !listingList.contains( confColumns[i].desktopFileName ) ) // not found -> hide
{
//move all columns behind one to the front
for ( unsigned int l = 0; l < NumberOfAtoms; l++ )
......@@ -1149,9 +1148,9 @@ void KonqBaseListViewWidget::slotNewItems( const KFileItemList & entries )
m_itemFound = true;
}
if ( !m_itemsToSelect.isEmpty() ) {
QStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() );
if ( tsit != m_itemsToSelect.end() ) {
m_itemsToSelect.erase( tsit );
int tsit = m_itemsToSelect.indexOf( (*kit)->name() );
if ( tsit >= 0 ) {
m_itemsToSelect.removeAt( tsit );
setSelected( tmp, true );
}
}
......
......@@ -90,9 +90,9 @@ void KonqTextViewWidget::slotNewItems( const KFileItemList & entries )
m_itemFound = true;
}
if ( !m_itemsToSelect.isEmpty() ) {
QStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() );
if ( tsit != m_itemsToSelect.end() ) {
m_itemsToSelect.remove( tsit );
int ind = m_itemsToSelect.indexOf( (*kit)->name() );
if ( ind >= 0 ) {
m_itemsToSelect.removeAt( ind );
setSelected( tmp, true );
}
}
......
......@@ -245,9 +245,9 @@ void KonqTreeViewWidget::slotNewItems( const KFileItemList &entries )
}
if ( !m_itemsToSelect.isEmpty() ) {
QStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() );
if ( tsit != m_itemsToSelect.end() ) {
m_itemsToSelect.erase( tsit );
int tsit = m_itemsToSelect.indexOf( (*kit)->name() );
if ( tsit >= 0 ) {
m_itemsToSelect.removeAt( tsit );
setSelected( fileItem ? fileItem : dirItem, true );
}
}
......
......@@ -444,7 +444,7 @@ SearchProviderItem *FilterOptions::displaySearchProvider(SearchProvider *p, bool
item = new SearchProviderItem(m_dlg->lvSearchProviders, p);
if (m_favoriteEngines.find(p->desktopEntryName())!=m_favoriteEngines.end())
if (m_favoriteEngines.contains(p->desktopEntryName()))
item->setOn(true);
for (itemCount = 1; itemCount < totalCount; itemCount++)
......
......@@ -97,13 +97,13 @@ void FakeUASProvider::parseDescription()
QStringList languageList = KGlobal::locale()->languageList();
if ( languageList.count() )
{
QStringList::Iterator it = languageList.find( QLatin1String("C") );
if( it != languageList.end() )
int ind = languageList.indexOf( QLatin1String("C") );
if( ind >= 0 )
{
if( languageList.contains( QLatin1String("en") ) > 0 )
languageList.erase( it );
if( languageList.contains( QLatin1String("en") ) )
languageList.removeAt( ind );
else
(*it) = QLatin1String("en");
languageList.value(ind) = QLatin1String("en");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment