From c311b39bd39ef7f2be6850efbbcb5b9c305d5b40 Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Tue, 30 Mar 2004 13:52:27 +0000 Subject: [PATCH] Don't have more than one reference to the same dummy variable in one borders() call. So innocent decoration developers can be sure that a value of one reference won't change a few lines later just because it has been overwritten by another reverence to the same value... svn path=/trunk/kdebase/kwin/; revision=299848 --- kcmkwin/kwindecoration/preview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index a0e2f010f7..ea24b8de29 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -106,7 +106,8 @@ void KDecorationPreview::resizeEvent( QResizeEvent* e ) void KDecorationPreview::positionPreviews() { - int titleBarHeight, leftBorder, rightBorder, xoffset, dummy; + int titleBarHeight, leftBorder, rightBorder, xoffset, + dummy1, dummy2, dummy3; QRect geometry; QSize size; @@ -115,8 +116,9 @@ void KDecorationPreview::positionPreviews() if ( !deco[Active] || !deco[Inactive] ) return; - deco[Active]->borders( dummy, dummy, titleBarHeight, dummy ); - deco[Inactive]->borders( leftBorder, rightBorder, dummy, dummy ); + // don't have more than one reference to the same dummy variable in one borders() call. + deco[Active]->borders( dummy1, dummy2, titleBarHeight, dummy3 ); + deco[Inactive]->borders( leftBorder, rightBorder, dummy1, dummy2 ); titleBarHeight = kMin( int( titleBarHeight * .9 ), 30 ); xoffset = kMin( kMax( 10, QApplication::reverseLayout()