From edf204645cccc7dfd4b2558f0fe6ab17675e6e2d Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Tue, 2 Jun 2015 23:12:16 +0200 Subject: [PATCH] Register types for cross-thread signals --- src/core/InformationManager.cxx | 1 + src/core/events/NewFunctionEvent.hxx | 6 ++++++ src/main.cxx | 1 + 3 files changed, 8 insertions(+) diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index b947a58..4a48bae 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -19,6 +19,7 @@ InformationManager::InformationManager() : logger(log4cxx::Logger::getLogger("core.InformationManager")) { current_information_manager = this; + qRegisterMetaType("NewFunctionEvent"); QPluginLoader* loader = new QPluginLoader("libguilePlugin", NULL); if (!loader->load()) diff --git a/src/core/events/NewFunctionEvent.hxx b/src/core/events/NewFunctionEvent.hxx index febcd1d..178ddb5 100644 --- a/src/core/events/NewFunctionEvent.hxx +++ b/src/core/events/NewFunctionEvent.hxx @@ -1,10 +1,14 @@ #ifndef INCLUDE__NewFunctionEvent_hxx_ #define INCLUDE__NewFunctionEvent_hxx_ +#include + class Function; class NewFunctionEvent { public: + NewFunctionEvent() + : address(0), function(NULL) {} NewFunctionEvent(uint64_t address, Function* function) : address(address), function(function) {} @@ -12,4 +16,6 @@ public: Function* function; }; +Q_DECLARE_METATYPE(NewFunctionEvent) + #endif /* INCLUDE__NewFunctionEvent_hxx_ */ diff --git a/src/main.cxx b/src/main.cxx index 9e25c20..2e236de 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -38,6 +38,7 @@ int main(int argc, char** argv) QApplication::setApplicationVersion("0.2+"); QApplication::addLibraryPath(CONFIG_LIBDIR "/frida/plugins/Interpreter"); qRegisterMetaType >("QVector"); + qRegisterMetaType("uint64_t"); #ifdef ARGPARSE parser.addHelpOption(); parser.addVersionOption(); -- 2.39.2