mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #10841 from sethalves/fix-server-scripts
fix server scripts AC
This commit is contained in:
commit
5617860fe4
3 changed files with 4 additions and 6 deletions
|
@ -37,6 +37,8 @@ int pickRayMetaTypeId = qRegisterMetaType<PickRay>();
|
|||
int collisionMetaTypeId = qRegisterMetaType<Collision>();
|
||||
int qMapURLStringMetaTypeId = qRegisterMetaType<QMap<QUrl,QString>>();
|
||||
int socketErrorMetaTypeId = qRegisterMetaType<QAbstractSocket::SocketError>();
|
||||
int voidLambdaType = qRegisterMetaType<std::function<void()>>();
|
||||
int variantLambdaType = qRegisterMetaType<std::function<QVariant()>>();
|
||||
|
||||
void registerMetaTypes(QScriptEngine* engine) {
|
||||
qScriptRegisterMetaType(engine, mat4toScriptValue, mat4FromScriptValue);
|
||||
|
|
|
@ -34,6 +34,8 @@ Q_DECLARE_METATYPE(xColor)
|
|||
Q_DECLARE_METATYPE(QVector<glm::vec3>)
|
||||
Q_DECLARE_METATYPE(QVector<float>)
|
||||
Q_DECLARE_METATYPE(AACube)
|
||||
Q_DECLARE_METATYPE(std::function<void()>);
|
||||
Q_DECLARE_METATYPE(std::function<QVariant()>);
|
||||
|
||||
void registerMetaTypes(QScriptEngine* engine);
|
||||
|
||||
|
|
|
@ -886,12 +886,6 @@ QQmlContext* OffscreenQmlSurface::getSurfaceContext() {
|
|||
return _qmlContext;
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(std::function<void()>);
|
||||
auto VoidLambdaType = qRegisterMetaType<std::function<void()>>();
|
||||
Q_DECLARE_METATYPE(std::function<QVariant()>);
|
||||
auto VariantLambdaType = qRegisterMetaType<std::function<QVariant()>>();
|
||||
|
||||
|
||||
void OffscreenQmlSurface::executeOnUiThread(std::function<void()> function, bool blocking ) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "executeOnUiThread", blocking ? Qt::BlockingQueuedConnection : Qt::QueuedConnection,
|
||||
|
|
Loading…
Reference in a new issue