--- a/src/documentmanager.cpp Thu Jan 04 22:42:01 2018 +0200 +++ b/src/documentmanager.cpp Thu Jan 04 22:52:04 2018 +0200 @@ -139,7 +139,7 @@ unknowns << static_cast<LDError*>(obj)->fileReferenced(); } - if (config.tryDownloadMissingFiles() and not unknowns.isEmpty()) + if (config->tryDownloadMissingFiles() and not unknowns.isEmpty()) { PartDownloader dl(m_window); dl.setSourceType(PartDownloader::PartsTracker); @@ -225,7 +225,7 @@ return relativePath; // Try with just the LDraw path first - QString fullPath = format("%1" DIRSLASH "%2", config.lDrawPath(), relativePath); + QString fullPath = format("%1" DIRSLASH "%2", config->lDrawPath(), relativePath); if (QFileInfo::exists(fullPath)) return fullPath; @@ -234,7 +234,7 @@ { // Look in sub-directories: parts and p. Also look in the download path, since that's where we download parts // from the PT to. - QStringList dirs = { config.lDrawPath(), config.downloadFilePath() }; + QStringList dirs = { config->lDrawPath(), config->downloadFilePath() }; for (const QString& topdir : dirs) { for (const QString& subdir : QStringList({ "parts", "p" })) @@ -362,7 +362,7 @@ void DocumentManager::addRecentFile(QString path) { - QStringList recentFiles = config.recentFiles(); + QStringList recentFiles = config->recentFiles(); int idx = recentFiles.indexOf(path); // If this file already is in the list, pop it out. @@ -380,7 +380,7 @@ // Add the file recentFiles << path; - config.setRecentFiles(recentFiles); + config->setRecentFiles(recentFiles); m_window->syncSettings(); m_window->updateRecentFilesMenu(); } @@ -415,7 +415,7 @@ // Possibly substitute with logoed studs: // stud.dat -> stud-logo.dat // stud2.dat -> stud-logo2.dat - if (config.useLogoStuds() and renderinline) + if (config->useLogoStuds() and renderinline) { // Ensure logoed studs are loaded first loadLogoedStuds();