def addActionsToMenu(menu, actions):
    """A helper function to add many actions to a target menu or a toolbar."""
    for action in actions:
        if action is None:
            menu.addSeparator()
        else:
            menu.addAction(action)
