summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp10
-rw-r--r--src/webengine/api/qquickwebengineview_p.h12
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc40
4 files changed, 35 insertions, 29 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 6d1060661..23cd25366 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -420,10 +420,10 @@ void QQuickWebEngineViewPrivate::didUpdateTargetURL(const QUrl &hoveredUrl)
Q_EMIT q->linkHovered(hoveredUrl);
}
-void QQuickWebEngineViewPrivate::wasRecentlyAudibleChanged(bool wasRecentlyAudible)
+void QQuickWebEngineViewPrivate::recentlyAudibleChanged(bool recentlyAudible)
{
Q_Q(QQuickWebEngineView);
- Q_EMIT q->wasRecentlyAudibleChanged(wasRecentlyAudible);
+ Q_EMIT q->recentlyAudibleChanged(recentlyAudible);
}
QRectF QQuickWebEngineViewPrivate::viewportRect() const
@@ -1187,10 +1187,10 @@ void QQuickWebEngineView::setAudioMuted(bool muted) {
}
}
-bool QQuickWebEngineView::wasRecentlyAudible()
+bool QQuickWebEngineView::recentlyAudible() const
{
- Q_D(QQuickWebEngineView);
- return d->adapter->wasRecentlyAudible();
+ const Q_D(QQuickWebEngineView);
+ return d->adapter->recentlyAudible();
}
void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation)
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 390b46429..595da26cd 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -113,7 +113,8 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged REVISION 2)
Q_PROPERTY(QSizeF contentsSize READ contentsSize NOTIFY contentsSizeChanged FINAL REVISION 3)
Q_PROPERTY(QPointF scrollPosition READ scrollPosition NOTIFY scrollPositionChanged FINAL REVISION 3)
- Q_PROPERTY(bool audioMuted READ isAudioMuted WRITE setAudioMuted NOTIFY audioMutedChanged REVISION 3)
+ Q_PROPERTY(bool audioMuted READ isAudioMuted WRITE setAudioMuted NOTIFY audioMutedChanged FINAL REVISION 3)
+ Q_PROPERTY(bool recentlyAudible READ recentlyAudible NOTIFY recentlyAudibleChanged FINAL REVISION 3)
Q_PROPERTY(uint webChannelWorld READ webChannelWorld WRITE setWebChannelWorld NOTIFY webChannelWorldChanged REVISION 3)
#ifdef ENABLE_QML_TESTSUPPORT_API
@@ -447,6 +448,10 @@ public:
uint webChannelWorld() const;
void setWebChannelWorld(uint);
+ bool isAudioMuted() const;
+ void setAudioMuted(bool muted);
+ bool recentlyAudible() const;
+
#ifdef ENABLE_QML_TESTSUPPORT_API
QQuickWebEngineTestSupport *testSupport() const;
void setTestSupport(QQuickWebEngineTestSupport *testSupport);
@@ -469,9 +474,6 @@ public Q_SLOTS:
Q_REVISION(1) void grantFeaturePermission(const QUrl &securityOrigin, Feature, bool granted);
Q_REVISION(2) void setActiveFocusOnPress(bool arg);
Q_REVISION(2) void triggerWebAction(WebAction action);
- Q_REVISION(3) bool isAudioMuted() const;
- Q_REVISION(3) void setAudioMuted(bool muted);
- Q_REVISION(3) bool wasRecentlyAudible();
Q_REVISION(3) void printToPdf(const QString &filePath, PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait);
Q_REVISION(3) void printToPdf(PrintedPageSizeId pageSizeId = PrintedPageSizeId::A4, PrintedPageOrientation orientation = PrintedPageOrientation::Portrait, const QJSValue &callback = QJSValue());
@@ -502,7 +504,7 @@ Q_SIGNALS:
Q_REVISION(3) void contentsSizeChanged(const QSizeF& size);
Q_REVISION(3) void scrollPositionChanged(const QPointF& position);
Q_REVISION(3) void audioMutedChanged(bool muted);
- Q_REVISION(3) void wasRecentlyAudibleChanged(bool wasRecentlyAudible);
+ Q_REVISION(3) void recentlyAudibleChanged(bool recentlyAudible);
Q_REVISION(3) void webChannelWorldChanged(uint);
protected:
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 05c2228c4..d3d6603f5 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -135,7 +135,7 @@ public:
virtual void loadProgressChanged(int progress) Q_DECL_OVERRIDE;
virtual void didUpdateTargetURL(const QUrl&) Q_DECL_OVERRIDE;
virtual void selectionChanged() Q_DECL_OVERRIDE { }
- virtual void wasRecentlyAudibleChanged(bool wasRecentlyAudible) Q_DECL_OVERRIDE;
+ virtual void recentlyAudibleChanged(bool recentlyAudible) Q_DECL_OVERRIDE;
virtual QRectF viewportRect() const Q_DECL_OVERRIDE;
virtual qreal dpiScale() const Q_DECL_OVERRIDE;
virtual QColor backgroundColor() const Q_DECL_OVERRIDE;
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index bcabe2152..a52c6c248 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -1033,22 +1033,39 @@
\qmlproperty bool WebEngineView::audioMuted
\brief The state of whether the current page audio is muted.
\since QtWebEngine 1.3
+ \sa recentlyAudible
*/
/*!
- \qmlsignal void WebEngineView::audioMutedChanged(bool muted)
+ \qmlsignal WebEngineView::audioMutedChanged(bool muted)
\since QtWebEngine 1.3
- This signal is emitted when the page's audio is (un)muted using setAudioMuted method.
+ This signal is emitted when the page's audio is (un)muted using audioMuted property.
\note Not to be confused with a specific HTML5 audio / video element being muted.
+
+ \sa audioMuted
+*/
+
+/*!
+ \qmlproperty bool WebEngineView::recentlyAudible
+ \brief Returns the current page's audible state (audio was recently played, or not).
+ \since QtWebEngine 1.3
+ \readonly
+ \sa audioMuted
*/
/*!
- \qmlmethod bool WebEngineView::wasRecentlyAudible()
+ \qmlsignal WebEngineView::recentlyAudibleChanged(bool recentlyAudible)
\since QtWebEngine 1.3
- \sa wasRecentlyAudibleChanged()
- Returns the current page's audible state (audio was recently played, or not).
+ This signal is emitted when the page's audible state is changed, due to audio
+ being played or stopped.
+
+ \note The signal is also emitted when the audioMuted property changes.
+ Also if the audio is paused, this signal is emitted with an approximate \b{two-second
+ delay}, from the moment the audio is paused.
+
+ \sa recentlyAudible
*/
/*!
@@ -1069,16 +1086,3 @@
The \a resultCallback must take a string parameter. This string will contain the document's data upon successful printing and an empty
string otherwise.
*/
-
-
-/*!
- \qmlsignal void WebEngineView::wasRecentlyAudibleChanged(bool wasRecentlyAudible)
- \since QtWebEngine 1.3
-
- This signal is emitted when the page's audible state is changed, due to audio
- being played or stopped.
-
- \note The signal is also emitted when calling the setAudioMuted method.
- Also if the audio is paused, this signal is emitted with an approximate \b{2 second
- delay}, from the moment the audio is paused.
-*/