From e01dc0556f72da94e8a310959f3ad0471d063bcb Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Wed, 1 Jun 2016 08:54:03 -0700 Subject: Add profile-wide user scripts to the Quick API Add API tests in order to try how it works in C++ and QML. Task-number: QTBUG-51034 Change-Id: I1680297e2dafba39dbd4b161f0dbdb14fb6d4243 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebengineprofile.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/webengine/api/qquickwebengineprofile.h') diff --git a/src/webengine/api/qquickwebengineprofile.h b/src/webengine/api/qquickwebengineprofile.h index d0d925930..0155c954a 100644 --- a/src/webengine/api/qquickwebengineprofile.h +++ b/src/webengine/api/qquickwebengineprofile.h @@ -46,6 +46,7 @@ #include #include #include +#include namespace QtWebEngineCore { class BrowserContextAdapter; @@ -55,6 +56,7 @@ QT_BEGIN_NAMESPACE class QQuickWebEngineDownloadItem; class QQuickWebEngineProfilePrivate; +class QQuickWebEngineScript; class QQuickWebEngineSettings; class QWebEngineCookieStore; class QWebEngineUrlRequestInterceptor; @@ -73,6 +75,7 @@ class Q_WEBENGINE_EXPORT QQuickWebEngineProfile : public QObject { Q_PROPERTY(int httpCacheMaximumSize READ httpCacheMaximumSize WRITE setHttpCacheMaximumSize NOTIFY httpCacheMaximumSizeChanged FINAL) Q_PROPERTY(QStringList spellCheckLanguages READ spellCheckLanguages WRITE setSpellCheckLanguages NOTIFY spellCheckLanguagesChanged FINAL REVISION 3) Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY spellCheckEnabledChanged FINAL REVISION 3) + Q_PROPERTY(QQmlListProperty userScripts READ userScripts FINAL REVISION 4) public: QQuickWebEngineProfile(QObject *parent = Q_NULLPTR); @@ -136,6 +139,8 @@ public: void setSpellCheckEnabled(bool enabled); bool isSpellCheckEnabled() const; + QQmlListProperty userScripts(); + static QQuickWebEngineProfile *defaultProfile(); Q_SIGNALS: -- cgit v1.2.3