summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-11-25 13:41:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 10:58:32 +0100
commit08f3177fdfc9aefbd4232dcd1529b537b2ca9402 (patch)
treeae0d00959a8cd360356a6dfa40ab6bb5bb5acace
parent939a001c3ac33ebf801d2594ac9073da28d09a46 (diff)
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 <liang.qi@digia.com>
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm5
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine_10_6.mm5
2 files changed, 6 insertions, 4 deletions
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