summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-03-20 13:30:10 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-26 14:02:07 +0200
commitf6b25fa213c9e44df29613ca32e8c1fa536637fb (patch)
tree2def1e6a4315ccd5b09c361b34a47d9eebbf1295 /src/plugins/platforms/cocoa
parenta9c49816a7008cf6e181fe66d7644a64c10faf17 (diff)
Cocoa: silence warnings from QCocoaBackingStore
Remove unused (and misspelled) flipedRect() function, as well as several unused variables. Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index 3a55e00c48..f0ff7ba0d6 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -47,23 +47,10 @@
QT_BEGIN_NAMESPACE
-QRect flipedRect(const QRect &sourceRect,int height)
-{
- if (!sourceRect.isValid())
- return QRect();
- QRect flippedRect = sourceRect;
- flippedRect.moveTop(height - sourceRect.y());
- return flippedRect;
-}
-
QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
: QPlatformBackingStore(window)
{
m_cocoaWindow = static_cast<QCocoaWindow *>(window->handle());
-
- const QRect geo = window->geometry();
- NSRect rect = NSMakeRect(geo.x(),geo.y(),geo.width(),geo.height());
-
m_image = new QImage(window->geometry().size(),QImage::Format_ARGB32_Premultiplied);
}
@@ -84,7 +71,6 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion &region, const QPo
QCocoaAutoReleasePool pool;
QRect geo = region.boundingRect();
-
NSRect rect = NSMakeRect(geo.x(), geo.y(), geo.width(), geo.height());
[m_cocoaWindow->m_contentView displayRect:rect];
}
@@ -92,8 +78,7 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion &region, const QPo
void QCocoaBackingStore::resize(const QSize &size, const QRegion &)
{
delete m_image;
- m_image = new QImage(size,QImage::Format_ARGB32_Premultiplied);
- NSSize newSize = NSMakeSize(size.width(),size.height());
+ m_image = new QImage(size, QImage::Format_ARGB32_Premultiplied);
[static_cast<QNSView *>(m_cocoaWindow->m_contentView) setImage:m_image];
}