From 211ce2c92d993186227d98da1ca973190c5cc42f Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Wed, 16 Jan 2013 21:07:05 -0500 Subject: [PATCH] More sort fixes --- sdk/openbr_plugin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/openbr_plugin.cpp b/sdk/openbr_plugin.cpp index 8a344a8..4fb5aee 100644 --- a/sdk/openbr_plugin.cpp +++ b/sdk/openbr_plugin.cpp @@ -359,7 +359,7 @@ QStringList FileList::names() const return names; } -typedef std::pair MetadataPair; +typedef QPair MetadataPair; static bool comparator( const MetadataPair &l, const MetadataPair &r) { return l.first < r.first; @@ -367,12 +367,12 @@ static bool comparator( const MetadataPair &l, const MetadataPair &r) void FileList::sort(const QString& key) { - if (this->size() <= 1) return; + if (size() <= 1) return; QList metadata; - for (int i = 0; i < this->size(); i++) { - MetadataPair pair = std::make_pair(this->at(i).get(key).toString(), i); + for (int i = 0; i < size(); i++) { + MetadataPair pair = qMakePair(at(i).get(key).toString(), i); metadata.append(pair); } @@ -381,7 +381,7 @@ void FileList::sort(const QString& key) FileList newList; for (int i = 0; i < metadata.size(); i++) - newList.append(this->at(metadata[i].second)); + newList.append(at(metadata[i].second)); *this = newList; } -- libgit2 0.21.4