void NetworkManager::TunSetting::fromMap(const QVariantMap &setting) { if (setting.contains(QLatin1String(NM_SETTING_TUN_GROUP))) { setGroup(setting.value(QLatin1String(NM_SETTING_TUN_GROUP)).toString()); } if (setting.contains(QLatin1String(NM_SETTING_TUN_MODE))) { setMode((Mode)setting.value(QLatin1String(NM_SETTING_TUN_MODE)).toUInt()); } if (setting.contains(QLatin1String(NM_SETTING_TUN_MULTI_QUEUE))) { setMultiQueue(setting.value(QLatin1String(NM_SETTING_TUN_MULTI_QUEUE)).toBool()); } if (setting.contains(QLatin1String(NM_SETTING_TUN_OWNER))) { setOwner(setting.value(QLatin1String(NM_SETTING_TUN_OWNER)).toString()); } if (setting.contains(QLatin1String(NM_SETTING_TUN_PI))) { setPi(setting.value(QLatin1String(NM_SETTING_TUN_PI)).toBool()); } if (setting.contains(QLatin1String(NM_SETTING_TUN_VNET_HDR))) { setVnetHdr(setting.value(QLatin1String(NM_SETTING_TUN_VNET_HDR)).toBool()); } }
NetworkManager::TunSetting::TunSetting(const Ptr &other) : Setting(other) , d_ptr(new TunSettingPrivate()) { setGroup(other->group()); setMode(other->mode()); setMultiQueue(other->multiQueue()); setOwner(other->owner()); setPi(other->pi()); setVnetHdr(other->vnetHdr()); }
inline bool setNumSubProblems(int n) { _numSubProblems = n; setPi(StdRealVector(n, 1)); return true; }