mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 16:53:16 +02:00
Add getters for onTimeout and onReadyStateChange
This commit is contained in:
parent
f3305a51e2
commit
310f184978
1 changed files with 4 additions and 2 deletions
|
@ -40,8 +40,8 @@ class XMLHttpRequestClass : public QObject {
|
||||||
Q_PROPERTY(int DONE READ getDone)
|
Q_PROPERTY(int DONE READ getDone)
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
Q_PROPERTY(QScriptValue ontimeout WRITE setOnTimeout)
|
Q_PROPERTY(QScriptValue ontimeout READ getOnTimeout WRITE setOnTimeout)
|
||||||
Q_PROPERTY(QScriptValue onreadystatechange WRITE setOnReadyStateChange)
|
Q_PROPERTY(QScriptValue onreadystatechange READ getOnReadyStateChange WRITE setOnReadyStateChange)
|
||||||
public:
|
public:
|
||||||
XMLHttpRequestClass(QScriptEngine* engine);
|
XMLHttpRequestClass(QScriptEngine* engine);
|
||||||
~XMLHttpRequestClass();
|
~XMLHttpRequestClass();
|
||||||
|
@ -74,7 +74,9 @@ public:
|
||||||
QScriptValue getStatus() const;
|
QScriptValue getStatus() const;
|
||||||
QString getStatusText() const;
|
QString getStatusText() const;
|
||||||
|
|
||||||
|
QScriptValue getOnTimeout() const { return _onTimeout; }
|
||||||
void setOnTimeout(QScriptValue function) { _onTimeout = function; }
|
void setOnTimeout(QScriptValue function) { _onTimeout = function; }
|
||||||
|
QScriptValue getOnReadyStateChange() const { return _onReadyStateChange; }
|
||||||
void setOnReadyStateChange(QScriptValue function) { _onReadyStateChange = function; }
|
void setOnReadyStateChange(QScriptValue function) { _onReadyStateChange = function; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
Loading…
Reference in a new issue