- fixed build errors

Sun, 09 Mar 2014 21:07:44 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sun, 09 Mar 2014 21:07:44 +0200
changeset 692
94feb28faffe
parent 691
ed26a5bbd585
child 693
8432b37034a9

- fixed build errors

src/Document.cc file | annotate | diff | comparison | revisions
src/GLCompiler.cc file | annotate | diff | comparison | revisions
src/GLCompiler.h file | annotate | diff | comparison | revisions
src/LDObject.cc file | annotate | diff | comparison | revisions
--- a/src/Document.cc	Sun Mar 09 15:00:05 2014 +0200
+++ b/src/Document.cc	Sun Mar 09 21:07:44 2014 +0200
@@ -1194,12 +1194,12 @@
 //
 void LDDocument::initializeGLData()
 {
-	log (getDisplayName() + ": Initializing GL data");
+	print (getDisplayName() + ": Initializing GL data");
 	LDObjectList objs = inlineContents (true, true);
 
 	for (LDObject* obj : objs)
 	{
-		assert (obj->getType() != LDObject::ESubfile);
+		assert (obj->type() != LDObject::ESubfile);
 		LDPolygon* data = obj->getPolygon();
 
 		if (data != null)
@@ -1426,4 +1426,4 @@
 
 	if (references().isEmpty())
 		invokeLater (closeUnused);
-}
\ No newline at end of file
+}
--- a/src/GLCompiler.cc	Sun Mar 09 15:00:05 2014 +0200
+++ b/src/GLCompiler.cc	Sun Mar 09 21:07:44 2014 +0200
@@ -67,13 +67,13 @@
 		}
 	}
 
-	log ("OpenGL ERROR: at %1:%2: %3", basename (QString (file)), line, errmsg);
+	print ("OpenGL ERROR: at %1:%2: %3", basename (QString (file)), line, errmsg);
 }
 
 // =============================================================================
 //
 GLCompiler::GLCompiler() :
-	m_Document (null)
+	m_document (null)
 {
 	needMerge();
 }
@@ -158,7 +158,7 @@
 			if (poly.color == i)
 				return qcol;
 
-		log ("%1: Unknown color %2!\n", __func__, poly.color);
+		print ("%1: Unknown color %2!\n", __func__, poly.color);
 		gWarnedColors << poly.color;
 		return qcol;
 	}
@@ -198,10 +198,10 @@
 //
 void GLCompiler::compileDocument()
 {
-	if (getDocument() == null)
+	if (document() == null)
 		return;
 
-	for (LDObject* obj : getDocument()->getObjects())
+	for (LDObject* obj : document()->objects())
 		compileObject (obj);
 }
 
@@ -257,7 +257,7 @@
 //
 void GLCompiler::compileObject (LDObject* obj)
 {
-	log ("compile #%1\n", obj->getID());
+	print ("compiling #%1\n", obj->id());
 	ObjectVBOInfo info;
 	dropObject (obj);
 	compileSubObject (obj, obj, &info);
@@ -280,8 +280,8 @@
 		case 5:	surface = vboCondLines;	numverts = 2; break;
 
 		default:
-			log ("OMGWTFBBQ weird polygon with number %1 (topobj: #%2, %3), origin: %4",
-				(int) poly.num, topobj->getID(), topobj->getTypeName(), poly.origin);
+			print ("OMGWTFBBQ weird polygon with number %1 (topobj: #%2, %3), origin: %4",
+				(int) poly.num, topobj->id(), topobj->typeName(), poly.origin);
 			assert (false);
 	}
 
@@ -290,7 +290,7 @@
 		const int vbonum			= getVBONumber (surface, (EVBOComplement) complement);
 		QVector<GLfloat>& vbodata	= objinfo->data[vbonum];
 		const QColor normalColor	= getPolygonColor (poly, topobj);
-		const QColor pickColor		= getIndexColor (topobj->getID());
+		const QColor pickColor		= getIndexColor (topobj->id());
 
 		for (int vert = 0; vert < numverts; ++vert)
 		{
@@ -340,7 +340,7 @@
 //
 void GLCompiler::compileSubObject (LDObject* obj, LDObject* topobj, ObjectVBOInfo* objinfo)
 {
-	switch (obj->getType())
+	switch (obj->type())
 	{
 		// Note: We cannot split quads into triangles here, it would mess up the
 		// wireframe view. Quads must go into separate vbos.
@@ -350,7 +350,7 @@
 		case LDObject::ECondLine:
 		{
 			LDPolygon* poly = obj->getPolygon();
-			poly->id = topobj->getID();
+			poly->id = topobj->id();
 			compilePolygon (*poly, topobj, objinfo);
 			delete poly;
 			break;
@@ -360,11 +360,11 @@
 		{
 			LDSubfile* ref = static_cast<LDSubfile*> (obj);
 			auto data = ref->inlinePolygons();
-			log ("inlinePolygons yielded %1 polys\n", data.size());
+			print ("inlinePolygons yielded %1 polys\n", data.size());
 
 			for (LDPolygon& poly : data)
 			{
-				poly.id = topobj->getID();
+				poly.id = topobj->id();
 				compilePolygon (poly, topobj, objinfo);
 			}
 			break;
--- a/src/GLCompiler.h	Sun Mar 09 15:00:05 2014 +0200
+++ b/src/GLCompiler.h	Sun Mar 09 21:07:44 2014 +0200
@@ -28,7 +28,7 @@
 //
 class GLCompiler
 {
-	PROPERTY (public,	LDDocumentPointer,	Document,	setDocument,	STOCK_WRITE)
+	PROPERTY (public,	LDDocumentPointer,	document,	setDocument,	STOCK_WRITE)
 
 	public:
 		struct ObjectVBOInfo
--- a/src/LDObject.cc	Sun Mar 09 15:00:05 2014 +0200
+++ b/src/LDObject.cc	Sun Mar 09 21:07:44 2014 +0200
@@ -865,7 +865,7 @@
 	if (origin().isEmpty() == false)
 		copy->setOrigin (origin());
 	elif (document() != null)
-		copy->setOrigin (document()->displayName() + ":" + QString::number (lineNumber()));
+		copy->setOrigin (document()->getDisplayName() + ":" + QString::number (lineNumber()));
 
 	return copy;
 }

mercurial