! this is called on a right click on the root folder in the project explorer */
| 2254 | this is called on a right click on the root folder in the project explorer |
| 2255 | */ |
| 2256 | void MainWin::createContextMenu(QMenu* menu) const { |
| 2257 | QAction* firstAction = nullptr; |
| 2258 | // if we're populating the context menu for the project explorer, then |
| 2259 | // there're already actions available there. Skip the first title-action |
| 2260 | // and insert the action at the beginning of the menu. |
| 2261 | if (menu->actions().size() > 1) |
| 2262 | firstAction = menu->actions().at(1); |
| 2263 | |
| 2264 | menu->insertMenu(firstAction, m_newMenu); |
| 2265 | |
| 2266 | menu->insertSeparator(firstAction); |
| 2267 | menu->insertMenu(firstAction, m_visibilityMenu); |
| 2268 | menu->insertSeparator(firstAction); |
| 2269 | } |
| 2270 | |
| 2271 | /*! |
| 2272 | this is called on a right click on a non-root folder in the project explorer |