本文整理汇总了C++中QNetworkConfigurationManagerPrivate::allConfigurations方法的典型用法代码示例。如果您正苦于以下问题:C++ QNetworkConfigurationManagerPrivate::allConfigurations方法的具体用法?C++ QNetworkConfigurationManagerPrivate::allConfigurations怎么用?C++ QNetworkConfigurationManagerPrivate::allConfigurations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QNetworkConfigurationManagerPrivate
的用法示例。
在下文中一共展示了QNetworkConfigurationManagerPrivate::allConfigurations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: all
/*!
Returns the list of configurations which comply with the given \a filter.
By default this function returns all (defined and undefined) configurations.
A wireless network with a particular SSID may only be accessible in a
certain area despite the fact that the system has a valid configuration
for it. Therefore the filter flag may be used to limit the list to
discovered and possibly connected configurations only.
If \a filter is set to zero this function returns all possible configurations.
Note that this function returns the states for all configurations as they are known at
the time of this function call. If for instance a configuration of type WLAN is defined
the system may have to perform a WLAN scan in order to determine whether it is
actually available. To obtain the most accurate state updateConfigurations() should
be used to update each configuration's state. Note that such an update may require
some time. It's completion is signalled by updateCompleted(). In the absence of a
configuration update this function returns the best estimate at the time of the call.
Therefore, if WLAN configurations are of interest, it is recommended that
updateConfigurations() is called once after QNetworkConfigurationManager
instantiation (WLAN scans are too time consuming to perform in constructor).
After this the data is kept automatically up-to-date as the system reports
any changes.
*/
QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const
{
QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
if (priv)
return priv->allConfigurations(filter);
return QList<QNetworkConfiguration>();
}