Mon, 18 Mar 2013 04:03:05 +0200
added dummy action for future inlining command. Also GCC says that deleting instances of classes with virtual members but no virtual destructors is bad.
gui.cpp | file | annotate | diff | comparison | revisions | |
gui.h | file | annotate | diff | comparison | revisions | |
io.cpp | file | annotate | diff | comparison | revisions | |
ldtypes.cpp | file | annotate | diff | comparison | revisions | |
ldtypes.h | file | annotate | diff | comparison | revisions |
--- a/gui.cpp Mon Mar 18 03:38:51 2013 +0200 +++ b/gui.cpp Mon Mar 18 04:03:05 2013 +0200 @@ -65,6 +65,7 @@ MAKE_ACTION (about, sAboutText, "about", "Shows information about " APPNAME_DISPLAY ".") MAKE_ACTION (aboutQt, "About Qt", "aboutQt", "Shows information about Qt.") + MAKE_ACTION (inline, "Inline", "inline", "Inline selected subfiles.") MAKE_ACTION (splitQuads, "Split Quads", "quad-split", "Split quads into triangles.") MAKE_ACTION (setContents, "Set Contents", "set-contents", "Set the raw code of this object.") @@ -100,7 +101,8 @@ qAct_cut, qAct_copy, qAct_paste, - qAct_about + qAct_about, + qAct_inline, }; for (ushort i = 0; i < sizeof qaDisabledActions / sizeof *qaDisabledActions; ++i) @@ -133,6 +135,7 @@ qEditMenu->addAction (qAct_copy); // Copy qEditMenu->addAction (qAct_paste); // Paste qEditMenu->addSeparator (); // ----- + qEditMenu->addAction (qAct_inline); // Inline qEditMenu->addAction (qAct_splitQuads); // Split Quads qEditMenu->addAction (qAct_setContents); // Set Contents @@ -165,6 +168,7 @@ qEditToolBar->addAction (qAct_cut); qEditToolBar->addAction (qAct_copy); qEditToolBar->addAction (qAct_paste); + qEditToolBar->addAction (qAct_inline); qEditToolBar->addAction (qAct_splitQuads); qEditToolBar->addAction (qAct_setContents); addToolBar (qEditToolBar); @@ -277,6 +281,10 @@ } +void LDForgeWindow::slot_inline () { + +} + void LDForgeWindow::slot_splitQuads () { if (qObjList->selectedItems().size() == 0) return;
--- a/gui.h Mon Mar 18 03:38:51 2013 +0200 +++ b/gui.h Mon Mar 18 04:03:05 2013 +0200 @@ -34,7 +34,7 @@ QAction* qAct_cut, *qAct_copy, *qAct_paste; QAction* qAct_newSubfile, *qAct_newLine, *qAct_newTriangle, *qAct_newQuad; QAction* qAct_newCondLine, *qAct_newComment, *qAct_newVector, *qAct_newVertex; - QAction* qAct_splitQuads, *qAct_setContents; + QAction* qAct_splitQuads, *qAct_setContents, *qAct_inline; QAction* qAct_about, *qAct_aboutQt; LDForgeWindow (); @@ -67,6 +67,7 @@ void slot_newVector (); void slot_newVertex (); + void slot_inline (); void slot_splitQuads (); void slot_setContents ();
--- a/io.cpp Mon Mar 18 03:38:51 2013 +0200 +++ b/io.cpp Mon Mar 18 04:03:05 2013 +0200 @@ -3,7 +3,6 @@ #include "common.h" #include "io.h" #include "misc.h" -#include "gui.h" #include "bbox.h" vector<str> g_zaFileLoadPaths; @@ -36,7 +35,6 @@ if (!fp) { for (ushort i = 0; i < g_zaFileLoadPaths.size(); ++i) { str zFilePath = str::mkfmt ("%s/%s", g_zaFileLoadPaths[i].chars(), path.chars()); - printf ("try open %s\n", zFilePath.chars ()); fp = fopen (zFilePath.chars (), "r"); if (fp)
--- a/ldtypes.cpp Mon Mar 18 03:38:51 2013 +0200 +++ b/ldtypes.cpp Mon Mar 18 04:03:05 2013 +0200 @@ -201,4 +201,16 @@ // Delete this quad now, it has been split. delete this; -} \ No newline at end of file +} + +LDObject::~LDObject () {} +LDComment::~LDComment () {} +LDCondLine::~LDCondLine () {} +LDEmpty::~LDEmpty () {} +LDGibberish::~LDGibberish () {} +LDLine::~LDLine () {} +LDQuad::~LDQuad () {} +LDSubfile::~LDSubfile () {} +LDTriangle::~LDTriangle () {} +LDVector::~LDVector () {} +LDVertex::~LDVertex () {} \ No newline at end of file
--- a/ldtypes.h Mon Mar 18 03:38:51 2013 +0200 +++ b/ldtypes.h Mon Mar 18 04:03:05 2013 +0200 @@ -5,6 +5,7 @@ #define IMPLEMENT_LDTYPE(N) \ LD##N (); \ + virtual ~LD##N (); \ virtual LDObjectType_e getType () const { \ return OBJ_##N; \ } \ @@ -42,6 +43,7 @@ class LDObject { public: LDObject (); + virtual ~LDObject (); // Index (i.e. line number) of this object unsigned long getIndex ();