summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdesktopwidget_mac.mm
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-06 10:32:04 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-06 10:32:04 (GMT)
commite219feca14eb96a39d38694edfcc810ed94539ff (patch)
treef6e496887a8d1eb2124626f21cc8305df26fcbbb /src/gui/kernel/qdesktopwidget_mac.mm
parentd895d7cc8908ce5c6157c8261b9145d81b21501f (diff)
downloadQt-e219feca14eb96a39d38694edfcc810ed94539ff.zip
Qt-e219feca14eb96a39d38694edfcc810ed94539ff.tar.gz
Qt-e219feca14eb96a39d38694edfcc810ed94539ff.tar.bz2
Removed the unnecessery loop in the last commit originated from a merge
request. Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel/qdesktopwidget_mac.mm')
-rw-r--r--src/gui/kernel/qdesktopwidget_mac.mm11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/kernel/qdesktopwidget_mac.mm b/src/gui/kernel/qdesktopwidget_mac.mm
index 1020435..c2d05d7 100644
--- a/src/gui/kernel/qdesktopwidget_mac.mm
+++ b/src/gui/kernel/qdesktopwidget_mac.mm
@@ -137,15 +137,14 @@ void QDesktopWidgetImplementation::onResize()
availableRects.clear();
NSRect primaryRect = [[displays objectAtIndex:0] frame];
for (int i = 0; i<screenCount; i++) {
- const NSRect r = [[displays objectAtIndex:i] frame];
- const int flippedY = - r.origin.y + // account for position offset and
+ NSRect r = [[displays objectAtIndex:i] frame];
+ int flippedY = - r.origin.y + // account for position offset and
primaryRect.size.height - r.size.height; // height difference.
screenRects.append(QRectF(r.origin.x, flippedY,
r.size.width, r.size.height));
- }
- for (int i = 0; i<screenCount; i++) {
- const NSRect r = [[displays objectAtIndex:i] visibleFrame];
- const int flippedY = - r.origin.y + // account for position offset and
+
+ r = [[displays objectAtIndex:i] visibleFrame];
+ flippedY = - r.origin.y + // account for position offset and
primaryRect.size.height - r.size.height; // height difference.
availableRects.append(QRectF(r.origin.x, flippedY,
r.size.width, r.size.height));