MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / foreach

Function foreach

Plugins/WakeOnLan/WakeOnLanModel.cpp:154–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 {
153 p->m_Net.SetHost(value.toString());
154 foreach(auto iface, QNetworkInterface::allInterfaces()) {
155 //qDebug(log) << iface;
156 auto entry = iface.addressEntries();
157 if(iface.flags() & QNetworkInterface::IsLoopBack)
158 continue;
159 if(!(iface.flags() & QNetworkInterface::CanBroadcast))
160 continue;
161 QString szBroadcast;
162 foreach(auto e, entry) {
163 if(!e.broadcast().isNull()) {
164 if(CParameterWakeOnLanUI::GetSubNet(
165 p->m_Net.GetHost(),
166 e.netmask().toString())
167 == CParameterWakeOnLanUI::GetSubNet(
168 e.ip().toString(),
169 e.netmask().toString()))
170 {
171 p->SetNetworkInterface(e.ip().toString());
172 p->SetBroadcastAddress(e.broadcast().toString());
173 break;
174 }
175 }
176 }
177 }
178 }
179 else if(ColumeValue::Mac == c)
180 p->SetMac(value.toString());

Callers

nothing calls this directly

Calls 5

GetHostMethod · 0.80
SetNetworkInterfaceMethod · 0.80
flagsMethod · 0.45
SetBroadcastAddressMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected