Przeglądaj źródła

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

longchair 9 lat temu
rodzic
commit
e59f2a7e23
1 zmienionych plików z 1 dodań i 1 usunięć
  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;