Hey ,I am a student learning QT using C/C++.I started doing network examples few days back and wasn't able to understand the following snippet from an example.
Pls help me understand it.



Qt Code:
  1. QNetworkConfigurationManager manager;
  2. if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
  3. // Get saved network configuration
  4. QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
  5. settings.beginGroup(QLatin1String("QtNetwork"));
  6. const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
  7. settings.endGroup();
  8.  
  9. // If the saved network configuration is not currently discovered use the system default
  10. QNetworkConfiguration config = manager.configurationFromIdentifier(id);
  11. if ((config.state() & QNetworkConfiguration::Discovered) !=
  12. QNetworkConfiguration::Discovered) {
  13. config = manager.defaultConfiguration();
  14. }
To copy to clipboard, switch view to plain text mode 

thanks
Arpit