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

Method Initial

App/Client/mainwindow.cpp:438–571  ·  view source on GitHub ↗

For time-consuming operations

Source from the content-addressed store, hash-verified

436
437//! For time-consuming operations
438int MainWindow::Initial()
439{
440 qDebug(log) << Q_FUNC_INFO;
441
442 int nRet = 0;
443 QString szErr;
444
445 setEnabled(false);
446 do {
447 QMessageBox initMsgBox(QMessageBox::Information, tr("Load"), tr("Load ......"));
448 initMsgBox.showNormal();
449 qApp->processEvents();
450
451 QString szMsg;
452 szMsg = tr("Load plugins ......");
453 initMsgBox.setText(szMsg);
454 slotInformation(szMsg);
455 qApp->processEvents();
456 nRet = m_Manager.Initial();
457 if(nRet) {
458 szErr = tr("Initial manage error");
459 break;
460 }
461 m_Manager.EnumPlugins(this);
462
463 auto pg = m_Manager.GetGlobalParameters();
464 if(pg) {
465 //m_Parameter.SetGlobalParameters(pg);
466 bool bRet = QMetaObject::invokeMethod(
467 &m_Parameter,
468 "SetGlobalParameters",
469 Qt::DirectConnection,
470 Q_ARG(CParameterGlobal*, pg));
471 if(!bRet) {
472 szErr = tr("Failed to set global parameters");
473 qCritical(log) << szErr;
474 nRet = -1;
475 break;
476 }
477 }
478
479 if(m_pRecent) {
480 szMsg = tr("Load list recent dock ......");
481 initMsgBox.setText(szMsg);
482 slotInformation(szMsg);
483 qApp->processEvents();
484 nRet = m_pRecent->Initial();
485 if(nRet) {
486 szErr = tr("Initial recent dock error");
487 break;
488 }
489 }
490
491 if(m_pRecentMenu) {
492 szMsg = tr("Load recent menu ......");
493 initMsgBox.setText(szMsg);
494 slotInformation(szMsg);
495 qApp->processEvents();

Callers 2

mainFunction · 0.45

Calls 7

EnumPluginsMethod · 0.80
GetRecentMenuMaxCountMethod · 0.80
GetSaveSettingsTypeMethod · 0.80
titleMethod · 0.80
GetGlobalParametersMethod · 0.45
GetRecentsMethod · 0.45
GetFileMethod · 0.45

Tested by

no test coverage detected