summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/publicapi
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@theqtcompany.com>2015-03-10 13:44:42 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2015-03-18 13:06:00 +0000
commite9c82ddc22662ffc768d37f0be5e7e3ac3599bfa (patch)
treec0eaa3f4000f1fbaee7fbfa32dc2f8705e37843e /tests/auto/quick/publicapi
parentd4ab9273dd1c61e1638f5b0376e65f7c5375ad93 (diff)
QQuickWebEngineScript: Add a sourceUrl property to complement sourceCode.
QtQuick doesn't have a convenient interface to interact with files, and even if that were the case, it would either be more awkward (and with increased overhead -- the price of an extra QObject, property, signal, etc) just to fetch the contents. So, we provide a convenience to allow fetching a user script from a file. Setting the sourceCode directly will reset sourceUrl (if it is set), and setting sourceUrl will ultimately result in a sourceCode change signal, too. Change-Id: Iee5abc0d719e2aeeacf1265f695b5a7efee9e0e8 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/publicapi')
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 1ac5a3111..3e4becc80 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -229,16 +229,19 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineScript.ApplicationWorld --> ScriptWorldId"
<< "QQuickWebEngineScript.UserWorld --> ScriptWorldId"
<< "QQuickWebEngineScript.name --> QString"
+ << "QQuickWebEngineScript.sourceUrl --> QUrl"
<< "QQuickWebEngineScript.sourceCode --> QString"
<< "QQuickWebEngineScript.injectionPoint --> InjectionPoint"
<< "QQuickWebEngineScript.worldId --> ScriptWorldId"
<< "QQuickWebEngineScript.runOnSubframes --> bool"
<< "QQuickWebEngineScript.nameChanged(QString) --> void"
+ << "QQuickWebEngineScript.sourceUrlChanged(QUrl) --> void"
<< "QQuickWebEngineScript.sourceCodeChanged(QString) --> void"
<< "QQuickWebEngineScript.injectionPointChanged(InjectionPoint) --> void"
<< "QQuickWebEngineScript.worldIdChanged(ScriptWorldId) --> void"
<< "QQuickWebEngineScript.runOnSubframesChanged(bool) --> void"
<< "QQuickWebEngineScript.setName(QString) --> void"
+ << "QQuickWebEngineScript.setSourceUrl(QUrl) --> void"
<< "QQuickWebEngineScript.setSourceCode(QString) --> void"
<< "QQuickWebEngineScript.setInjectionPoint(InjectionPoint) --> void"
<< "QQuickWebEngineScript.setWorldId(ScriptWorldId) --> void"