From e9ef332ec409209626716da43ab8bb14651723b4 Mon Sep 17 00:00:00 2001 From: Andrew Okin Date: Thu, 21 Feb 2013 12:10:10 -0600 Subject: Fixed some issues with GCC. --- libutil/include/siglist.h | 2 ++ libutil/include/siglist_impl.h | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'libutil') diff --git a/libutil/include/siglist.h b/libutil/include/siglist.h index b6432b6e..347cf752 100644 --- a/libutil/include/siglist.h +++ b/libutil/include/siglist.h @@ -26,6 +26,8 @@ template class SigList : public QList { +private: + typedef typename QList::iterator iterator; public: explicit SigList() : QList() {} diff --git a/libutil/include/siglist_impl.h b/libutil/include/siglist_impl.h index 16ddd9b0..cb37ea4b 100644 --- a/libutil/include/siglist_impl.h +++ b/libutil/include/siglist_impl.h @@ -19,7 +19,7 @@ template void SigList::append(const T &value) { QList::append(value); - onItemAdded(value, length() - 1); + onItemAdded(value, QList::length() - 1); } template @@ -32,7 +32,7 @@ void SigList::prepend(const T &value) template void SigList::append(const QList &other) { - int index = length(); + int index = QList::length(); QList::append(other); onItemsAdded(other, index); } @@ -45,7 +45,7 @@ void SigList::clear() } template -void SigList::erase(QList::iterator pos) +void SigList::erase(SigList::iterator pos) { T value = *pos; int index = indexOf(*pos); @@ -54,12 +54,12 @@ void SigList::erase(QList::iterator pos) } template -void SigList::erase(QList::iterator first, QList::iterator last) +void SigList::erase(SigList::iterator first, SigList::iterator last) { QList removedValues; int firstIndex = indexOf(*first); - for (QList::iterator iter = first; iter < last; iter++) + for (SigList::iterator iter = first; iter < last; iter++) { removedValues << *iter; QList::erase(iter); @@ -76,7 +76,7 @@ void SigList::insert(int i, const T &t) } template -void SigList::insert(QList::iterator before, const T &t) +void SigList::insert(SigList::iterator before, const T &t) { QList::insert(before, t); onItemAdded(t, indexOf(t)); @@ -85,7 +85,7 @@ void SigList::insert(QList::iterator before, const T &t) template void SigList::move(int from, int to) { - const T &item = at(from); + const T &item = QList::at(from); QList::move(from, to); onItemMoved(item, from, to); } @@ -120,8 +120,8 @@ void SigList::swap(QList &other) template void SigList::swap(int i, int j) { - const T &item1 = at(i); - const T &item2 = at(j); + const T &item1 = QList::at(i); + const T &item2 = QList::at(j); QList::swap(i, j); onItemMoved(item1, i, j); onItemMoved(item2, j, i); @@ -144,7 +144,7 @@ T SigList::takeFirst() template T SigList::takeLast() { - return takeAt(length() - 1); + return takeAt(QList::length() - 1); } template -- cgit v1.2.3