diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-08 16:09:48 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-08 16:09:48 (GMT) |
commit | baf60d049cc11a54f156b69960706d7304fc4640 (patch) | |
tree | 617f63b98d841fea6126c30a026fcfb3d8ee4b02 /src/plugins/bearer/corewlan/qcorewlanengine.mm | |
parent | 2ae808a23ce05bf9768ad9df107c16bb0c555ee7 (diff) | |
parent | dcb9b85376718d768f538e19ae231f5e061b7b31 (diff) | |
download | Qt-baf60d049cc11a54f156b69960706d7304fc4640.zip Qt-baf60d049cc11a54f156b69960706d7304fc4640.tar.gz Qt-baf60d049cc11a54f156b69960706d7304fc4640.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (29 commits)
I10n: Update German translations for 4.7.0
Fix a freetype link failure.
Fix configure test for DirectFB
Split Symbian bearer plugin into three platform specfic plugins
Doc: Fixed whitespace in the other configuration file for zh_CN.
Doc: Fixed whitespace in the Simplified Chinese doc configuration.
Unbreak Linux build when qendian.h is included before qglobal.h
Revert accidental commit of irrelevant stuff. Silly mondays..
Unbreak Linux build when qendian.h is included before qglobal.h
Fix QApplication/QWidget to really take ownership of input contexts
Added setting a hotspot on standard gestures
Fixed GestureOverride event delivery in GraphicsView.
add check-ts target to auto-asses translation completeness
qt_ja_JP.ts => qt_ja.ts
Fix incorrect \since tag
XQuery test suite (and others): remove p4 dependency
add docu about pixmaps being invalidated on qapp destruction
remove somewhat misleading warning about x11 pixmap leak
Disabled item view items use incorrect background color
Update the mkspec for linux-icc: don't use jump tables in shlibs
...
Diffstat (limited to 'src/plugins/bearer/corewlan/qcorewlanengine.mm')
-rw-r--r-- | src/plugins/bearer/corewlan/qcorewlanengine.mm | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index a9cb65b..6ba9504 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -70,9 +70,10 @@ #include <net/if.h> #include <ifaddrs.h> -@interface QNSListener : NSObject + +@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject { - NSNotificationCenter *center; + NSNotificationCenter *notificationCenter; CWInterface *currentInterface; QCoreWlanEngine *engine; NSLock *locker; @@ -86,16 +87,16 @@ @end -@implementation QNSListener +@implementation QT_MANGLE_NAMESPACE(QNSListener) @synthesize engine; - (id) init { [locker lock]; QMacCocoaAutoReleasePool pool; - center = [NSNotificationCenter defaultCenter]; + notificationCenter = [NSNotificationCenter defaultCenter]; currentInterface = [CWInterface interfaceWithName:nil]; - [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil]; + [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil]; [locker unlock]; return self; } @@ -116,7 +117,7 @@ -(void)remove { [locker lock]; - [center removeObserver:self]; + [notificationCenter removeObserver:self]; [locker unlock]; } @@ -126,7 +127,7 @@ } @end -QNSListener *listener = 0; +QT_MANGLE_NAMESPACE(QNSListener) *listener = 0; QT_BEGIN_NAMESPACE @@ -296,6 +297,9 @@ void QScanThread::getUserConfigurations() for(uint row=0; row < [wifiInterfaces count]; row++ ) { CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]]; + if ( ![wifiInterface power] ) + continue; + NSString *nsInterfaceName = [wifiInterface name]; // add user configured system networks SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil); @@ -430,7 +434,7 @@ void QCoreWlanEngine::initialize() QMacCocoaAutoReleasePool pool; if([[CWInterface supportedInterfaces] count] > 0 && !listener) { - listener = [[QNSListener alloc] init]; + listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init]; listener.engine = this; hasWifi = true; } else { @@ -785,6 +789,11 @@ void QCoreWlanEngine::networksChanged() changed = true; } + if (ptr->bearer != cpPriv->bearer) { + ptr->bearer = cpPriv->bearer; + changed = true; + } + if (ptr->state != cpPriv->state) { ptr->state = cpPriv->state; changed = true; |