void MainWindow::onProfileTriggered(QAction *action)
{
    Settings.setPlayerProfile(action->data().toString());
    if (MLT.producer() && MLT.producer()->is_valid()) {
        // Save the XML to get correct in/out points before profile is changed.
        QString xml = MLT.XML();
        setProfile(action->data().toString());
        MLT.restart(xml);
        onProducerOpened(false);
    } else {
        setProfile(action->data().toString());
    }
}
void MainWindow::onProfileTriggered(QAction *action)
{
    Settings.setPlayerProfile(action->data().toString());
    if (MLT.producer() && MLT.producer()->is_valid()) {
         
        QString xml = MLT.XML();
        setProfile(action->data().toString());
        MLT.restart(xml);
        onProducerOpened(false);
    } else {
        setProfile(action->data().toString());
    }
}