View Full Version : Problem with QNetworkConfigurationManager::allConfigurations

31st July 2014, 21:06
I'm having trouble using QNetworkConfigurationManager::allConfigurations(). I want to get ALL 'Undefined' AND 'Discovered' networks and according to documentation I should to do:
QNetworkConfigurationManager::allConfigurations(QN etworkConfiguration::StateFlags);
In my case:
QNetworkConfigurationManager::allConfigurations(QN etworkConfiguration::Undefined | QNetworkConfiguration::Discovered);
But it isn't working. The code even didn't compile and show the error message:
error: invalid conversion from 'int' to 'QNetworkConfiguration::StateFlag' [-fpermissive]
networks = manager.allConfigurations(QNetworkConfiguration::U ndefined | QNetworkConfiguration::Discovered);
Can someone help me about that? Sincerely,