Explorar o código

InputComponent : register InputkeyState as a metatype
Otherwise, serializing parameters cross thread, leads to a failure.

longchair %!s(int64=9) %!d(string=hai) anos
pai
achega
e59f2a7e23
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/input/InputComponent.h

+ 1 - 1
src/input/InputComponent.h

@@ -15,7 +15,7 @@ class InputBase : public QObject
 {
   Q_OBJECT
 public:
-  explicit InputBase(QObject* parent = nullptr) : QObject(parent) { }
+  explicit InputBase(QObject* parent = nullptr) : QObject(parent) { qRegisterMetaType<InputBase::InputkeyState>("InputkeyState"); }
   virtual bool initInput() = 0;
   virtual const char* inputName() = 0;