| 1495 | } |
| 1496 | |
| 1497 | int MainWindow::onProcess(const QString &id, CPlugin *pPlugin) |
| 1498 | { |
| 1499 | Q_UNUSED(id); |
| 1500 | QMenu* m = ui->menuStart; |
| 1501 | if(m_Parameter.GetStartByType()) { |
| 1502 | auto it = m_MenuStartByType.find(pPlugin->Type()); |
| 1503 | if(it == m_MenuStartByType.end()) { |
| 1504 | m = new QMenu(pPlugin->TypeName(pPlugin->Type()), ui->menuStart); |
| 1505 | m_MenuStartByType[pPlugin->Type()] = m; |
| 1506 | ui->menuStart->addMenu(m); |
| 1507 | } else |
| 1508 | m = *it; |
| 1509 | } |
| 1510 | // Start menu and toolbar |
| 1511 | QAction* p = GetStartAction(m, pPlugin); |
| 1512 | bool check = false; |
| 1513 | check = connect(p, SIGNAL(triggered()), this, SLOT(slotStart())); |
| 1514 | Q_ASSERT(check); |
| 1515 | return 0; |
| 1516 | } |
| 1517 | |
| 1518 | void MainWindow::closeEvent(QCloseEvent *event) |
| 1519 | { |
no test coverage detected