From 8ddcc18ac100c010ac8bdfe809656f2e8f39e30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 15 Apr 2013 14:23:52 +0200 Subject: Remove nativeResourceForWindow warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning is useful for pointing out the the return value will be null. However, code that correctly checks the return value (such as qt_macWindowIsTextured), still causes the warning to be printed. Change-Id: I3828992b3d5e7b08451cf0e051b937fa9d9536d3 Reviewed-by: Jan Arve Sæther --- src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 5368b2f938..84261ad273 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -85,10 +85,8 @@ void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resource void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) { - if (!window->handle()) { - qWarning("QCocoaNativeInterface::nativeResourceForWindow: Native window has not been created."); + if (!window->handle()) return 0; - } if (resourceString == "nsopenglcontext") { return static_cast(window->handle())->currentContext()->nsOpenGLContext(); -- cgit v1.2.3