History

properly exposed WebSocketClass::ReadyState to the ScriptEngine

Thijs Wenker committed 11 years ago

Commit 0e255f41 parent 9edba453 files · +24 −10Browse files

Showing the changes to libraries/script-engine/src/WebSocketClass.cpp (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/WebSocketClass.cpp+8−0
@@ -115,3 +115,11 @@ QScriptValue webSocketToScriptValue(QScriptEngine* engine, WebSocketClass* const · 114 unmodified lines
115115 void webSocketFromScriptValue(const QScriptValue &object, WebSocketClass* &out) {
116116 out = qobject_cast<WebSocketClass*>(object.toQObject());
117117 }
118+
119+QScriptValue wscReadyStateToScriptValue(QScriptEngine* engine, const WebSocketClass::ReadyState& readyState) {
120+ return readyState;
121+}
122+
123+void wscReadyStateFromScriptValue(const QScriptValue& object, WebSocketClass::ReadyState& readyState) {
124+ readyState = (WebSocketClass::ReadyState)object.toUInt16();
125+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t