]> git.siccegge.de Git - frida/frida.git/blobdiff - src/core/InformationManager.cxx
Pass NewFunctionEvents as objects, not pointers
[frida/frida.git] / src / core / InformationManager.cxx
index b7229d376854639dfc8cc16fbece136f2ef9bed2..500f79f1406f661c2a4ac53747fa053898ff0db6 100644 (file)
@@ -4,7 +4,6 @@
 #include "core/Function.hxx"
 #include "core/BasicBlock.hxx"
 #include "core/Comment.hxx"
-#include "core/events/NewFunctionEvent.hxx"
 #include "core/events/ChangeCommentEvent.hxx"
 
 #include "qt.hxx"
@@ -19,6 +18,7 @@ InformationManager::InformationManager()
        : logger(log4cxx::Logger::getLogger("core.InformationManager"))
 {
        current_information_manager = this;
+       qRegisterMetaType<NewFunctionEvent>("NewFunctionEvent");
 
        QPluginLoader* loader = new QPluginLoader("libguilePlugin", NULL);
        if (!loader->load())
@@ -41,6 +41,7 @@ InformationManager::~InformationManager() {
 void InformationManager::reset(const std::string& filename) {
        this->filename = filename;
        disassembler.reset(createLLVMDisassembler(filename, this));
+       emit resetEvent();
        if (disassembler.get() != NULL)
                disassembler.get()->start();
 }
@@ -270,7 +271,7 @@ void InformationManager::finishFunction(Function* fun) {
                blocks.insert(std::make_pair(bl->getStartAddress(), bl));
        }
        NewFunctionEvent event(fun->getStartAddress(), fun);
-       Q_EMIT newFunctionEvent(&event);
+       emit newFunctionEvent(event);
 }
 
 void InformationManager::finishBasicBlock(BasicBlock*) {
@@ -279,7 +280,7 @@ void InformationManager::finishBasicBlock(BasicBlock*) {
 void InformationManager::finishComment(Comment* c) {
        LOG4CXX_DEBUG(logger, "Finishing comment " << c->getAddress());
        ChangeCommentEvent event(c->getAddress(), c->getLocation(), c);
-       Q_EMIT changeCommentEvent(&event);
+       emit changeCommentEvent(&event);
 }
 
 void InformationManager::deleteFunction(Function* f) {