diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-04-15 14:23:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-18 15:33:38 +0200 |
commit | 8ddcc18ac100c010ac8bdfe809656f2e8f39e30e (patch) | |
tree | 20444fa3a3533340563bdea80d9be30309b88b2b | |
parent | b381581579e2e49f5f8211bf4260a141e0642cd2 (diff) |
Remove nativeResourceForWindow warning.
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 <jan-arve.saether@digia.com>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 4 |
1 files changed, 1 insertions, 3 deletions
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<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext(); |