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

Function foreach

App/Client/FrmActive.cpp:204–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 m_pModel->removeRows(0, m_pModel->rowCount());
203 m_pAddToFavorite->setEnabled(m_Operates.size() > 0);
204 foreach(auto c, m_Operates) {
205 QList<QStandardItem*> lstItem;
206 QStandardItem* pName = new QStandardItem(c->Icon(), c->Name());
207 pName->setToolTip(c->Description());
208 lstItem << pName;
209 QStandardItem* pProtocol = new QStandardItem(c->Protocol());
210 lstItem << pProtocol;
211 QStandardItem* pType = new QStandardItem(c->GetTypeName());
212 lstItem << pType;
213 QStandardItem* pId = new QStandardItem(c->Id());
214 QVariant v;
215 v.setValue(c);
216 pId->setData(v);
217 lstItem << pId;
218 m_pModel->appendRow(lstItem);
219 }
220
221 //以下设置列宽函数必须要数据加载完成后使用,才能应用
222 //See: https://blog.csdn.net/qq_40450386/article/details/86083759

Callers

nothing calls this directly

Calls 11

isValidMethod · 0.80
GetSettingsFileMethod · 0.80
IconMethod · 0.45
NameMethod · 0.45
DescriptionMethod · 0.45
ProtocolMethod · 0.45
GetTypeNameMethod · 0.45
IdMethod · 0.45
setDataMethod · 0.45
GetViewerMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected