src/documentmanager.cpp

changeset 1215
77a0270352a3
parent 1012
413ecd6b9801
child 1217
314e12e23c3a
--- a/src/documentmanager.cpp	Thu Jan 04 19:24:40 2018 +0200
+++ b/src/documentmanager.cpp	Thu Jan 04 19:40:16 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();

mercurial