~ubuntu-branches/ubuntu/quantal/kdepimlibs/quantal-proposed

« back to all changes in this revision

Viewing changes to akonadi/entityorderproxymodel.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-14 14:37:07 UTC
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: package-import@ubuntu.com-20111214143707-m0qplh3hsd957ukv
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
  if ( !d->m_orderConfig.hasKey( QString::number( col.id() ) ) )
87
87
    return QSortFilterProxyModel::lessThan( left, right );
88
88
 
89
 
  QStringList list = d->m_orderConfig.readEntry( QString::number( col.id() ), QStringList() );
 
89
  const QStringList list = d->m_orderConfig.readEntry( QString::number( col.id() ), QStringList() );
90
90
 
91
91
  if ( list.isEmpty() )
92
92
    return QSortFilterProxyModel::lessThan( left, right );
93
93
 
94
 
  QString leftValue = configString( left );
95
 
  QString rightValue = configString( right );
 
94
  const QString leftValue = configString( left );
 
95
  const QString rightValue = configString( right );
96
96
 
97
 
  int leftPosition = list.indexOf( leftValue );
98
 
  int rightPosition = list.indexOf( rightValue );
 
97
  const int leftPosition = list.indexOf( leftValue );
 
98
  const int rightPosition = list.indexOf( rightValue );
99
99
 
100
100
  if ( leftPosition < 0 || rightPosition < 0 )
101
101
    return QSortFilterProxyModel::lessThan( left, right );
176
176
      existingList.append( configString( idx ) );
177
177
    }
178
178
  }
179
 
 
180
 
  for ( int i = 0; i < droppedList.size(); ++i )
 
179
  const int numberOfDroppedElement( droppedList.size() );
 
180
  for ( int i = 0; i < numberOfDroppedElement; ++i )
181
181
  {
182
182
    const QString droppedItem = droppedList.at( i );
183
183
    const int existingIndex = existingList.indexOf( droppedItem );
282
282
{
283
283
  Q_D( EntityOrderProxyModel );
284
284
 
285
 
  QString parentKey = parentConfigString( index( 0, 0, parent ) );
 
285
  const QString parentKey = parentConfigString( index( 0, 0, parent ) );
286
286
 
287
287
  if ( parentKey.isEmpty() )
288
288
    return;