From: Christoph Egger <christoph@christoph-egger.org>
Date: Tue, 2 Jun 2015 21:12:16 +0000 (+0200)
Subject: Register types for cross-thread signals
X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=edf204645cccc7dfd4b2558f0fe6ab17675e6e2d;p=frida%2Ffrida.git

Register types for cross-thread signals
---

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>("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 <QMetaType>
+
 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<int> >("QVector<int>");
+	qRegisterMetaType<uint64_t>("uint64_t");
 #ifdef ARGPARSE
 	parser.addHelpOption();
 	parser.addVersionOption();