Fix Windows build

This commit is contained in:
Torsten Sadowski
2018-11-19 21:04:48 +01:00
committed by wmayer
parent 9c2578de74
commit 91b2a3cff3
3 changed files with 8 additions and 23 deletions

View File

@@ -37,7 +37,7 @@ http://www.3dconnexion.com/forum/viewtopic.php?f=19&t=4968&sid=72c018bdcf0e6edc9
#include "PreCompiled.h"
#include "GuiNativeEventLinux.h"
#include "GuiNativeEventWin32.h"
#include <QGlobalStatic>
#include <QMainWindow>
@@ -192,7 +192,7 @@ Gui::GuiNativeEvent::~GuiNativeEvent()
}
}
void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window)
void Gui::GuiNativeEvent::initSpaceball(QMainWindow *mainWindow)
{
mainApp->setSpaceballPresent(Is3dmouseAttached());
@@ -299,7 +299,7 @@ void Gui::GuiNativeEvent::Move3d(HANDLE device, std::vector<float>& motionData)
motionDataArray[4] = ceil(motionData[4]);
motionDataArray[5] = ceil(motionData[5]);
mainApp->postMotionEvent(&motionDataArray[0]);
mainApp->postMotionEvent(motionDataArray);
}
/*!

View File

@@ -32,32 +32,15 @@
//#define _WIN32_WINNT 0x0501 //target at least windows XP
#include <Windows.h>
#include <QAbstractNativeEventFilter>
#if QT_VERSION >= 0x050000
#include "GuiRawInputEventFilter.h"
#endif
class QMainWindow;
class GUIApplicationNativeEventAware;
namespace Gui
{
#if QT_VERSION >= 0x050000
class RawInputEventFilter : public QAbstractNativeEventFilter
{
public:
typedef bool (*EventFilter)(void *message, long *result);
RawInputEventFilter(EventFilter filter) : eventFilter(filter) {
}
virtual ~RawInputEventFilter() {
}
virtual bool nativeEventFilter(const QByteArray & /*eventType*/, void *message, long *result) {
return eventFilter(message, result);
}
private:
EventFilter eventFilter;
};
#endif // if QT_VERSION >= 0x050000
class GUIApplicationNativeEventAware;
class GuiNativeEvent : public QObject

View File

@@ -23,6 +23,8 @@
#ifndef GUIRAWNATIVEINPUTEVENTFILTER_H
#define GUIRAWNATIVEINPUTEVENTFILTER_H
#include <QAbstractNativeEventFilter>
namespace Gui
{
class RawInputEventFilter : public QAbstractNativeEventFilter