summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineprofile.h
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2016-06-01 08:54:03 -0700
committerSzabolcs David <davidsz@inf.u-szeged.hu>2017-01-26 15:05:22 +0000
commite01dc0556f72da94e8a310959f3ad0471d063bcb (patch)
treef6e67b22e1d4ea7379408b326a8c8a80ff384a9a /src/webengine/api/qquickwebengineprofile.h
parent1981a3193f43e53c7c92f1057b8264153b1dab41 (diff)
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 <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebengineprofile.h')
-rw-r--r--src/webengine/api/qquickwebengineprofile.h5
1 files changed, 5 insertions, 0 deletions
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 <QtCore/QObject>
#include <QtCore/QScopedPointer>
#include <QtCore/QString>
+#include <QtQml/QQmlListProperty>
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<QQuickWebEngineScript> 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<QQuickWebEngineScript> userScripts();
+
static QQuickWebEngineProfile *defaultProfile();
Q_SIGNALS: