aboutsummaryrefslogtreecommitdiffstats
path: root/x11/kde4-workspace
diff options
context:
space:
mode:
authoravilla <avilla@FreeBSD.org>2012-02-05 01:43:23 +0800
committeravilla <avilla@FreeBSD.org>2012-02-05 01:43:23 +0800
commit0693e33638718bbd72c0b07672cbc24892146ff7 (patch)
tree19a372c9213ca4a3fe5b5e4145390d93d25ff0ec /x11/kde4-workspace
parent2f325edbcc181b9951116d1954a74c1d01427ba0 (diff)
downloadfreebsd-ports-gnome-0693e33638718bbd72c0b07672cbc24892146ff7.tar.gz
freebsd-ports-gnome-0693e33638718bbd72c0b07672cbc24892146ff7.tar.zst
freebsd-ports-gnome-0693e33638718bbd72c0b07672cbc24892146ff7.zip
- Fix build with Clang.
PR: 164549 Submitted by: rakuco Obtained from: KDE
Diffstat (limited to 'x11/kde4-workspace')
-rw-r--r--x11/kde4-workspace/files/patch-libs__ksysguard__processui__ProcessModel.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/x11/kde4-workspace/files/patch-libs__ksysguard__processui__ProcessModel.cpp b/x11/kde4-workspace/files/patch-libs__ksysguard__processui__ProcessModel.cpp
new file mode 100644
index 000000000000..70a517f84d51
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-libs__ksysguard__processui__ProcessModel.cpp
@@ -0,0 +1,40 @@
+commit 4c72106b5db6771e6a6b45580808a4c015682096
+Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
+Date: Sun Jan 1 23:08:15 2012 -0200
+
+ Do not shadow the counter variable in queryForAndUpdateAllXWindows.
+
+ `i' was being used as both the uint counter variable and as a QMap
+ iterator, which caused a warning with gcc and -Wshadow and made the
+ build fail with clang.
+
+ CCMAIL: johnflux@gmail.com
+
+diff --git a/libs/ksysguard/processui/ProcessModel.cpp b/libs/ksysguard/processui/ProcessModel.cpp
+index 83bfb4b..a9d2d28 100644
+--- ./libs/ksysguard/processui/ProcessModel.cpp
++++ ./libs/ksysguard/processui/ProcessModel.cpp
+@@ -421,11 +421,11 @@ void ProcessModelPrivate::queryForAndUpdateAllXWindows() {
+ return;
+ for (uint i=0; i < count; ++i) {
+ WId wid = children[i];
+- QMap<qlonglong, XID>::iterator i = mXResClientResources.lowerBound(-(qlonglong)(wid));
+- if(i == mXResClientResources.end())
++ QMap<qlonglong, XID>::iterator iter = mXResClientResources.lowerBound(-(qlonglong)(wid));
++ if(iter == mXResClientResources.end())
+ continue; //We couldn't find it this time :-/
+
+- if(-i.key() != (qlonglong)(wid & ~i.value()))
++ if(-iter.key() != (qlonglong)(wid & ~iter.value()))
+ continue; //Already added this window
+
+ //Get the PID for this window if we do not know it
+@@ -438,7 +438,7 @@ void ProcessModelPrivate::queryForAndUpdateAllXWindows() {
+ if(!pid)
+ continue;
+ //We found a window with this client
+- mXResClientResources.erase(i);
++ mXResClientResources.erase(iter);
+ KSysGuard::Process *process = mProcesses->getProcess(pid);
+ if(!process) return; //shouldn't really happen.. maybe race condition etc
+ unsigned long previousPixmapBytes = process->pixmapBytes;