Showing the changes to libraries/script-engine/src/qtscript/ScriptEngineQtScript.h (1 of 14 files). Show all
Unified · Split
| @@ -89,6 +89,7 @@ public: // ScriptEngine implementation · 88 unmodified lines | |||
| 89 | virtual bool setProperty(const char* name, const QVariant& value); | 89 | virtual bool setProperty(const char* name, const QVariant& value); |
| 90 | virtual void setProcessEventsInterval(int interval); | 90 | virtual void setProcessEventsInterval(int interval); |
| 91 | virtual QThread* thread() const; | 91 | virtual QThread* thread() const; |
| 92 | virtual void setThread(QThread* thread); | ||
| 92 | virtual ScriptValuePointer undefinedValue(); | 93 | virtual ScriptValuePointer undefinedValue(); |
| 93 | virtual ScriptValuePointer uncaughtException() const; | 94 | virtual ScriptValuePointer uncaughtException() const; |
| 94 | virtual QStringList uncaughtExceptionBacktrace() const; | 95 | virtual QStringList uncaughtExceptionBacktrace() const; |
| @@ -404,18 +405,9 @@ protected: · 309 unmodified lines | |||
| 404 | */ | 405 | */ |
| 405 | Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ); | 406 | Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ); |
| 406 | 407 | ||
| 407 | // store for handling custom type marshaling/demarshaling | ||
| 408 | struct CustomTypeInfo { | ||
| 409 | ScriptEngine::MarshalFunction marshalFunc; | ||
| 410 | ScriptEngine::DemarshalFunction demarshalFunc; | ||
| 411 | ScriptValuePointer prototype; | ||
| 412 | }; | ||
| 413 | typedef std::map<int, CustomTypeInfo> TCustomTypeMap; | ||
| 414 | TCustomTypeMap _customTypes; | ||
| 415 | std::mutex _customTypeProtect; | ||
| 416 | |||
| 417 | QPointer<ScriptManager> _manager; | 408 | QPointer<ScriptManager> _manager; |
| 418 | 409 | ||
| 410 | int _nextCustomType = 0; | ||
| 419 | ScriptValuePointer _nullValue; | 411 | ScriptValuePointer _nullValue; |
| 420 | ScriptValuePointer _undefinedValue; | 412 | ScriptValuePointer _undefinedValue; |
| 421 | mutable ScriptContextQtPointer _currContext; | 413 | mutable ScriptContextQtPointer _currContext; |