bool MainWindow::isSourceClipMyProject(QString resource)
{
    if (m_player->tabIndex() == Player::ProjectTabIndex && MLT.savedProducer() && MLT.savedProducer()->is_valid())
        resource = QString::fromUtf8(MLT.savedProducer()->get("resource"));
    if (!resource.isEmpty() && QDir(resource) == QDir(fileName())) {
        QMessageBox dialog(QMessageBox::Information,
                           qApp->applicationName(),
                           tr("You cannot add a project to itself!"),
                           QMessageBox::Ok,
                           this);
        dialog.setDefaultButton(QMessageBox::Ok);
        dialog.setEscapeButton(QMessageBox::Ok);
        dialog.setWindowModality(QmlApplication::dialogModality());
        dialog.exec();
        return true;
    }
    return false;
}
bool MainWindow::isSourceClipMyProject(QString resource)
{
    if (m_player->tabIndex() == Player::ProjectTabIndex && MLT.savedProducer() && MLT.savedProducer()->is_valid())
        resource = QString::fromUtf8(MLT.savedProducer()->get("resource"));
    if (!resource.isEmpty() && QDir(resource) == QDir(fileName())) {
        QMessageBox dialog(QMessageBox::Information,
                           qApp->applicationName(),
                           tr("You cannot add a project to itself!"),
                           QMessageBox::Ok,
                           this);
        dialog.setDefaultButton(QMessageBox::Ok);
        dialog.setEscapeButton(QMessageBox::Ok);
        dialog.setWindowModality(QmlApplication::dialogModality());
        dialog.exec();
        return true;
    }
    return false;
}