From 08f3177fdfc9aefbd4232dcd1529b537b2ca9402 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 25 Nov 2013 13:41:49 +0100 Subject: CoreWLan: Fix potential unhandled exception assert -[QNSListener notificationHandler:] was declared as not taking any parameter, but used as taking a single NSNotification. This would lead to an 'unrecognized selector' exception raised by Cocoa. Task-number: QTBUG-26844 Change-Id: I56d03a7738c2a1b9dcf3cdecc696b01e65d7b233 Reviewed-by: Liang Qi --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 5 +++-- src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index b0ed4076da..dc2920360d 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -71,7 +71,7 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time QCoreWlanEngine *engine; NSLock *locker; } -- (void)notificationHandler;//:(NSNotification *)notification; +- (void)notificationHandler:(NSNotification *)notification; - (void)remove; - (void)setEngine:(QCoreWlanEngine *)coreEngine; - (QCoreWlanEngine *)engine; @@ -120,8 +120,9 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time [locker unlock]; } -- (void)notificationHandler//:(NSNotification *)notification +- (void)notificationHandler:(NSNotification *)notification { + Q_UNUSED(notification); engine->requestUpdate(); } @end diff --git a/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm b/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm index 1b95ae29ad..7044e9696b 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm @@ -48,7 +48,7 @@ QCoreWlanEngine *engine; NSLock *locker; } -- (void)notificationHandler;//:(NSNotification *)notification; +- (void)notificationHandler:(NSNotification *)notification; - (void)remove; - (void)setEngine:(QCoreWlanEngine *)coreEngine; - (QCoreWlanEngine *)engine; @@ -97,8 +97,9 @@ [locker unlock]; } -- (void)notificationHandler//:(NSNotification *)notification +- (void)notificationHandler:(NSNotification *)notification { + Q_UNUSED(notification); engine->requestUpdate(); } @end -- cgit v1.2.3