Disclaimer update + small bug of CMS color management fix

This commit is contained in:
Jakub Melka
2020-05-03 19:14:53 +02:00
parent f70ff229ac
commit 9f405316a9
2 changed files with 172 additions and 168 deletions

View File

@ -1059,12 +1059,13 @@ PDFColorProfileIdentifiers PDFCMSManager::getExternalColorProfiles(QString profi
PDFColorProfileIdentifiers result;
QDir directory(profileDirectory);
QDir applicationDirectory(QApplication::applicationDirPath());
if (!profileDirectory.isEmpty() && directory.exists())
{
QStringList iccProfiles = directory.entryList({ "*.icc" }, QDir::Files | QDir::Readable | QDir::NoDotAndDotDot, QDir::NoSort);
for (const QString& fileName : iccProfiles)
{
QString filePath = directory.absoluteFilePath(fileName);
QString filePath = QDir::cleanPath(applicationDirectory.relativeFilePath(directory.absoluteFilePath(fileName)));
// Try to read the profile from the file. If it fails, then do nothing.
QFile file(filePath);