Wed, 05 Mar 2014 03:39:31 +0200
- renamed LDObject::deleteSelf to LDObject::destroy
src/AddObjectDialog.cc | file | annotate | diff | comparison | revisions | |
src/Document.cc | file | annotate | diff | comparison | revisions | |
src/EditHistory.cc | file | annotate | diff | comparison | revisions | |
src/ExternalPrograms.cc | file | annotate | diff | comparison | revisions | |
src/GLRenderer.cc | file | annotate | diff | comparison | revisions | |
src/LDObject.cc | file | annotate | diff | comparison | revisions | |
src/LDObject.h | file | annotate | diff | comparison | revisions | |
src/MainWindow.cc | file | annotate | diff | comparison | revisions | |
src/Types.cc | file | annotate | diff | comparison | revisions | |
src/actions/EditActions.cc | file | annotate | diff | comparison | revisions | |
src/actions/MainActions.cc | file | annotate | diff | comparison | revisions |
--- a/src/AddObjectDialog.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/AddObjectDialog.cc Wed Mar 05 03:39:31 2014 +0200 @@ -264,7 +264,7 @@ setWindowTitle (fmt (tr ("Edit %1"), typeName)); setWindowIcon (icon); - defaults->deleteSelf(); + defaults->destroy(); } // =============================================================================
--- a/src/Document.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/Document.cc Wed Mar 05 03:39:31 2014 +0200 @@ -142,11 +142,11 @@ // Clear everything from the model for (LDObject* obj : getObjects()) - obj->deleteSelf(); + obj->destroy(); // Clear the cache as well for (LDObject* obj : getCache()) - obj->deleteSelf(); + obj->destroy(); delete m_History; delete m_gldata; @@ -357,7 +357,7 @@ if (isAborted()) { for (LDObject* obj : m_Objects) - obj->deleteSelf(); + obj->destroy(); m_Objects.clear(); setDone (true);
--- a/src/EditHistory.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/EditHistory.cc Wed Mar 05 03:39:31 2014 +0200 @@ -131,7 +131,7 @@ void AddHistory::undo() const { LDObject* obj = getParent()->getDocument()->getObject (getIndex()); - obj->deleteSelf(); + obj->destroy(); } // ============================================================================= @@ -164,7 +164,7 @@ void DelHistory::redo() const { LDObject* obj = getParent()->getDocument()->getObject (getIndex()); - obj->deleteSelf(); + obj->destroy(); } // =============================================================================
--- a/src/ExternalPrograms.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/ExternalPrograms.cc Wed Mar 05 03:39:31 2014 +0200 @@ -178,7 +178,7 @@ writeObjects (objs, f); for (LDObject* obj : objs) - obj->deleteSelf(); + obj->destroy(); } else f.write ((obj->asText() + "\r\n").toUtf8()); @@ -319,7 +319,7 @@ { if (!obj->isScemantic()) { - obj->deleteSelf(); + obj->destroy(); continue; }
--- a/src/GLRenderer.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/GLRenderer.cc Wed Mar 05 03:39:31 2014 +0200 @@ -1001,7 +1001,7 @@ for (LDObject* obj : objs) { compileList (obj, list); - obj->deleteSelf(); + obj->destroy(); } g_glInvert = oldinvert; @@ -1734,7 +1734,7 @@ for (LDObject* obj : objs) { verts << getVertices (obj); - obj->deleteSelf(); + obj->destroy(); } } @@ -2163,11 +2163,11 @@ LDObject* nextobj = ovlobj->next(); if (nextobj && nextobj->type() == LDObject::EEmpty) - nextobj->deleteSelf(); + nextobj->destroy(); // If the overlay object was there and the overlay itself is // not, remove the object. - ovlobj->deleteSelf(); + ovlobj->destroy(); } elif (meta.img && !ovlobj) { // Inverse case: image is there but the overlay object is
--- a/src/LDObject.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/LDObject.cc Wed Mar 05 03:39:31 2014 +0200 @@ -219,7 +219,7 @@ getFile()->setObject (idx, other); // Remove the old object - deleteSelf(); + destroy(); } // ============================================================================= @@ -258,7 +258,7 @@ // ============================================================================= // -void LDObject::deleteSelf() +void LDObject::destroy() { // If this object was selected, unselect it now if (isSelected()) @@ -397,7 +397,7 @@ { LDObject* obj = LDObject::getDefault (type); QString name = obj->typeName(); - obj->deleteSelf(); + obj->destroy(); return name; } @@ -576,7 +576,7 @@ if (bfc && bfc->m_statement == LDBFC::InvertNext) { // This is prefixed with an invertnext, thus remove it. - bfc->deleteSelf(); + bfc->destroy(); return; } }
--- a/src/LDObject.h Wed Mar 05 02:33:58 2014 +0200 +++ b/src/LDObject.h Wed Mar 05 03:39:31 2014 +0200 @@ -100,7 +100,7 @@ LDObject* createCopy() const; // Deletes this object - void deleteSelf(); + void destroy(); // Index (i.e. line number) of this object long lineNumber() const;
--- a/src/MainWindow.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/MainWindow.cc Wed Mar 05 03:39:31 2014 +0200 @@ -303,7 +303,7 @@ // Delete the objects that were being selected for (LDObject* obj : selCopy) - obj->deleteSelf(); + obj->destroy(); refresh(); return selCopy.size(); @@ -700,7 +700,7 @@ void MainWindow::deleteObjects (LDObjectList objs) { for (LDObject* obj : objs) - obj->deleteSelf(); + obj->destroy(); } // =============================================================================
--- a/src/Types.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/Types.cc Wed Mar 05 03:39:31 2014 +0200 @@ -334,7 +334,7 @@ for (LDObject * obj : objs) { calcObject (obj); - obj->deleteSelf(); + obj->destroy(); } } break;
--- a/src/actions/EditActions.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/actions/EditActions.cc Wed Mar 05 03:39:31 2014 +0200 @@ -129,19 +129,18 @@ LDObjectList objs; if (obj->type() == LDObject::ESubfile) - objs = static_cast<LDSubfile*> (obj)->inlineContents ( - (LDSubfile::InlineFlags) - ( (deep) ? LDSubfile::DeepInline : 0) | - LDSubfile::CacheInline - ); + { + LDSubfile::InlineFlags flags = deep ? LDSubfile::DeepCacheInline : LDSubfile::CacheInline; + objs = static_cast<LDSubfile*> (obj)->inlineContents (flags); + } else continue; // Merge in the inlined objects - for (LDObject * inlineobj : objs) + for (LDObject* inlineobj : objs) { QString line = inlineobj->asText(); - inlineobj->deleteSelf(); + inlineobj->destroy(); LDObject* newobj = parseLine (line); getCurrentDocument()->insertObj (idx++, newobj); newobj->select(); @@ -149,7 +148,7 @@ } // Delete the subfile now as it's been inlined. - obj->deleteSelf(); + obj->destroy(); } g_win->refresh(); @@ -194,7 +193,7 @@ R()->compileObject (t); // Delete this quad now, it has been split. - obj->deleteSelf(); + obj->destroy(); num++; }
--- a/src/actions/MainActions.cc Wed Mar 05 02:33:58 2014 +0200 +++ b/src/actions/MainActions.cc Wed Mar 05 03:39:31 2014 +0200 @@ -844,7 +844,7 @@ { // Remove the selection now for (LDObject* obj : selection()) - obj->deleteSelf(); + obj->destroy(); // Compile all objects in the new subfile for (LDObject* obj : doc->getObjects())