mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
[xswiftbus] Replace QtDBus with a libevent driven C++ wrapper on top of libdbus
QtDBus was the main component of xswiftbus' Qt dependency. This is the first preparation step to get xswiftbus Qt free. The new implementation is based on the low level libdbus library, which was also in use by QtDBus itself. But instead of QtDBus, we use now a thin C++ wrapper. To keep DBus handling async, libevent is used to monitor timeouts and fds.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "utils.h"
|
||||
#include "traffic.h"
|
||||
#include "service.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include <XPLM/XPLMPlanes.h>
|
||||
|
||||
#if ! defined(XPLM210)
|
||||
@@ -55,18 +54,11 @@ PLUGIN_API void XPluginStop()
|
||||
|
||||
PLUGIN_API int XPluginEnable()
|
||||
{
|
||||
qRegisterMetaType<QDoubleList>();
|
||||
qDBusRegisterMetaType<QDoubleList>();
|
||||
|
||||
QXPlaneMessageHandler::install();
|
||||
g_qApp = QSharedApplication::sharedInstance();
|
||||
QXPlaneEventLoop::exec();
|
||||
|
||||
g_plugin = new XSwiftBus::CPlugin;
|
||||
|
||||
// Here we can be safely assume that QtDBus was loaded by the process
|
||||
preventQtDBusDllUnload();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user