src: some fixes

* fixed field declaration type has no source location
* grouped menu items
* overload edge pointing in right direction
This commit is contained in:
Eberhard Graether
2015-09-17 11:08:04 +02:00
parent be0eaf9d0d
commit 05d390fb3f
2 changed files with 10 additions and 4 deletions
+8 -1
View File
@@ -404,9 +404,13 @@ void QtMainWindow::setupProjectMenu()
menu->addAction(tr("&Open Project..."), this, SLOT(openProject()), QKeySequence::Open);
menu->addAction(tr("&Edit Project..."), this, SLOT(editProject()));
menu->addSeparator();
menu->addAction(tr("&Save Project"), this, SLOT(saveProject()), QKeySequence::Save);
menu->addAction(tr("Save Project as..."), this, SLOT(saveAsProject()), QKeySequence::SaveAs);
menu->addSeparator();
menu->addAction(tr("&Close Window"), this, SLOT(closeWindow()), QKeySequence::Close);
menu->addAction(tr("E&xit"), QCoreApplication::instance(), SLOT(quit()), QKeySequence::Quit);
}
@@ -424,9 +428,12 @@ void QtMainWindow::setupEditMenu()
QMenu *menu = new QMenu(tr("&Edit"), this);
menuBar()->addMenu(menu);
menu->addAction(tr("&Refresh"), this, SLOT(refresh()), QKeySequence::Refresh);
menu->addAction(tr("Undo"), this, SLOT(undo()), QKeySequence::Undo);
menu->addAction(tr("Redo"), this, SLOT(redo()), QKeySequence::Redo);
menu->addSeparator();
menu->addAction(tr("&Refresh"), this, SLOT(refresh()), QKeySequence::Refresh);
menu->addAction(tr("&Find"), this, SLOT(find()), QKeySequence::Find);
}
+2 -3
View File
@@ -228,8 +228,7 @@ Id Storage::onFieldParsed(const ParseLocation& location, const ParseVariable& va
addSourceLocation(nodeId, location);
Id typeNodeId = addNodeHierarchy(Node::NODE_UNDEFINED_TYPE, variable.type.dataType->getTypeNameHierarchy());
addEdge(nodeId, typeNodeId, Edge::EDGE_TYPE_OF, location);
addEdge(nodeId, typeNodeId, Edge::EDGE_TYPE_OF, variable.type.location);
return nodeId;
}
@@ -325,7 +324,7 @@ Id Storage::onMethodOverrideParsed(
Id baseNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_UNDEFINED_FUNCTION, base); // TODO: call this overridden
Id overriderNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_UNDEFINED_FUNCTION, overrider);
Id edgeId = addEdge(baseNodeId, overriderNodeId, Edge::EDGE_OVERRIDE, location);
Id edgeId = addEdge(overriderNodeId, baseNodeId, Edge::EDGE_OVERRIDE, location);
return edgeId;
}