void CWizActions::buildMenu(QMenu* pMenu, CWizSettings& settings, const QString& strSection) { int index = 0; while (true) { QString strKey = WizIntToStr(index); QString strAction = settings.GetString(strSection, strKey); if (strAction.isEmpty()) break; if (strAction.startsWith("-")) { pMenu->addSeparator(); } else if (strAction.startsWith("+")) { strAction.remove(0, 1); pMenu->addMenu(toMenu(pMenu, settings, strAction)); } else { pMenu->addAction(actionFromName(strAction)); } index++; } }
void CWizActions::buildMenu(QMenu* pMenu, CWizSettings& settings, const QString& strSection) { int index = 0; while (true) { QString strKey = WizIntToStr(index); QString strAction = settings.GetString(strSection, strKey); if (strAction.isEmpty()) break; // no fullscreen mode menu #ifndef Q_OS_MAC if (strAction == WIZACTION_GLOBAL_TOGGLE_FULLSCREEN) { index++; continue; } #endif #ifndef QT_DEBUG if (strAction == "actionAboutPlugins") { index++; continue; } #endif if (strAction.startsWith("-")) { pMenu->addSeparator(); } else if (strAction.startsWith("+")) { strAction.remove(0, 1); pMenu->addMenu(toMenu(pMenu, settings, strAction)); } else { pMenu->addAction(actionFromName(strAction)); } index++; } }