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

Method Initial

App/Client/Favorite/FavoriteView.cpp:213–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213int CFavoriteView::Initial()
214{
215 int nRet = 0;
216 m_pDatabase = new CFavoriteDatabase(this);
217 if(m_pDatabase) {
218 bool bRet = false;
219 //bRet = m_pDatabase->OpenDatabase(&m_pParaApp->GetGlobalParameters()->m_Database, "favorite_connect");
220 auto pg = m_pParaApp->GetGlobalParameters();
221 bRet = m_pDatabase->SetDatabase(&pg->m_DatabaseRemote);
222 if(!bRet) return -1;
223 }
224 if(m_pDatabase) {
225 m_pModel = new CFavoriteModel(m_pDatabase, this);
226 m_pTreeView->setModel(m_pModel);
227 }
228
229 EnableAction();
230 return nRet;
231}
232
233void CFavoriteView::EnableAction(const QModelIndex &index)
234{

Callers

nothing calls this directly

Calls 2

SetDatabaseMethod · 0.80
GetGlobalParametersMethod · 0.45

Tested by

no test coverage detected