refs #248 replaced CStub with CPlugin

This commit is contained in:
Mathew Sutcliffe
2014-06-14 20:20:14 +01:00
parent 66bcea8e20
commit 13f9d8c343
3 changed files with 42 additions and 22 deletions

View File

@@ -3,12 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#define NOMINMAX
#define _CRT_SECURE_NO_WARNINGS
#include "stub.h"
#include "plugin.h"
#include "utils.h"
QSharedPointer<QApplication> g_qApp;
XBus::CStub *g_stub;
XBus::CPlugin *g_plugin;
PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc)
{
@@ -27,13 +28,13 @@ PLUGIN_API int XPluginEnable()
QXPlaneMessageHandler::install();
g_qApp = QSharedApplication::sharedInstance();
QXPlaneEventLoop::exec();
g_stub = new XBus::CStub;
g_plugin = new XBus::CPlugin;
return 1;
}
PLUGIN_API void XPluginDisable()
{
delete g_stub;
delete g_plugin;
g_qApp.reset();
}