Changeset View
Changeset View
Standalone View
Standalone View
src/settings/setting.cpp
Show All 21 Lines | |||||
22 | 22 | | |||
23 | #undef signals | 23 | #undef signals | ||
24 | #include <nm-version.h> | 24 | #include <nm-version.h> | ||
25 | #include <libnm/NetworkManager.h> | 25 | #include <libnm/NetworkManager.h> | ||
26 | #define signals Q_SIGNALS | 26 | #define signals Q_SIGNALS | ||
27 | 27 | | |||
28 | #include <QDebug> | 28 | #include <QDebug> | ||
29 | 29 | | |||
30 | #if !NM_CHECK_VERSION(1, 14, 0) | ||||
31 | #define NM_SETTING_MATCH_SETTING_NAME "match" | ||||
32 | #endif | ||||
33 | | ||||
jgrulich: Same here, should be NM 1.14.0. | |||||
jgrulich: NM 1.14.0 is needed for NM_SETTING_MATCH_SETTING_NAME | |||||
30 | #if !NM_CHECK_VERSION(1, 10, 0) | 34 | #if !NM_CHECK_VERSION(1, 10, 0) | ||
35 | #define NM_SETTING_TC_CONFIG_SETTING_NAME "tc" | ||||
31 | #define NM_SETTING_OVS_BRIDGE_SETTING_NAME "ovs-bridge" | 36 | #define NM_SETTING_OVS_BRIDGE_SETTING_NAME "ovs-bridge" | ||
32 | #define NM_SETTING_OVS_INTERFACE_SETTING_NAME "ovs-interface" | 37 | #define NM_SETTING_OVS_INTERFACE_SETTING_NAME "ovs-interface" | ||
33 | #define NM_SETTING_OVS_PATCH_SETTING_NAME "ovs-patch" | 38 | #define NM_SETTING_OVS_PATCH_SETTING_NAME "ovs-patch" | ||
34 | #define NM_SETTING_OVS_PORT_SETTING_NAME "ovs-port" | 39 | #define NM_SETTING_OVS_PORT_SETTING_NAME "ovs-port" | ||
35 | #endif | 40 | #endif | ||
36 | 41 | | |||
37 | #if !NM_CHECK_VERSION(1, 8, 0) | 42 | #if !NM_CHECK_VERSION(1, 8, 0) | ||
38 | #define NM_SETTING_USER_SETTING_NAME "user" | 43 | #define NM_SETTING_USER_SETTING_NAME "user" | ||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 153 | case OvsBridge: | |||
149 | typeString = QLatin1String(NM_SETTING_OVS_BRIDGE_SETTING_NAME); | 154 | typeString = QLatin1String(NM_SETTING_OVS_BRIDGE_SETTING_NAME); | ||
150 | break; | 155 | break; | ||
151 | case OvsPatch: | 156 | case OvsPatch: | ||
152 | typeString = QLatin1String(NM_SETTING_OVS_PATCH_SETTING_NAME); | 157 | typeString = QLatin1String(NM_SETTING_OVS_PATCH_SETTING_NAME); | ||
153 | break; | 158 | break; | ||
154 | case OvsPort: | 159 | case OvsPort: | ||
155 | typeString = QLatin1String(NM_SETTING_OVS_PORT_SETTING_NAME); | 160 | typeString = QLatin1String(NM_SETTING_OVS_PORT_SETTING_NAME); | ||
156 | break; | 161 | break; | ||
162 | case Match: | ||||
163 | typeString = QLatin1String(NM_SETTING_MATCH_SETTING_NAME); | ||||
164 | break; | ||||
165 | case Tc: | ||||
166 | typeString = QLatin1String(NM_SETTING_TC_CONFIG_SETTING_NAME); | ||||
167 | break; | ||||
157 | case NetworkManager::Setting::Generic: | 168 | case NetworkManager::Setting::Generic: | ||
158 | typeString = QLatin1String(NM_SETTING_GENERIC_SETTING_NAME); | 169 | typeString = QLatin1String(NM_SETTING_GENERIC_SETTING_NAME); | ||
159 | break; | 170 | break; | ||
160 | default: | 171 | default: | ||
161 | break; | 172 | break; | ||
162 | } | 173 | } | ||
163 | 174 | | |||
164 | return typeString; | 175 | return typeString; | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 179 | { | |||
219 | } else if (typeString == QLatin1String(NM_SETTING_OVS_INTERFACE_SETTING_NAME)) { | 230 | } else if (typeString == QLatin1String(NM_SETTING_OVS_INTERFACE_SETTING_NAME)) { | ||
220 | type = OvsInterface; | 231 | type = OvsInterface; | ||
221 | } else if (typeString == QLatin1String(NM_SETTING_OVS_BRIDGE_SETTING_NAME)) { | 232 | } else if (typeString == QLatin1String(NM_SETTING_OVS_BRIDGE_SETTING_NAME)) { | ||
222 | type = OvsBridge; | 233 | type = OvsBridge; | ||
223 | } else if (typeString == QLatin1String(NM_SETTING_OVS_PATCH_SETTING_NAME)) { | 234 | } else if (typeString == QLatin1String(NM_SETTING_OVS_PATCH_SETTING_NAME)) { | ||
224 | type = OvsPatch; | 235 | type = OvsPatch; | ||
225 | } else if (typeString == QLatin1String(NM_SETTING_OVS_PORT_SETTING_NAME)) { | 236 | } else if (typeString == QLatin1String(NM_SETTING_OVS_PORT_SETTING_NAME)) { | ||
226 | type = OvsPort; | 237 | type = OvsPort; | ||
238 | } else if (typeString == QLatin1String(NM_SETTING_MATCH_SETTING_NAME)) { | ||||
239 | type = Match; | ||||
240 | } else if (typeString == QLatin1String(NM_SETTING_TC_CONFIG_SETTING_NAME)) { | ||||
241 | type = Tc; | ||||
227 | } | 242 | } | ||
228 | 243 | | |||
229 | return type; | 244 | return type; | ||
230 | } | 245 | } | ||
231 | 246 | | |||
232 | NetworkManager::Setting::Setting(SettingType type) | 247 | NetworkManager::Setting::Setting(SettingType type) | ||
233 | : d_ptr(new SettingPrivate()) | 248 | : d_ptr(new SettingPrivate()) | ||
234 | { | 249 | { | ||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |
Same here, should be NM 1.14.0.