summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-08 11:04:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-09-08 12:55:06 +0200
commit22556f899ffd91650c1a1d5a8d71016358291859 (patch)
tree320dfdcd26a3cd078738da5a0ab9b8ea373fde29 /src/webengine
parentb715310a4fdc2a5e215c99bae042cd820e9a1e27 (diff)
parentdc16cdd60449112343d43852960142db7fd155fd (diff)
Merge branch '5.5' into 5.6
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror.cpp2
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp62
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p.h2
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h6
-rw-r--r--src/webengine/api/qquickwebengineloadrequest.cpp18
-rw-r--r--src/webengine/api/qquickwebenginenewviewrequest.cpp15
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp100
-rw-r--r--src/webengine/api/qquickwebengineprofile_p.h2
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp65
-rw-r--r--src/webengine/api/qquickwebenginesingleton_p.h2
-rw-r--r--src/webengine/api/qquickwebengineview.cpp22
-rw-r--r--src/webengine/api/qquickwebengineview_p.h6
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc2
-rw-r--r--src/webengine/doc/src/qtwebengine-qmlmodule.qdoc4
-rw-r--r--src/webengine/doc/src/webengineview.qdoc113
-rw-r--r--src/webengine/plugin/plugins.qmltypes784
-rw-r--r--src/webengine/ui/Menu.qml11
17 files changed, 1018 insertions, 198 deletions
diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp
index 010c66be5..202d201b3 100644
--- a/src/webengine/api/qquickwebenginecertificateerror.cpp
+++ b/src/webengine/api/qquickwebenginecertificateerror.cpp
@@ -69,7 +69,7 @@ public:
This class contains information about a certificate error that happened and provides a way to accept or
deny a certificate exception.
- \sa WebEngineCertificateError::certificateError
+ \sa WebEngineView::certificateError
*/
QQuickWebEngineCertificateError::QQuickWebEngineCertificateError(const QSharedPointer<CertificateErrorController> &controller, QObject *parent)
: QObject(parent)
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 64e75a086..e04cff2c4 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -58,7 +58,7 @@ static inline QQuickWebEngineDownloadItem::DownloadState toDownloadState(int sta
}
}
-QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfilePrivate *p)
+QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfile *p)
: profile(p)
, downloadId(-1)
, downloadState(QQuickWebEngineDownloadItem::DownloadCancelled)
@@ -69,7 +69,8 @@ QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWeb
QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate()
{
- profile->downloadDestroyed(downloadId);
+ if (profile)
+ profile->d_ptr->downloadDestroyed(downloadId);
}
/*!
@@ -77,11 +78,11 @@ QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate()
\instantiates QQuickWebEngineDownloadItem
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
- \brief A WebEngineDownloadItem provides information about a download.
+ \brief Provides information about a download.
- WebEngineDownloadItem stores the state of a download to be used to manage requested downloads.
+ Stores the state of a download to be used to manage requested downloads.
- By default the download is rejected unless the user explicitly accepts it with
+ By default, the download is rejected unless the user explicitly accepts it with
WebEngineDownloadItem::accept().
*/
@@ -150,14 +151,16 @@ void QQuickWebEngineDownloadItem::cancel()
// We directly cancel the download if the user cancels before
// it even started, so no need to notify the profile here.
- if (state == QQuickWebEngineDownloadItem::DownloadInProgress)
- d->profile->cancelDownload(d->downloadId);
+ if (state == QQuickWebEngineDownloadItem::DownloadInProgress) {
+ if (d->profile)
+ d->profile->d_ptr->cancelDownload(d->downloadId);
+ }
}
/*!
\qmlproperty quint32 WebEngineDownloadItem::id
- The download item's id.
+ Holds the download item's ID.
*/
quint32 QQuickWebEngineDownloadItem::id() const
@@ -169,33 +172,16 @@ quint32 QQuickWebEngineDownloadItem::id() const
/*!
\qmlproperty enumeration WebEngineDownloadItem::state
- This property describes the state in which the download is in.
-
- The state can be one of:
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li DownloadRequested
- \li The download has been requested, but has not been accepted yet.
-
- \row
- \li DownloadInProgress
- \li The download is in progress.
-
- \row
- \li DownloadCompleted
- \li The download completed successfully.
-
- \row
- \li DownloadInterrupted
- \li The download has been interrupted (by the server or because of lost connectivity).
+ Describes the state of the download:
- \endtable
+ \value DownloadRequested
+ Download has been requested, but it has not been accepted yet.
+ \value DownloadInProgress
+ Download is in progress.
+ \value DownloadCompleted
+ Download completed successfully.
+ \value DownloadInterrupted
+ Download has been interrupted (by the server or because of lost connectivity).
*/
QQuickWebEngineDownloadItem::DownloadState QQuickWebEngineDownloadItem::state() const
@@ -207,9 +193,9 @@ QQuickWebEngineDownloadItem::DownloadState QQuickWebEngineDownloadItem::state()
/*!
\qmlproperty int WebEngineDownloadItem::totalBytes
- The download's total size in bytes.
+ Holds the total amount of data to download in bytes.
- -1 means the total size is unknown.
+ \c -1 means the total size is unknown.
*/
qint64 QQuickWebEngineDownloadItem::totalBytes() const
@@ -221,7 +207,7 @@ qint64 QQuickWebEngineDownloadItem::totalBytes() const
/*!
\qmlproperty int WebEngineDownloadItem::receivedBytes
- The download's bytes that have been received so far.
+ Holds the amount of data in bytes that has been downloaded so far.
*/
qint64 QQuickWebEngineDownloadItem::receivedBytes() const
@@ -233,7 +219,7 @@ qint64 QQuickWebEngineDownloadItem::receivedBytes() const
/*!
\qmlproperty QString WebEngineDownloadItem::path
- The download item's full target path where it is being downloaded to.
+ Holds the full target path where data is being downloaded to.
The path includes the file name. The default suggested path is the standard
download location and file name is deduced not to overwrite already existing files.
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h
index f43eda17c..9a30eb4ca 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p.h
@@ -71,7 +71,7 @@ public:
};
Q_ENUMS(DownloadState)
- Q_PROPERTY(quint32 id READ id() CONSTANT FINAL)
+ Q_PROPERTY(quint32 id READ id CONSTANT FINAL)
Q_PROPERTY(DownloadState state READ state NOTIFY stateChanged)
Q_PROPERTY(qint64 totalBytes READ totalBytes NOTIFY totalBytesChanged)
Q_PROPERTY(qint64 receivedBytes READ receivedBytes NOTIFY receivedBytesChanged)
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index c858693e0..230f322b5 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -50,19 +50,21 @@
#include "browser_context_adapter_client.h"
#include "qquickwebenginedownloaditem_p.h"
+#include "qquickwebengineprofile_p.h"
#include <private/qtwebengineglobal_p.h>
#include <QString>
+#include <QPointer>
QT_BEGIN_NAMESPACE
class QQuickWebEngineProfilePrivate;
class QQuickWebEngineDownloadItemPrivate {
QQuickWebEngineDownloadItem *q_ptr;
- QQuickWebEngineProfilePrivate* profile;
+ QPointer<QQuickWebEngineProfile> profile;
friend class QQuickWebEngineProfilePrivate;
public:
Q_DECLARE_PUBLIC(QQuickWebEngineDownloadItem)
- QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfilePrivate *p);
+ QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfile *p);
~QQuickWebEngineDownloadItemPrivate();
quint32 downloadId;
diff --git a/src/webengine/api/qquickwebengineloadrequest.cpp b/src/webengine/api/qquickwebengineloadrequest.cpp
index c85d0d76f..e94fa7eb9 100644
--- a/src/webengine/api/qquickwebengineloadrequest.cpp
+++ b/src/webengine/api/qquickwebengineloadrequest.cpp
@@ -62,10 +62,10 @@ public:
\inqmlmodule QtWebEngine 1.0
\since QtWebEngine 1.0
- \brief A utility class for the WebEngineView::loadingChanged signal.
+ \brief A utility type for the WebEngineView::loadingChanged signal.
- This class contains information about a requested load of a web page, such as the URL and
- current loading status (started, finished, failed).
+ Contains information about a request for loading a web page, such as the URL and
+ current loading status (started, succeeded, failed).
\sa WebEngineView::loadingChanged
*/
@@ -81,7 +81,7 @@ QQuickWebEngineLoadRequest::~QQuickWebEngineLoadRequest()
/*!
\qmlproperty url WebEngineLoadRequest::url
- \brief The URL of the load request.
+ \brief Holds the URL of the load request.
*/
QUrl QQuickWebEngineLoadRequest::url() const
{
@@ -92,11 +92,11 @@ QUrl QQuickWebEngineLoadRequest::url() const
/*!
\qmlproperty enumeration WebEngineLoadRequest::status
- This enumeration represents the load status of a web page load request.
+ This enumeration represents the load status of a web page load request:
- \value WebEngineView::LoadStartedStatus The page is currently loading.
- \value WebEngineView::LoadSucceededStatus The page has been loaded with success.
- \value WebEngineView::LoadFailedStatus The page has failed loading.
+ \value WebEngineView::LoadStartedStatus Page is currently loading.
+ \value WebEngineView::LoadSucceededStatus Page has been loaded with success.
+ \value WebEngineView::LoadFailedStatus Page could not be loaded.
\sa WebEngineView::loadingChanged
*/
@@ -108,6 +108,7 @@ QQuickWebEngineView::LoadStatus QQuickWebEngineLoadRequest::status() const
/*!
\qmlproperty string WebEngineLoadRequest::errorString
+ \brief Holds the error message.
*/
QString QQuickWebEngineLoadRequest::errorString() const
{
@@ -123,6 +124,7 @@ QQuickWebEngineView::ErrorDomain QQuickWebEngineLoadRequest::errorDomain() const
/*!
\qmlproperty int WebEngineLoadRequest::errorCode
+ \brief Holds the error code.
*/
int QQuickWebEngineLoadRequest::errorCode() const
{
diff --git a/src/webengine/api/qquickwebenginenewviewrequest.cpp b/src/webengine/api/qquickwebenginenewviewrequest.cpp
index dd197dfe4..893df7f46 100644
--- a/src/webengine/api/qquickwebenginenewviewrequest.cpp
+++ b/src/webengine/api/qquickwebenginenewviewrequest.cpp
@@ -45,9 +45,9 @@
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
- \brief A utility class for the WebEngineView::newViewRequested signal.
+ \brief A utility type for the WebEngineView::newViewRequested signal.
- This class contains information about the request of a page to open a new window.
+ Contains information about a request to load a page in a separate web engine view.
\sa WebEngineView::newViewRequested
*/
@@ -61,7 +61,7 @@ QQuickWebEngineNewViewRequest::~QQuickWebEngineNewViewRequest()
/*!
\qmlproperty WebEngineView::NewViewDestination WebEngineNewViewRequest::destination
- \brief The type of view that is requested by the page.
+ The type of the view that is requested by the page.
*/
QQuickWebEngineView::NewViewDestination QQuickWebEngineNewViewRequest::destination() const
{
@@ -70,9 +70,9 @@ QQuickWebEngineView::NewViewDestination QQuickWebEngineNewViewRequest::destinati
/*!
\qmlproperty bool WebEngineNewViewRequest::isUserInitiated
- \brief Whether this window request was directly triggered as the result of a keyboard or mouse event.
+ Whether this window request was directly triggered as the result of a keyboard or mouse event.
- Use this property to block possibly unwanted "popups".
+ Use this property to block possibly unwanted \e popups.
*/
bool QQuickWebEngineNewViewRequest::isUserInitiated() const
{
@@ -82,9 +82,8 @@ bool QQuickWebEngineNewViewRequest::isUserInitiated() const
/*!
\qmlmethod WebEngineNewViewRequest::openIn(WebEngineView view)
- Call this method to fulfill the request and determine which WebEngineView
- should be used to contain the new page. Any state, history or loaded page
- within \a view will be lost as result of this.
+ Opens the requested page in the new web engine view \a view. State and history of the
+ view and the page possibly loaded in it will be lost.
\sa WebEngineView::newViewRequested
*/
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 0a1504e28..67c74c356 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -89,7 +89,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
Q_Q(QQuickWebEngineProfile);
Q_ASSERT(!m_ongoingDownloads.contains(info.id));
- QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(this);
+ QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(q);
itemPrivate->downloadId = info.id;
itemPrivate->downloadState = QQuickWebEngineDownloadItem::DownloadRequested;
itemPrivate->totalBytes = info.totalBytes;
@@ -135,13 +135,13 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info
\instantiates QQuickWebEngineProfile
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
- \brief A WebEngineProfile contains common settings for multiple WebEngineView.
+ \brief Contains common settings for multiple web engine views.
- WebEngineProfile contains settings and history shared by all WebEngineView that belong
+ Contains settings and history shared by all the web engine views that belong
to the profile.
- A default profile is built-in that all web pages not specifically created with another profile
- belongs to.
+ Each web engine view has an associated profile. Views that do not have a specific profile set
+ share a common default one.
*/
/*!
@@ -149,16 +149,15 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info
This signal is emitted whenever a download has been triggered.
The \a download argument holds the state of the download.
- The \a download has to be explicitly accepted with WebEngineDownloadItem::accept(),
- else the download will be cancelled by default.
+ The download has to be explicitly accepted with WebEngineDownloadItem::accept() or the
+ download will be cancelled by default.
*/
/*!
\qmlsignal WebEngineProfile::downloadFinished(WebEngineDownloadItem download)
- This signal is emitted whenever a download finishes downloading.
- This can be due to the download finishing successfully, being cancelled or
- interrupted by lost connectivity for example.
+ This signal is emitted whenever downloading stops, because it finished successfully, was
+ cancelled, or was interrupted (for example, because connectivity was lost).
The \a download argument holds the state of the finished download instance.
*/
@@ -182,7 +181,10 @@ QQuickWebEngineProfile::~QQuickWebEngineProfile()
/*!
\qmlproperty QString WebEngineProfile::storageName
- The storage name is used to give each profile that uses the disk separate subdirectories for persistent data and cache.
+ The storage name that is used to create separate subdirectories for each profile that uses
+ the disk for storing persistent data and cache.
+
+ \sa WebEngineProfile::persistentStoragePath, WebEngineProfile::cachePath
*/
QString QQuickWebEngineProfile::storageName() const
@@ -211,8 +213,9 @@ void QQuickWebEngineProfile::setStorageName(const QString &name)
/*!
\qmlproperty bool WebEngineProfile::offTheRecord
- An offTheRecord profile forces cookies and HTTP cache to be in memory, but also force
- all other normally persistent data to be stored in memory.
+ Whether the web engine profile is \e off-the-record.
+ An off-the-record profile forces cookies, the HTTP cache, and other normally persistent data
+ to be stored only in memory.
*/
bool QQuickWebEngineProfile::isOffTheRecord() const
{
@@ -238,10 +241,12 @@ void QQuickWebEngineProfile::setOffTheRecord(bool offTheRecord)
/*!
\qmlproperty QString WebEngineProfile::persistentStoragePath
- The persistent storage path is where persistent data for the browser and web content is stored.
- Persistent data includes persistent cookies, HTML5 local storage and visited links.
+ The path to the location where the persistent data for the browser and web content are
+ stored. Persistent data includes persistent cookies, HTML5 local storage, and visited links.
- By default this is below QStandardPaths::writableLocation(QStandardPaths::DataLocation) in a storageName specific directory.
+ By default, the storage is located below
+ QStandardPaths::writableLocation(QStandardPaths::DataLocation) in a directory named using
+ storageName.
*/
QString QQuickWebEngineProfile::persistentStoragePath() const
{
@@ -261,7 +266,11 @@ void QQuickWebEngineProfile::setPersistentStoragePath(const QString &path)
/*!
\qmlproperty QString WebEngineProfile::cachePath
- By default this is below QStandardPaths::writableLocation(QStandardPaths::CacheLocation) in a storageName specific directory.
+ The path to the location where the profile's caches are stored, in particular the HTTP cache.
+
+ By default, the caches are stored
+ below QStandardPaths::writableLocation(QStandardPaths::CacheLocation) in a directory named using
+ storageName.
*/
QString QQuickWebEngineProfile::cachePath() const
{
@@ -281,7 +290,7 @@ void QQuickWebEngineProfile::setCachePath(const QString &path)
/*!
\qmlproperty QString WebEngineProfile::httpUserAgent
- The user-agent string send with HTTP to identify the browser.
+ The user-agent string sent with HTTP to identify the browser.
*/
QString QQuickWebEngineProfile::httpUserAgent() const
{
@@ -302,23 +311,13 @@ void QQuickWebEngineProfile::setHttpUserAgent(const QString &userAgent)
/*!
\qmlproperty enumeration WebEngineProfile::httpCacheType
- The type of the HTTP cache.
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li MemoryHttpCache
- \li Use a in-memory cache. This is the only setting possible if offTheRecord is set or no cachePath is available.
-
- \row
- \li DiskHttpCache
- \li DiskHttpCache Use a disk cache. This is the default.
+ This enumeration describes the type of the HTTP cache:
- \endtable
+ \value MemoryHttpCache
+ Uses an in-memory cache. This is the only setting possible if offTheRecord is set or
+ no persistentStoragePath is available.
+ \value DiskHttpCache
+ Uses a disk cache. This is the default value.
*/
QQuickWebEngineProfile::HttpCacheType QQuickWebEngineProfile::httpCacheType() const
@@ -339,27 +338,16 @@ void QQuickWebEngineProfile::setHttpCacheType(QQuickWebEngineProfile::HttpCacheT
/*!
\qmlproperty enumeration WebEngineProfile::persistentCookiesPolicy
- The policy of cookie persistency.
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li NoPersistentCookies
- \li Both session and persistent cookies are stored in memory. This is the only setting possible if offTheRecord is set or no persistentStoragePath is available.
-
- \row
- \li AllowPersistentCookies
- \li Cookies marked persistent are save and restored from disk, session cookies are only stored to disk for crash recovery. This is the default setting.
-
- \row
- \li ForcePersistentCookies
- \li Both session and persistent cookies are save and restored from disk.
+ This enumeration describes the policy of cookie persistency:
- \endtable
+ \value NoPersistentCookies
+ Both session and persistent cookies are stored in memory. This is the only setting
+ possible if offTheRecord is set or no persistentStoragePath is available.
+ \value AllowPersistentCookies
+ Cookies marked persistent are saved to and restored from disk, whereas session cookies
+ are only stored to disk for crash recovery. This is the default setting.
+ \value ForcePersistentCookies
+ Both session and persistent cookies are saved to and restored from disk.
*/
QQuickWebEngineProfile::PersistentCookiesPolicy QQuickWebEngineProfile::persistentCookiesPolicy() const
@@ -380,8 +368,8 @@ void QQuickWebEngineProfile::setPersistentCookiesPolicy(QQuickWebEngineProfile::
/*!
\qmlproperty int WebEngineProfile::httpCacheMaximumSize
- The maximum size of the HTTP cache. If 0 it means the size will be controlled automatically by QtWebEngine.
- The default value is 0.
+ The maximum size of the HTTP cache. If \c 0, the size will be controlled automatically by
+ QtWebEngine. The default value is \c 0.
\sa httpCacheType
*/
diff --git a/src/webengine/api/qquickwebengineprofile_p.h b/src/webengine/api/qquickwebengineprofile_p.h
index 4daae1aa7..af5762032 100644
--- a/src/webengine/api/qquickwebengineprofile_p.h
+++ b/src/webengine/api/qquickwebengineprofile_p.h
@@ -146,6 +146,8 @@ private:
friend class QQuickWebEngineSettings;
friend class QQuickWebEngineSingleton;
friend class QQuickWebEngineViewPrivate;
+ friend class QQuickWebEngineDownloadItem;
+ friend class QQuickWebEngineDownloadItemPrivate;
QScopedPointer<QQuickWebEngineProfilePrivate> d_ptr;
};
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 9662a9ef9..539f211b0 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -56,8 +56,8 @@ QQuickWebEngineSettings::QQuickWebEngineSettings(QQuickWebEngineSettings *parent
\since QtWebEngine 1.1
\brief WebEngineSettings allows configuration of browser properties and attributes.
- WebEngineSettings allows configuration of browser properties and generic attributes like for example
- JavaScript, focus behavior and access to remote content.
+ WebEngineSettings allows configuration of browser properties and generic attributes, such as
+ JavaScript support, focus behavior, and access to remote content.
Each WebEngineView can have individual settings.
@@ -70,9 +70,9 @@ QQuickWebEngineSettings::~QQuickWebEngineSettings()
/*!
\qmlproperty bool WebEngineSettings::autoLoadImages
- Specifies whether images are automatically loaded in web pages.
+ Automatically loads images on web pages.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::autoLoadImages() const
{
@@ -82,9 +82,9 @@ bool QQuickWebEngineSettings::autoLoadImages() const
/*!
\qmlproperty bool WebEngineSettings::javascriptEnabled
- Enables or disables the running of JavaScript programs.
+ Enables the running of JavaScript programs.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::javascriptEnabled() const
{
@@ -94,9 +94,9 @@ bool QQuickWebEngineSettings::javascriptEnabled() const
/*!
\qmlproperty bool WebEngineSettings::javascriptCanOpenWindows
- Specifies whether JavaScript programs can open new windows.
+ Allows JavaScript programs to open new windows.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::javascriptCanOpenWindows() const
{
@@ -106,9 +106,9 @@ bool QQuickWebEngineSettings::javascriptCanOpenWindows() const
/*!
\qmlproperty bool WebEngineSettings::javascriptCanAccessClipboard
- Specifies whether JavaScript programs can read or write to the clipboard.
+ Allows JavaScript programs to read from or write to the clipboard.
- This is disabled by default.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::javascriptCanAccessClipboard() const
{
@@ -118,9 +118,9 @@ bool QQuickWebEngineSettings::javascriptCanAccessClipboard() const
/*!
\qmlproperty bool WebEngineSettings::linksIncludedInFocusChain
- Specifies whether hyperlinks should be included in the keyboard focus chain.
+ Includes hyperlinks in the keyboard focus chain.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::linksIncludedInFocusChain() const
{
@@ -130,9 +130,9 @@ bool QQuickWebEngineSettings::linksIncludedInFocusChain() const
/*!
\qmlproperty bool WebEngineSettings::localStorageEnabled
- Specifies whether support for the HTML 5 local storage feature is enabled or not.
+ Enables support for the HTML 5 local storage feature.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::localStorageEnabled() const
{
@@ -142,10 +142,9 @@ bool QQuickWebEngineSettings::localStorageEnabled() const
/*!
\qmlproperty bool WebEngineSettings::localContentCanAccessRemoteUrls
- Specifies whether locally loaded documents are allowed to access remote urls.
- For more information about security origins and local vs. remote content see QWebEngineSecurityOrigin.
+ Allows locally loaded documents to access remote URLs.
- This is disabled by default.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::localContentCanAccessRemoteUrls() const
{
@@ -155,15 +154,14 @@ bool QQuickWebEngineSettings::localContentCanAccessRemoteUrls() const
/*!
\qmlproperty bool WebEngineSettings::spatialNavigationEnabled
- Enables or disables the Spatial Navigation feature, which consists in the
- ability to navigate between focusable elements in a Web page, such as hyperlinks
- and form controls, by using Left, Right, Up and Down arrow keys.
+ Enables the Spatial Navigation feature, which means the ability to navigate between focusable
+ elements, such as hyperlinks and form controls, on a web page by using the Left, Right, Up and
+ Down arrow keys.
- For example, if a user presses the Right key, heuristics determine whether there
- is an element they might be trying to reach towards the right and which element
- they probably want.
+ For example, if a user presses the Right key, heuristics determine whether there is an element
+ they might be trying to reach towards the right and which element they probably want.
- This is disabled by default.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::spatialNavigationEnabled() const
@@ -174,10 +172,9 @@ bool QQuickWebEngineSettings::spatialNavigationEnabled() const
/*!
\qmlproperty bool WebEngineSettings::localContentCanAccessFileUrls
- Specifies whether locally loaded documents are allowed to access other local urls.
- For more information about security origins and local vs. remote content see QWebEngineSecurityOrigin.
+ Allows locally loaded documents to access other local URLs.
- This is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::localContentCanAccessFileUrls() const
{
@@ -187,9 +184,9 @@ bool QQuickWebEngineSettings::localContentCanAccessFileUrls() const
/*!
\qmlproperty bool WebEngineSettings::hyperlinkAuditingEnabled
- This setting enables support for the ping attribute for hyperlinks.
+ Enables support for the \c ping attribute for hyperlinks.
- It is disabled by default.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::hyperlinkAuditingEnabled() const
{
@@ -199,9 +196,9 @@ bool QQuickWebEngineSettings::hyperlinkAuditingEnabled() const
/*!
\qmlproperty bool WebEngineSettings::errorPageEnabled
- This setting enables built-in error pages of Chromium.
+ Enables displaying the built-in error pages of Chromium.
- It is enabled by default.
+ Enabled by default.
*/
bool QQuickWebEngineSettings::errorPageEnabled() const
{
@@ -236,10 +233,10 @@ bool QQuickWebEngineSettings::fullScreenSupportEnabled() const
/*!
\qmlproperty QString WebEngineSettings::defaultTextEncoding
- The \a encoding, must be a string describing an encoding such as "utf-8",
- "iso-8859-1", etc.
+ Sets the default encoding. The value must be a string describing an encoding such as "utf-8" or
+ "iso-8859-1".
- If left empty a default value will be used.
+ If left empty, a default value will be used.
*/
QString QQuickWebEngineSettings::defaultTextEncoding() const
{
diff --git a/src/webengine/api/qquickwebenginesingleton_p.h b/src/webengine/api/qquickwebenginesingleton_p.h
index 744e4a9bf..64668420c 100644
--- a/src/webengine/api/qquickwebenginesingleton_p.h
+++ b/src/webengine/api/qquickwebenginesingleton_p.h
@@ -49,7 +49,7 @@
//
#include <QObject>
-#include <qtwebengineglobal_p.h>
+#include "qtwebengineglobal_p.h"
QT_BEGIN_NAMESPACE
class QQuickWebEngineProfile;
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 8d0bddea6..65b98ca98 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -785,15 +785,6 @@ void QQuickWebEngineView::setProfile(QQuickWebEngineProfile *profile)
Q_D(QQuickWebEngineView);
d->setProfile(profile);
}
-/*!
- * \qmlproperty WebEngineSettings QQuickWebEngineView::settings
- * \readonly settings
- * \since QtWebEngine 1.1
- *
- * The \a settings property holds the settings used by this view.
- *
- * \sa WebEngineSettings
- */
QQuickWebEngineSettings *QQuickWebEngineView::settings() const
{
@@ -1031,19 +1022,6 @@ QQuickWebEngineHistory *QQuickWebEngineView::navigationHistory() const
return d->m_history.data();
}
-/*!
- * \qmlproperty QQmlWebChannel WebEngineView::webChannel
- * \since QtWebEngine 1.1
- *
- * The web channel instance used by this view.
- * This channel is automatically using the internal QtWebEngine transport mechanism over Chromium IPC,
- * and exposed in the javascript context of the page it is rendering as \c qt.webChannelTransport.
- * This transport object is used when instantiating the JavaScript counterpart of QWebChannel using
- * the \l{Qt WebChannel JavaScript API}.
- *
- * \note The view does not take ownership when explicitly setting a webChannel object.
- */
-
QQmlWebChannel *QQuickWebEngineView::webChannel()
{
Q_D(QQuickWebEngineView);
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index c7625d209..ab2e6a566 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -101,7 +101,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(QQuickWebEngineSettings *settings READ settings REVISION 1)
Q_PROPERTY(QQuickWebEngineHistory *navigationHistory READ navigationHistory CONSTANT FINAL REVISION 1)
Q_PROPERTY(QQmlWebChannel *webChannel READ webChannel WRITE setWebChannel NOTIFY webChannelChanged REVISION 1)
- Q_PROPERTY(QQmlListProperty<QQuickWebEngineScript> userScripts READ userScripts FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickWebEngineScript> userScripts READ userScripts FINAL REVISION 1)
Q_PROPERTY(bool activeFocusOnPress READ activeFocusOnPress WRITE setActiveFocusOnPress NOTIFY activeFocusOnPressChanged REVISION 2)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 2)
@@ -266,9 +266,9 @@ public Q_SLOTS:
void loadHtml(const QString &html, const QUrl &baseUrl = QUrl());
void goBack();
void goForward();
- void goBackOrForward(int index);
+ Q_REVISION(1) void goBackOrForward(int index);
void reload();
- void reloadAndBypassCache();
+ Q_REVISION(1) void reloadAndBypassCache();
void stop();
Q_REVISION(1) void findText(const QString &subString, FindFlags options = 0, const QJSValue &callback = QJSValue());
Q_REVISION(1) void fullScreenCancelled();
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 81ae5b737..656dd13f1 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -106,7 +106,7 @@
\code
import QtQuick 2.1
import QtQuick.Controls 1.1
- import QtWebEngine 1.0
+ import QtWebEngine 1.1
ApplicationWindow {
width: 1280
diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
index 7104b7bd7..6d3d71896 100644
--- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
+++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
@@ -24,7 +24,7 @@
*/
/*!
- \qmlmodule QtWebEngine 1.0
+ \qmlmodule QtWebEngine 1.1
\title Qt WebEngine QML Types
\brief Provides QML types for rendering web content within a QML application
\ingroup qtwebengine-qmlmodules
@@ -34,6 +34,6 @@
\code
import QtQuick 2.0
- import QtWebEngine 1.0
+ import QtWebEngine 1.1
\endcode
*/
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index 5b816454c..76c742aa0 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -21,13 +21,12 @@
*/
// The documentation in this file was imported from QtWebKit and is thus constrained
-// by its LGPL license. Documentation written from scratch for new methods should be
-// placed inline in the code as usual.
+// by its LGPL license.
/*!
\qmltype WebEngineView
\instantiates QQuickWebEngineView
- \inqmlmodule QtWebEngine 1.0
+ \inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.0
\brief A WebEngineView renders web content within a QML application.
*/
@@ -49,6 +48,17 @@
*/
/*!
+ \qmlmethod void WebEngineView::goBackOrForward(int offset)
+ \since QtWebEngine 1.1
+
+ If \a offset is positive, goes forward the specified number of offset
+ pages in the current session history. If offset is negative, it goes
+ back. If the offset is invalid, the page is not changed.
+
+ \sa WebEngineView::goBack, WebEngineView::goForward
+*/
+
+/*!
\qmlmethod void WebEngineView::stop()
Stops loading the current page.
@@ -59,6 +69,16 @@
Reloads the current page. This function is equivalent to the
\c{window.location.reload()} DOM method.
+
+ \sa WebEngineView::reloadAndBypassCache
+*/
+
+/*!
+ \qmlmethod void WebEngineView::reloadAndBypassCache()
+
+ Reloads the current page, ignoring any cached content.
+
+ \sa WebEngineView::reload
*/
/*!
@@ -94,6 +114,7 @@
/*!
\qmlproperty int WebEngineView::loadProgress
+ \readonly
This property holds the amount of the page that has been loaded, expressed
as an integer percentage in the range from \c{0} to \c{100}.
@@ -101,6 +122,7 @@
/*!
\qmlproperty bool WebEngineView::canGoBack
+ \readonly
Returns \c{true} if there are prior session history entries, \c{false}
otherwise.
@@ -108,6 +130,7 @@
/*!
\qmlproperty bool WebEngineView::canGoForward
+ \readonly
Returns \c{true} if there are subsequent session history entries,
\c{false} otherwise.
@@ -115,6 +138,7 @@
/*!
\qmlproperty bool WebEngineView::loading
+ \readonly
Returns \c{true} if the HTML page is currently loading, \c{false} otherwise.
*/
@@ -134,7 +158,65 @@
Returns \c{true} if the web view is in fullscreen mode, \c{false} otherwise.
- \sa WebEngineView::fullScreenRequested(), WebEngineView::fullScreenCancelled()
+ \sa WebEngineView::fullScreenRequested, WebEngineView::fullScreenCancelled
+*/
+
+/*!
+ \qmlproperty WebEngineHistory WebEngineView::navigationHistory
+ \since QtWebEngine 1.1
+ \readonly
+
+ The navigation history of the current view.
+
+ \sa WebEngineHistory
+*/
+
+/*!
+ \qmlproperty QQmlWebChannel WebEngineView::webChannel
+ \since QtWebEngine 1.1
+
+ The web channel instance used by this view.
+ This channel is automatically using the internal QtWebEngine transport mechanism over Chromium IPC,
+ and exposed in the javascript context of the page it is rendering as \c qt.webChannelTransport.
+ This transport object is used when instantiating the JavaScript counterpart of QWebChannel using
+ the \l{Qt WebChannel JavaScript API}.
+
+ \note The view does not take ownership for an assigned webChannel object.
+*/
+
+/*!
+ \qmlproperty WebEngineProfile WebEngineView::profile
+ \since QtWebEngine 1.1
+
+ The current profile used for the view.
+
+ \sa WebEngineProfile
+*/
+
+/*!
+ \qmlproperty WebEngineSettings WebEngineView::settings
+ \readonly
+ \since QtWebEngine 1.1
+
+ Settings used by this view.
+
+ \sa WebEngineSettings
+*/
+
+
+/*!
+ \qmlproperty list<WebEngineScript> WebEngineView::userScripts
+ \readonly
+
+ List of script objects attached to the view.
+*/
+
+/*!
+ \qmlproperty real WebEngineView::zoomFactor
+ \since QtWebEngine 1.1
+
+ Zoom factor for the view. Valid values are within the range from \c{0.25}
+ to \c{5.0}. The default factor is \c{1.0}.
*/
/*!
@@ -153,7 +235,6 @@
\sa WebEngineView::url
*/
-
/*!
\qmlmethod void WebEngineView::runJavaScript(string script, variant callback)
\brief Runs the specified \a script in the content of the web view.
@@ -207,13 +288,15 @@
*/
/*!
- \qmlmethod void WebEngineView::grantFeaturePermission(url securityOrigin, WebEngineView::Feature feature, bool granted)
+ \qmlmethod WebEngineView::grantFeaturePermission(url securityOrigin, Feature feature, bool granted)
+ \since QtWebEngine 1.1
Sets the permission for the web site identified by \a securityOrigin to use \a feature.
- \sa featurePermissionRequested()
+ \sa WebEngineView::featurePermissionRequested
*/
+
/*!
\qmlmethod void WebEngineView::fullScreenCancelled()
\since QtWebEngine 1.1
@@ -235,16 +318,16 @@
}
\endcode
- \sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested()
+ \sa WebEngineView::isFullScreen, WebEngineView::fullScreenRequested
*/
/*!
- \qmlsignal void WebEngineView::featurePermissionRequested(url securityOrigin, WebEngineView::Feature feature)
+ \qmlsignal WebEngineView::featurePermissionRequested(url securityOrigin, Feature feature)
This is signal is emitted when the web site identified by \a securityOrigin requests
to make use of the resource or device identified by \a feature.
- \sa grantFeaturePermission()
+ \sa WebEngineView::grantFeaturePermission
*/
/*!
@@ -288,6 +371,7 @@
/*!
\qmlsignal WebEngineView::certificateError(error)
+ \since QtWebEngine 1.1
This signal is emitted when an invalid certificate error is raised while loading a given request.
@@ -332,6 +416,7 @@
/*!
\qmlsignal WebEngineView::newViewRequested(request)
+ \since QtWebEngine 1.1
This signal is emitted when a page load is requested to happen in a separate
WebEngineView. This can either be because the current page requested it explicitly
@@ -351,7 +436,7 @@
*/
/*!
- \qmlsignal WebEngineView::fullScreenRequested(request)
+ \qmlsignal WebEngineView::fullScreenRequested(WebEngineFullScreenRequest request)
\since QtWebEngine 1.1
This signal is emitted when the web page requests fullscreen mode through the
@@ -367,7 +452,7 @@
This enumeration details various high-level error types.
- \value NoErrorDomain
+ \value WebEngineView::NoErrorDomain
\value WebEngineView::InternalErrorDomain
Content fails to be interpreted by Qt WebEngine.
\value WebEngineView::ConnectionErrorDomain
@@ -474,7 +559,7 @@
\value MediaVideoCapture Video devices, e.g. cameras
\value MediaAudioVideoCapture Both Audio and Video capture devices.
- \sa featurePermissionRequested(), grantFeaturePermission()
+ \sa WebEngineView::featurePermissionRequested, WebEngineView::grantFeaturePermission
*/
@@ -521,5 +606,5 @@
}
\endcode
- \sa WebEngineFullScreenRequest::toggleOn()
+ \sa WebEngineFullScreenRequest::toggleOn
*/
diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
index cebf986d2..9dcded7b0 100644
--- a/src/webengine/plugin/plugins.qmltypes
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -1,12 +1,529 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -noinstantiate -nonrelocatable QtWebEngine 1.0'
+// 'qmlplugindump -nonrelocatable QtWebEngine 1.1'
Module {
+ dependencies: []
+ Component {
+ name: "QAbstractItemModel"
+ prototype: "QObject"
+ Enum {
+ name: "LayoutChangeHint"
+ values: {
+ "NoLayoutChangeHint": 0,
+ "VerticalSortHint": 1,
+ "HorizontalSortHint": 2
+ }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ Parameter { name: "roles"; type: "QVector<int>" }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ }
+ Signal {
+ name: "headerDataChanged"
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutChanged" }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutAboutToBeChanged" }
+ Signal {
+ name: "rowsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal { name: "modelAboutToBeReset" }
+ Signal { name: "modelReset" }
+ Signal {
+ name: "rowsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationRow"; type: "int" }
+ }
+ Signal {
+ name: "rowsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationColumn"; type: "int" }
+ }
+ Signal {
+ name: "columnsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method { name: "submit"; type: "bool" }
+ Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ }
+ Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
+ Component {
+ name: "QQuickItem"
+ defaultProperty: "data"
+ prototype: "QObject"
+ Enum {
+ name: "TransformOrigin"
+ values: {
+ "TopLeft": 0,
+ "Top": 1,
+ "TopRight": 2,
+ "Left": 3,
+ "Center": 4,
+ "Right": 5,
+ "BottomLeft": 6,
+ "Bottom": 7,
+ "BottomRight": 8
+ }
+ }
+ Property { name: "parent"; type: "QQuickItem"; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "x"; type: "double" }
+ Property { name: "y"; type: "double" }
+ Property { name: "z"; type: "double" }
+ Property { name: "width"; type: "double" }
+ Property { name: "height"; type: "double" }
+ Property { name: "opacity"; type: "double" }
+ Property { name: "enabled"; type: "bool" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
+ Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
+ Property { name: "state"; type: "string" }
+ Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
+ Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
+ Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
+ Property { name: "baselineOffset"; type: "double" }
+ Property { name: "clip"; type: "bool" }
+ Property { name: "focus"; type: "bool" }
+ Property { name: "activeFocus"; type: "bool"; isReadonly: true }
+ Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
+ Property { name: "rotation"; type: "double" }
+ Property { name: "scale"; type: "double" }
+ Property { name: "transformOrigin"; type: "TransformOrigin" }
+ Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
+ Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
+ Property { name: "smooth"; type: "bool" }
+ Property { name: "antialiasing"; type: "bool" }
+ Property { name: "implicitWidth"; type: "double" }
+ Property { name: "implicitHeight"; type: "double" }
+ Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "childrenRectChanged"
+ Parameter { type: "QRectF" }
+ }
+ Signal {
+ name: "baselineOffsetChanged"
+ Parameter { type: "double" }
+ }
+ Signal {
+ name: "stateChanged"
+ Parameter { type: "string" }
+ }
+ Signal {
+ name: "focusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "activeFocusOnTabChanged"
+ revision: 1
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "parentChanged"
+ Parameter { type: "QQuickItem"; isPointer: true }
+ }
+ Signal {
+ name: "transformOriginChanged"
+ Parameter { type: "TransformOrigin" }
+ }
+ Signal {
+ name: "smoothChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "antialiasingChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "clipChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "windowChanged"
+ revision: 1
+ Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
+ }
+ Method { name: "update" }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ Parameter { name: "targetSize"; type: "QSize" }
+ }
+ Method {
+ name: "grabToImage"
+ revision: 2
+ type: "bool"
+ Parameter { name: "callback"; type: "QJSValue" }
+ }
+ Method {
+ name: "contains"
+ type: "bool"
+ Parameter { name: "point"; type: "QPointF" }
+ }
+ Method {
+ name: "mapFromItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method {
+ name: "mapToItem"
+ Parameter { type: "QQmlV4Function"; isPointer: true }
+ }
+ Method { name: "forceActiveFocus" }
+ Method {
+ name: "forceActiveFocus"
+ Parameter { name: "reason"; type: "Qt::FocusReason" }
+ }
+ Method {
+ name: "nextItemInFocusChain"
+ revision: 1
+ type: "QQuickItem*"
+ Parameter { name: "forward"; type: "bool" }
+ }
+ Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
+ Method {
+ name: "childAt"
+ type: "QQuickItem*"
+ Parameter { name: "x"; type: "double" }
+ Parameter { name: "y"; type: "double" }
+ }
+ }
+ Component {
+ name: "QQuickWebEngineCertificateError"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngineCertificateError 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Error"
+ values: {
+ "SslPinnedKeyNotInCertificateChain": -150,
+ "CertificateCommonNameInvalid": -200,
+ "CertificateDateInvalid": -201,
+ "CertificateAuthorityInvalid": -202,
+ "CertificateContainsErrors": -203,
+ "CertificateNoRevocationMechanism": -204,
+ "CertificateUnableToCheckRevocation": -205,
+ "CertificateRevoked": -206,
+ "CertificateInvalid": -207,
+ "CertificateWeakSignatureAlgorithm": -208,
+ "CertificateNonUniqueName": -210,
+ "CertificateWeakKey": -211,
+ "CertificateNameConstraintViolation": -212
+ }
+ }
+ Property { name: "url"; type: "QUrl"; isReadonly: true }
+ Property { name: "error"; type: "Error"; isReadonly: true }
+ Property { name: "description"; type: "string"; isReadonly: true }
+ Property { name: "overridable"; type: "bool"; isReadonly: true }
+ Method { name: "defer" }
+ Method { name: "ignoreCertificateError" }
+ Method { name: "rejectCertificate" }
+ }
+ Component {
+ name: "QQuickWebEngineDownloadItem"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngineDownloadItem 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "DownloadState"
+ values: {
+ "DownloadRequested": 0,
+ "DownloadInProgress": 1,
+ "DownloadCompleted": 2,
+ "DownloadCancelled": 3,
+ "DownloadInterrupted": 4
+ }
+ }
+ Property { name: "id"; type: "uint"; isReadonly: true }
+ Property { name: "state"; type: "DownloadState"; isReadonly: true }
+ Property { name: "totalBytes"; type: "qlonglong"; isReadonly: true }
+ Property { name: "receivedBytes"; type: "qlonglong"; isReadonly: true }
+ Property { name: "path"; type: "string" }
+ Method { name: "accept" }
+ Method { name: "cancel" }
+ }
+ Component {
+ name: "QQuickWebEngineFullScreenRequest"
+ exports: ["QtWebEngine/FullScreenRequest 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "toggleOn"; type: "bool"; isReadonly: true }
+ Method { name: "accept" }
+ }
+ Component {
+ name: "QQuickWebEngineHistory"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtWebEngine/NavigationHistory 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property {
+ name: "items"
+ type: "QQuickWebEngineHistoryListModel"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "backItems"
+ type: "QQuickWebEngineHistoryListModel"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "forwardItems"
+ type: "QQuickWebEngineHistoryListModel"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ name: "QQuickWebEngineHistoryListModel"
+ prototype: "QAbstractListModel"
+ exports: ["QtWebEngine/NavigationHistoryListModel 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ }
Component {
name: "QQuickWebEngineLoadRequest"
prototype: "QObject"
@@ -37,7 +554,7 @@ Module {
Component {
name: "QQuickWebEngineNewViewRequest"
prototype: "QObject"
- exports: ["QtWebEngine/WebEngineNewViewRequest 1.0"]
+ exports: ["QtWebEngine/WebEngineNewViewRequest 1.1"]
isCreatable: false
exportMetaObjectRevisions: [0]
Property {
@@ -52,11 +569,163 @@ Module {
}
}
Component {
+ name: "QQuickWebEngineProfile"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngineProfile 1.1"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "HttpCacheType"
+ values: {
+ "MemoryHttpCache": 0,
+ "DiskHttpCache": 1
+ }
+ }
+ Enum {
+ name: "PersistentCookiesPolicy"
+ values: {
+ "NoPersistentCookies": 0,
+ "AllowPersistentCookies": 1,
+ "ForcePersistentCookies": 2
+ }
+ }
+ Property { name: "storageName"; type: "string" }
+ Property { name: "offTheRecord"; type: "bool" }
+ Property { name: "persistentStoragePath"; type: "string" }
+ Property { name: "cachePath"; type: "string" }
+ Property { name: "httpUserAgent"; type: "string" }
+ Property { name: "httpCacheType"; type: "HttpCacheType" }
+ Property { name: "persistentCookiesPolicy"; type: "PersistentCookiesPolicy" }
+ Property { name: "httpCacheMaximumSize"; type: "int" }
+ Signal {
+ name: "downloadRequested"
+ Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
+ }
+ Signal {
+ name: "downloadFinished"
+ Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QQuickWebEngineScript"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngineScript 1.1"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "InjectionPoint"
+ values: {
+ "Deferred": 0,
+ "DocumentReady": 1,
+ "DocumentCreation": 2
+ }
+ }
+ Enum {
+ name: "ScriptWorldId"
+ values: {
+ "MainWorld": 0,
+ "ApplicationWorld": 1,
+ "UserWorld": 2
+ }
+ }
+ Property { name: "name"; type: "string" }
+ Property { name: "sourceUrl"; type: "QUrl" }
+ Property { name: "sourceCode"; type: "string" }
+ Property { name: "injectionPoint"; type: "InjectionPoint" }
+ Property { name: "worldId"; type: "ScriptWorldId" }
+ Property { name: "runOnSubframes"; type: "bool" }
+ Signal {
+ name: "nameChanged"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Signal {
+ name: "sourceUrlChanged"
+ Parameter { name: "arg"; type: "QUrl" }
+ }
+ Signal {
+ name: "sourceCodeChanged"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Signal {
+ name: "injectionPointChanged"
+ Parameter { name: "arg"; type: "InjectionPoint" }
+ }
+ Signal {
+ name: "worldIdChanged"
+ Parameter { name: "arg"; type: "ScriptWorldId" }
+ }
+ Signal {
+ name: "runOnSubframesChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setName"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setSourceUrl"
+ Parameter { name: "arg"; type: "QUrl" }
+ }
+ Method {
+ name: "setSourceCode"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setInjectionPoint"
+ Parameter { name: "arg"; type: "InjectionPoint" }
+ }
+ Method {
+ name: "setWorldId"
+ Parameter { name: "arg"; type: "ScriptWorldId" }
+ }
+ Method {
+ name: "setRunOnSubframes"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method { name: "toString"; type: "string" }
+ }
+ Component {
+ name: "QQuickWebEngineSettings"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngineSettings 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "autoLoadImages"; type: "bool" }
+ Property { name: "javascriptEnabled"; type: "bool" }
+ Property { name: "javascriptCanOpenWindows"; type: "bool" }
+ Property { name: "javascriptCanAccessClipboard"; type: "bool" }
+ Property { name: "linksIncludedInFocusChain"; type: "bool" }
+ Property { name: "localStorageEnabled"; type: "bool" }
+ Property { name: "localContentCanAccessRemoteUrls"; type: "bool" }
+ Property { name: "spatialNavigationEnabled"; type: "bool" }
+ Property { name: "localContentCanAccessFileUrls"; type: "bool" }
+ Property { name: "hyperlinkAuditingEnabled"; type: "bool" }
+ Property { name: "errorPageEnabled"; type: "bool" }
+ Property { name: "defaultTextEncoding"; type: "string" }
+ }
+ Component {
+ name: "QQuickWebEngineSingleton"
+ prototype: "QObject"
+ exports: ["QtWebEngine/WebEngine 1.1"]
+ isCreatable: false
+ isSingleton: true
+ exportMetaObjectRevisions: [0]
+ Property { name: "settings"; type: "QQuickWebEngineSettings"; isReadonly: true; isPointer: true }
+ Property {
+ name: "defaultProfile"
+ revision: 1
+ type: "QQuickWebEngineProfile"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
name: "QQuickWebEngineView"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["QtWebEngine/WebEngineView 1.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtWebEngine/WebEngineView 1.0",
+ "QtWebEngine/WebEngineView 1.1"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Enum {
name: "NavigationRequestAction"
values: {
@@ -101,7 +770,17 @@ Module {
values: {
"NewViewInWindow": 0,
"NewViewInTab": 1,
- "NewViewInDialog": 2
+ "NewViewInDialog": 2,
+ "NewViewInBackgroundTab": 3
+ }
+ }
+ Enum {
+ name: "Feature"
+ values: {
+ "MediaAudioCapture": 0,
+ "MediaVideoCapture": 1,
+ "MediaAudioVideoCapture": 2,
+ "Geolocation": 3
}
}
Enum {
@@ -112,6 +791,13 @@ Module {
"ErrorMessageLevel": 2
}
}
+ Enum {
+ name: "FindFlags"
+ values: {
+ "FindBackward": 1,
+ "FindCaseSensitively": 2
+ }
+ }
Property { name: "url"; type: "QUrl" }
Property { name: "icon"; type: "QUrl"; isReadonly: true }
Property { name: "loading"; type: "bool"; isReadonly: true }
@@ -119,6 +805,31 @@ Module {
Property { name: "title"; type: "string"; isReadonly: true }
Property { name: "canGoBack"; type: "bool"; isReadonly: true }
Property { name: "canGoForward"; type: "bool"; isReadonly: true }
+ Property { name: "isFullScreen"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "zoomFactor"; revision: 1; type: "double" }
+ Property { name: "profile"; revision: 1; type: "QQuickWebEngineProfile"; isPointer: true }
+ Property {
+ name: "settings"
+ revision: 1
+ type: "QQuickWebEngineSettings"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "navigationHistory"
+ revision: 1
+ type: "QQuickWebEngineHistory"
+ isReadonly: true
+ isPointer: true
+ }
+ Property { name: "webChannel"; revision: 1; type: "QQmlWebChannel"; isPointer: true }
+ Property {
+ name: "userScripts"
+ revision: 1
+ type: "QQuickWebEngineScript"
+ isList: true
+ isReadonly: true
+ }
Signal {
name: "loadingChanged"
Parameter { name: "loadRequest"; type: "QQuickWebEngineLoadRequest"; isPointer: true }
@@ -138,6 +849,35 @@ Module {
Parameter { name: "lineNumber"; type: "int" }
Parameter { name: "sourceID"; type: "string" }
}
+ Signal {
+ name: "certificateError"
+ revision: 1
+ Parameter { name: "error"; type: "QQuickWebEngineCertificateError"; isPointer: true }
+ }
+ Signal {
+ name: "fullScreenRequested"
+ revision: 1
+ Parameter { name: "request"; type: "QQuickWebEngineFullScreenRequest" }
+ }
+ Signal { name: "isFullScreenChanged"; revision: 1 }
+ Signal {
+ name: "featurePermissionRequested"
+ revision: 1
+ Parameter { name: "securityOrigin"; type: "QUrl" }
+ Parameter { name: "feature"; type: "Feature" }
+ }
+ Signal {
+ name: "newViewRequested"
+ revision: 1
+ Parameter { name: "request"; type: "QQuickWebEngineNewViewRequest"; isPointer: true }
+ }
+ Signal {
+ name: "zoomFactorChanged"
+ revision: 1
+ Parameter { name: "arg"; type: "double" }
+ }
+ Signal { name: "profileChanged"; revision: 1 }
+ Signal { name: "webChannelChanged"; revision: 1 }
Method {
name: "runJavaScript"
Parameter { type: "string" }
@@ -158,7 +898,39 @@ Module {
}
Method { name: "goBack" }
Method { name: "goForward" }
+ Method {
+ name: "goBackOrForward"
+ revision: 1
+ Parameter { name: "index"; type: "int" }
+ }
Method { name: "reload" }
+ Method { name: "reloadAndBypassCache"; revision: 1 }
Method { name: "stop" }
+ Method {
+ name: "findText"
+ revision: 1
+ Parameter { name: "subString"; type: "string" }
+ Parameter { name: "options"; type: "FindFlags" }
+ Parameter { name: "callback"; type: "QJSValue" }
+ }
+ Method {
+ name: "findText"
+ revision: 1
+ Parameter { name: "subString"; type: "string" }
+ Parameter { name: "options"; type: "FindFlags" }
+ }
+ Method {
+ name: "findText"
+ revision: 1
+ Parameter { name: "subString"; type: "string" }
+ }
+ Method { name: "fullScreenCancelled"; revision: 1 }
+ Method {
+ name: "grantFeaturePermission"
+ revision: 1
+ Parameter { name: "securityOrigin"; type: "QUrl" }
+ Parameter { type: "Feature" }
+ Parameter { name: "granted"; type: "bool" }
+ }
}
}
diff --git a/src/webengine/ui/Menu.qml b/src/webengine/ui/Menu.qml
index e6fec297f..6ecf650e8 100644
--- a/src/webengine/ui/Menu.qml
+++ b/src/webengine/ui/Menu.qml
@@ -38,8 +38,17 @@ import QtQuick 2.5
import QtQuick.Controls 1.4 as Controls
Controls.Menu {
+ id: menu
signal done()
// Use private API for now
- onAboutToHide: done();
+ onAboutToHide: doneTimer.start();
+
+ // WORKAROUND On Mac the Menu may be destroyed before the MenuItem
+ // is actually triggered (see qtbase commit 08cc9b9991ae9ab51)
+ Timer {
+ id: doneTimer
+ interval: 100
+ onTriggered: menu.done()
+ }
}