src/file.cpp

changeset 504
6a1fa662bfc1
parent 503
bebe09014dd6
child 508
7ace3537a560
--- a/src/file.cpp	Wed Oct 16 16:40:42 2013 +0300
+++ b/src/file.cpp	Wed Oct 16 16:47:40 2013 +0300
@@ -356,9 +356,9 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-List<LDObject*> loadFileContents (File* f, int* numWarnings, bool* ok)
-{	List<str> lines;
-	List<LDObject*> objs;
+QList<LDObject*> loadFileContents (File* f, int* numWarnings, bool* ok)
+{	QList<str> lines;
+	QList<LDObject*> objs;
 
 	if (numWarnings)
 		*numWarnings = 0;
@@ -417,7 +417,7 @@
 
 	int numWarnings;
 	bool ok;
-	List<LDObject*> objs = loadFileContents (f, &numWarnings, &ok);
+	QList<LDObject*> objs = loadFileContents (f, &numWarnings, &ok);
 
 	if (!ok)
 		return null;
@@ -492,7 +492,7 @@
 // -----------------------------------------------------------------------------
 void closeAll()
 {	// Remove all loaded files and the objects they contain
-	List<LDFile*> files = g_loadedFiles;
+	QList<LDFile*> files = g_loadedFiles;
 
 for (LDFile * file : files)
 		delete file;
@@ -883,7 +883,7 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-void LDFile::addObjects (const List<LDObject*> objs)
+void LDFile::addObjects (const QList<LDObject*> objs)
 {	for (LDObject * obj : objs)
 		if (obj)
 			addObject (obj);
@@ -932,8 +932,8 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-static List<LDFile*> getFilesUsed (LDFile* node)
-{	List<LDFile*> filesUsed;
+static QList<LDFile*> getFilesUsed (LDFile* node)
+{	QList<LDFile*> filesUsed;
 
 for (LDObject * obj : node->objects())
 	{	if (obj->getType() != LDObject::Subfile)
@@ -951,7 +951,7 @@
 // Find out which files are unused and close them.
 // -----------------------------------------------------------------------------
 void LDFile::closeUnused()
-{	List<LDFile*> filesUsed = getFilesUsed (LDFile::current());
+{	QList<LDFile*> filesUsed = getFilesUsed (LDFile::current());
 
 	// Anything that's explicitly opened must not be closed
 	for (LDFile* file : g_loadedFiles)
@@ -1021,7 +1021,7 @@
 
 // =============================================================================
 // -----------------------------------------------------------------------------
-List<LDObject*> LDFile::inlineContents (LDSubfile::InlineFlags flags)
+QList<LDObject*> LDFile::inlineContents (LDSubfile::InlineFlags flags)
 {	// Possibly substitute with logoed studs:
 	// stud.dat -> stud-logo.dat
 	// stud2.dat -> stud-logo2.dat
@@ -1033,7 +1033,7 @@
 		return g_logoedStud2->inlineContents (flags);
 	}
 
-	List<LDObject*> objs, objcache;
+	QList<LDObject*> objs, objcache;
 
 	bool deep = flags & LDSubfile::DeepInline,
 		 doCache = flags & LDSubfile::CacheInline;
@@ -1060,7 +1060,7 @@
 
 				// We only want to cache immediate subfiles, so shed the caching
 				// flag when recursing deeper in hierarchy.
-				List<LDObject*> otherobjs = ref->inlineContents (flags & ~ (LDSubfile::CacheInline));
+				QList<LDObject*> otherobjs = ref->inlineContents (flags & ~ (LDSubfile::CacheInline));
 
 			for (LDObject * otherobj : otherobjs)
 				{	// Cache this object, if desired

mercurial