Commit 211ce2c92d993186227d98da1ca973190c5cc42f

Authored by Scott Klum
1 parent d9128cb3

More sort fixes

Showing 1 changed file with 5 additions and 5 deletions
sdk/openbr_plugin.cpp
... ... @@ -359,7 +359,7 @@ QStringList FileList::names() const
359 359 return names;
360 360 }
361 361  
362   -typedef std::pair<QString,int> MetadataPair;
  362 +typedef QPair<QString,int> MetadataPair;
363 363 static bool comparator( const MetadataPair &l, const MetadataPair &r)
364 364 {
365 365 return l.first < r.first;
... ... @@ -367,12 +367,12 @@ static bool comparator( const MetadataPair &amp;l, const MetadataPair &amp;r)
367 367  
368 368 void FileList::sort(const QString& key)
369 369 {
370   - if (this->size() <= 1) return;
  370 + if (size() <= 1) return;
371 371  
372 372 QList<MetadataPair> metadata;
373 373  
374   - for (int i = 0; i < this->size(); i++) {
375   - MetadataPair pair = std::make_pair(this->at(i).get(key).toString(), i);
  374 + for (int i = 0; i < size(); i++) {
  375 + MetadataPair pair = qMakePair(at(i).get(key).toString(), i);
376 376 metadata.append(pair);
377 377 }
378 378  
... ... @@ -381,7 +381,7 @@ void FileList::sort(const QString&amp; key)
381 381 FileList newList;
382 382  
383 383 for (int i = 0; i < metadata.size(); i++)
384   - newList.append(this->at(metadata[i].second));
  384 + newList.append(at(metadata[i].second));
385 385  
386 386 *this = newList;
387 387 }
... ...