Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!
I use the follow code to get the APN config
[QUOTE]
QNetworkConfigurationManager manager;
QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations();
while (!allConfigurations.isEmpty())
{
QNetworkConfiguration config = allConfigurations.takeFirst();
if (config.type() == QNetworkConfiguration::ServiceNetwork)
{
foreach(QNetworkConfiguration i ,config.children() )
{
qDebug()<<"G" << i.identifier()<< "|"<< i.bearerName() <<"|";//<< i.name();
}
}
else
{
qDebug()<< config.identifier() <<"|"<<config.bearerName()<<"|"<<config.name();
}
}
[/QUOTE]
the N900 console print
[QUOTE]
IAP "èéGPRSè¿æ¥äºèç½" network type is not set! Skipping it
"0f31837c-c525-4c63-8bb2-5f28d7b8aa7a" | "WLAN" | "zhpublic"
"4c0b5ace-264d-4d1f-9cb5-5f822d17fb13" | "WLAN" | "ADU"
"8d73c291-7aeb-41e8-af59-acf4fd618460" | "WLAN" | "CMCC"
"0000-0000-0000-0000" | "HSPA" | "MMS"
[/QUOTE]
The first line mean? I use the China unicom 's SIM card, according to n900 system network config ,it should be IAP "china unicom (in chinese) GPRS connect(in chinese)" .
How to get this gprs 's identifer?
Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!
Did you resolve problems with proper code generation in Windows Nokia Qt SDK? Also you can rewrite your code like this:
[CODE]
QNetworkConfigurationManager manager;
QList<QNetworkConfiguration> configurations = manager.allConfigurations();
foreach(QNetworkConfiguration cfg, configurations) {
qDebug() << "+" << cfg.identifier() << cfg.bearerName() << cfg.name();
if (cfg.type() == QNetworkConfiguration::ServiceNetwork)
foreach(QNetworkConfiguration subcfg ,cfg.children())
qDebug() << "++" << subcfg.identifier() << subcfg.bearerName() << subcfg.name();
}
[/CODE]
Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!
I use your code snippet into my app , got the same result , console print below:
[QUOTE]
IAP "èéGPRSè¿æ¥äºèç½" network type is not set! Skipping it
+ "0f31837c-c525-4c63-8bb2-5f28d7b8aa7a" "WLAN" "zhpublic"
+ "4c0b5ace-264d-4d1f-9cb5-5f822d17fb13" "WLAN" "ADU"
[/QUOTE]
Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!
There was in principle nothing wrong with your code. Either you GPRS is not configured on the phone or you face the same problem Windows Nokia Qt SDK, which you were reporting earlier.
Re: Cannot get IAP 's QNetworkConfiguration by QNetworkConfigurationManager!
Ha , I can use this apn to surf the internet , so ,I think it must be the sdk 's flaw.