src/libraries.cpp

changeset 35
98906a94732f
parent 26
3a9e761e4faa
child 41
0abada2a9802
equal deleted inserted replaced
34:1de2b8d64e9f 35:98906a94732f
218 /** 218 /**
219 * @brief Iterates over libraries and loads LDConfig.ldr from each of them. 219 * @brief Iterates over libraries and loads LDConfig.ldr from each of them.
220 * @param errors Where to stream any encountered errors 220 * @param errors Where to stream any encountered errors
221 * @return color table 221 * @return color table
222 */ 222 */
223 ColorTable LibraryManager::loadColorTable(QTextStream& errors) 223 ldraw::ColorTable LibraryManager::loadColorTable(QTextStream& errors)
224 { 224 {
225 ColorTable result; 225 ldraw::ColorTable result;
226 for (const Library& library : this->libraries) 226 for (const Library& library : this->libraries)
227 { 227 {
228 const QString path = library.path.filePath("LDConfig.ldr"); 228 const QString path = library.path.filePath("LDConfig.ldr");
229 QFile file{path}; 229 QFile file{path};
230 if (file.open(QIODevice::ReadOnly | QIODevice::Text)) 230 if (file.open(QIODevice::ReadOnly | QIODevice::Text))

mercurial