Commit 42fc2b94 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Set the NoDuplicates flag when looking for profiles

And don't list every profile we've loaded on the terminal output.
parent d398e696
...@@ -99,10 +99,10 @@ LcmsEnginePlugin::LcmsEnginePlugin(QObject *parent, const QVariantList &) ...@@ -99,10 +99,10 @@ LcmsEnginePlugin::LcmsEnginePlugin(QObject *parent, const QVariantList &)
KoResourcePaths::addResourceType("icc_profiles", "data", "color/icc"); KoResourcePaths::addResourceType("icc_profiles", "data", "color/icc");
QStringList profileFilenames; QStringList profileFilenames;
profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.icm", KoResourcePaths::Recursive); profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.icm", KoResourcePaths::Recursive | KoResourcePaths::NoDuplicates);
profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.ICM", KoResourcePaths::Recursive); profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.ICM", KoResourcePaths::Recursive | KoResourcePaths::NoDuplicates);
profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.ICC", KoResourcePaths::Recursive); profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.ICC", KoResourcePaths::Recursive | KoResourcePaths::NoDuplicates);
profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.icc", KoResourcePaths::Recursive); profileFilenames += KoResourcePaths::findAllResources("icc_profiles", "*.icc", KoResourcePaths::Recursive | KoResourcePaths::NoDuplicates);
// Load the profiles // Load the profiles
if (!profileFilenames.empty()) { if (!profileFilenames.empty()) {
...@@ -113,7 +113,7 @@ LcmsEnginePlugin::LcmsEnginePlugin(QObject *parent, const QVariantList &) ...@@ -113,7 +113,7 @@ LcmsEnginePlugin::LcmsEnginePlugin(QObject *parent, const QVariantList &)
profile->load(); profile->load();
if (profile->valid()) { if (profile->valid()) {
qDebug() << "Valid profile : " << profile->fileName() << profile->name(); //qDebug() << "Valid profile : " << profile->fileName() << profile->name();
registry->addProfileToMap(profile); registry->addProfileToMap(profile);
} else { } else {
qDebug() << "Invalid profile : " << profile->fileName() << profile->name(); qDebug() << "Invalid profile : " << profile->fileName() << profile->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