From 062b9bf3cf202b199892ca7bbe6d934c9b059022 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 19 Sep 2016 15:10:24 +0200 Subject: Doc: Fix types of \qmlproperty Change-Id: Ie355f72a0bf575e66ab465fb2fcada0430ed8c7c Reviewed-by: Leena Miettinen --- src/webengine/api/qquickwebenginedownloaditem.cpp | 6 +++--- src/webengine/api/qquickwebengineprofile.cpp | 10 +++++----- src/webengine/api/qquickwebenginesettings.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp index 4e71c750d..08a8f15e9 100644 --- a/src/webengine/api/qquickwebenginedownloaditem.cpp +++ b/src/webengine/api/qquickwebenginedownloaditem.cpp @@ -158,7 +158,7 @@ void QQuickWebEngineDownloadItem::cancel() } /*! - \qmlproperty quint32 WebEngineDownloadItem::id + \qmlproperty int WebEngineDownloadItem::id Holds the download item's ID. */ @@ -217,7 +217,7 @@ qint64 QQuickWebEngineDownloadItem::receivedBytes() const } /*! - \qmlproperty QString WebEngineDownloadItem::mimeType + \qmlproperty string WebEngineDownloadItem::mimeType \since QtWebEngine 1.2 Holds the MIME type of the download. @@ -230,7 +230,7 @@ QString QQuickWebEngineDownloadItem::mimeType() const } /*! - \qmlproperty QString WebEngineDownloadItem::path + \qmlproperty string WebEngineDownloadItem::path Holds the full target path where data is being downloaded to. diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 013696f7e..3af027b73 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -264,7 +264,7 @@ QQuickWebEngineProfile::~QQuickWebEngineProfile() } /*! - \qmlproperty QString WebEngineProfile::storageName + \qmlproperty string WebEngineProfile::storageName The storage name that is used to create separate subdirectories for each profile that uses the disk for storing persistent data and cache. @@ -343,7 +343,7 @@ void QQuickWebEngineProfile::setOffTheRecord(bool offTheRecord) } /*! - \qmlproperty QString WebEngineProfile::persistentStoragePath + \qmlproperty string WebEngineProfile::persistentStoragePath 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. @@ -380,7 +380,7 @@ void QQuickWebEngineProfile::setPersistentStoragePath(const QString &path) } /*! - \qmlproperty QString WebEngineProfile::cachePath + \qmlproperty string WebEngineProfile::cachePath The path to the location where the profile's caches are stored, in particular the HTTP cache. @@ -415,7 +415,7 @@ void QQuickWebEngineProfile::setCachePath(const QString &path) } /*! - \qmlproperty QString WebEngineProfile::httpUserAgent + \qmlproperty string WebEngineProfile::httpUserAgent The user-agent string sent with HTTP to identify the browser. */ @@ -548,7 +548,7 @@ void QQuickWebEngineProfile::setHttpCacheMaximumSize(int maximumSize) } /*! - \qmlproperty QString WebEngineProfile::httpAcceptLanguage + \qmlproperty string WebEngineProfile::httpAcceptLanguage The value of the Accept-Language HTTP request-header field. diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp index 525d6c8c4..c15115e60 100644 --- a/src/webengine/api/qquickwebenginesettings.cpp +++ b/src/webengine/api/qquickwebenginesettings.cpp @@ -235,7 +235,7 @@ bool QQuickWebEngineSettings::fullScreenSupportEnabled() const } /*! - \qmlproperty QString WebEngineSettings::defaultTextEncoding + \qmlproperty string WebEngineSettings::defaultTextEncoding \since QtWebEngine 1.2 Sets the default encoding. The value must be a string describing an encoding such as "utf-8" or -- cgit v1.2.3 From bfc2683ab4ca3f56a2effd1b2f7e68850acb72ba Mon Sep 17 00:00:00 2001 From: Christophe Chapuis Date: Sun, 4 Sep 2016 14:37:57 +0000 Subject: Fix crash when using openIn on newly created view When a link triggers a NewViewRequest, and the latter creates a new window with a new WebEngineView inside, the "adapter" pointer can still be NULL when the adoptWebContents is called by openIn. Therefore is it necessary to test the adapter pointer before using it. Task-number: QTBUG-55765 Change-Id: Ia1a299dd65c229705462c9444b81d7b26567fc09 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebengineview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 68dfae145..4eca71926 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -755,8 +755,10 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent // This throws away the WebContentsAdapter that has been used until now. // All its states, particularly the loading URL, are replaced by the adopted WebContentsAdapter. - WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis()); - adapterOwner->deleteLater(); + if (adapter) { + WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis()); + adapterOwner->deleteLater(); + } adapter = webContents->sharedFromThis(); adapter->initialize(this); -- cgit v1.2.3 From ec84507898e58a167b185ba674acf300cc695380 Mon Sep 17 00:00:00 2001 From: Christophe Chapuis Date: Sun, 4 Sep 2016 14:37:57 +0000 Subject: Fix crash when using openIn on newly created view When a link triggers a NewViewRequest, and the latter creates a new window with a new WebEngineView inside, the "adapter" pointer can still be NULL when the adoptWebContents is called by openIn. Therefore is it necessary to test the adapter pointer before using it. (cherry picked from commit bfc2683ab4ca3f56a2effd1b2f7e68850acb72ba) Task-number: QTBUG-55765 Change-Id: Iaa7cb4e8c7780a2e3f1a8c85b7b5da0ec541b2f3 Reviewed-by: Jani Heikkinen --- src/webengine/api/qquickwebengineview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 68dfae145..4eca71926 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -755,8 +755,10 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent // This throws away the WebContentsAdapter that has been used until now. // All its states, particularly the loading URL, are replaced by the adopted WebContentsAdapter. - WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis()); - adapterOwner->deleteLater(); + if (adapter) { + WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis()); + adapterOwner->deleteLater(); + } adapter = webContents->sharedFromThis(); adapter->initialize(this); -- cgit v1.2.3