summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-07 06:06:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-07 06:06:24 (GMT)
commit01aaa410288bf80994a52a2047e613d64606cf39 (patch)
treef29ff66625079ee27a86a3895cd9e23269a958f4 /src/plugins
parentf68bab66aacded35be3d222e703e74e9db0bada3 (diff)
parentfad226e8a6354d89fad3dbee5ab6dd07e80534bc (diff)
downloadQt-01aaa410288bf80994a52a2047e613d64606cf39.zip
Qt-01aaa410288bf80994a52a2047e613d64606cf39.tar.gz
Qt-01aaa410288bf80994a52a2047e613d64606cf39.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: make corewlan more namespace friendly Add convenience constructor to QTextOption::Tab Make qbswap() use glibc's fast bswap_*() functions if available. Fix in Addressbook tutorial Avoid timer starvation during high posted event activity fix for using .lnk files when running app from UNC
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm25
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;