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

Method Accept

Src/FrmManagePlugins.cpp:62–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62int CFrmManagePlugins::Accept()
63{
64 QStringList lstPath;
65 m_pPara->SetEnableSetPluginsPath(ui->gbPluginsPath->isChecked());
66 for(int i = 0; i < m_pModelPluginPath->rowCount(); i++) {
67 lstPath << m_pModelPluginPath->item(i)->text();
68 }
69 m_pPara->SetPluginsPath(lstPath);
70 m_pPara->m_WhiteList.Clear();
71 m_pPara->m_BlackList.Clear();
72 for(int i = 0; i < m_pModelFilter->rowCount(); i++) {
73 QString szPath = m_pModelFilter->item(i, ColumnNo::File)->text();
74 if(szPath.isEmpty()) continue;
75 auto pWhitelist = m_pModelFilter->item(i, ColumnNo::Whitelist);
76 if(pWhitelist->checkState() == Qt::Checked)
77 m_pPara->m_WhiteList.AddKey(szPath);
78 auto pBlacklist = m_pModelFilter->item(i, ColumnNo::Blacklist);
79 if(pBlacklist->checkState() == Qt::Checked)
80 m_pPara->m_BlackList.AddKey(szPath);
81 }
82 m_pPara->SetOnlyLoadInWhitelist(ui->cbOnlyLoadInWhitelist->isChecked());
83 return 0;
84}
85
86int CFrmManagePlugins::AddPath(const QString &szPath)
87{

Callers 1

acceptMethod · 0.45

Calls 7

SetPluginsPathMethod · 0.80
rowCountMethod · 0.45
ClearMethod · 0.45
isEmptyMethod · 0.45
AddKeyMethod · 0.45

Tested by

no test coverage detected