diff options
Diffstat (limited to 'graphics/djview4/qt4.8.patch')
-rw-r--r-- | graphics/djview4/qt4.8.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/graphics/djview4/qt4.8.patch b/graphics/djview4/qt4.8.patch new file mode 100644 index 0000000000..118238cee4 --- /dev/null +++ b/graphics/djview4/qt4.8.patch @@ -0,0 +1,58 @@ +From 7d4802964b9e74506c63f43505b632f6e7b5db3c Mon Sep 17 00:00:00 2001 +From: Leon Bottou <leon@bottou.org> +Date: Mon, 2 Apr 2012 07:11:36 -0700 +Subject: [PATCH 1/1] removed swap (use qSwap instead). + +Fixes Gentoo bug 401517, compilation problems with qt-4.8. +Unclear why is namespace std in scope at this point when using qt-4.8... +--- + src/qdjvuwidget.cpp | 17 ++++------------- + 1 files changed, 4 insertions(+), 13 deletions(-) + +diff --git a/src/qdjvuwidget.cpp b/src/qdjvuwidget.cpp +index 52ac366..8136d07 100644 +--- a/src/qdjvuwidget.cpp ++++ b/src/qdjvuwidget.cpp +@@ -152,15 +152,6 @@ all_numbers(const char *s) + return true; + } + +-template<class T> static inline void +-swap(T& x, T& y) +-{ +- T tmp; +- tmp = x; +- x = y; +- y = tmp; +-} +- + template<class T> static inline int + ksmallest(T *v, int n, int k) + { +@@ -173,11 +164,11 @@ ksmallest(T *v, int n, int k) + /* Sort v[lo], v[m], v[hi] by insertion */ + m = (lo+hi)/2; + if (v[lo]>v[m]) +- swap(v[lo],v[m]); ++ qSwap(v[lo],v[m]); + if (v[m]>v[hi]) { +- swap(v[m],v[hi]); ++ qSwap(v[m],v[hi]); + if (v[lo]>v[m]) +- swap(v[lo],v[m]); ++ qSwap(v[lo],v[m]); + } + /* Extract pivot, place sentinel */ + pivot = v[m]; +@@ -191,7 +182,7 @@ ksmallest(T *v, int n, int k) + do ++l; while (v[l]<pivot); + do --h; while (v[h]>pivot); + if (l < h) { +- swap(v[l],v[h]); ++ qSwap(v[l],v[h]); + goto loop; + } + /* Finish up */ +-- +1.7.4.1 + |