Commit 535965f8 authored by Nicolas Carion's avatar Nicolas Carion

Remove unused function ProfileDialogs::profilesList

parent 24442ae2
......@@ -398,44 +398,6 @@ MltVideoProfile ProfilesDialog::getVideoProfile(Mlt::Profile &profile)
return result;
}
// static
QList<MltVideoProfile> ProfilesDialog::profilesList()
{
// Check if the profile has a matching entry in existing ones
QStringList profilesFilter;
profilesFilter << QStringLiteral("*");
QList<MltVideoProfile> list;
// Check the Mlt profiles
QDir mltDir(KdenliveSettings::mltpath());
QStringList profilesFiles = mltDir.entryList(profilesFilter, QDir::Files);
for (int i = 0; i < profilesFiles.size(); ++i) {
MltVideoProfile test = getProfileFromPath(mltDir.absoluteFilePath(profilesFiles.at(i)), profilesFiles.at(i));
if (!test.isValid()) {
continue;
}
list << test;
}
// Check custom profiles
qDebug() << "searching custom in " << QStandardPaths::AppDataLocation;
qDebug() << "name" << QStandardPaths::displayName(QStandardPaths::AppDataLocation);
qDebug() << "loc" << QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
QStringList customProfiles = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("profiles/"), QStandardPaths::LocateDirectory);
for (int i = 0; i < customProfiles.size(); ++i) {
QDir customDir(customProfiles.at(i));
profilesFiles = customDir.entryList(profilesFilter, QDir::Files);
for (int j = 0; j < profilesFiles.size(); ++j) {
QString path = customDir.absoluteFilePath(profilesFiles.at(j));
MltVideoProfile test = getProfileFromPath(path, path);
if (!test.isValid()) {
continue;
}
list << test;
}
}
return list;
}
// static
// TODO refac : delete this and replace by ProfileRepository::saveProfile
void ProfilesDialog::saveProfile(MltVideoProfile &profile, QString profilePath)
......
......@@ -39,7 +39,6 @@ public:
static MltVideoProfile getVideoProfile(const QString &name);
static MltVideoProfile getVideoProfile(Mlt::Profile &profile);
static void saveProfile(MltVideoProfile &profile, QString profilePath = QString());
static QList<MltVideoProfile> profilesList();
/** @brief Build a profile from it's url */
static MltVideoProfile getProfileFromPath(const QString &path, const QString &name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment