diff -r 6de5ac1fb471 -r 3a9e761e4faa src/libraries.cpp --- a/src/libraries.cpp Sun Jan 19 14:25:57 2020 +0200 +++ b/src/libraries.cpp Wed Jan 22 00:23:29 2020 +0200 @@ -216,6 +216,26 @@ } /** + * @brief Iterates over libraries and loads LDConfig.ldr from each of them. + * @param errors Where to stream any encountered errors + * @return color table + */ +ColorTable LibraryManager::loadColorTable(QTextStream& errors) +{ + ColorTable result; + for (const Library& library : this->libraries) + { + const QString path = library.path.filePath("LDConfig.ldr"); + QFile file{path}; + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + (void) result.load(file, errors); + } + } + return result; +} + +/** * @brief Gets a human-readable string for the specified role * @param role Role to get a string for * @returns string