From a864df85a9e46c5dcd7a03a444d3b8a7717946f7 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 30 Jun 2021 14:04:31 +0200 Subject: Doc: Fix documentation issues for Qt WebEngine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API and documentation changes since 5.15 caused multiple warnings from QDoc; this change addresses most of them. Some warnings indicate missing documentation, those issues still remain. Change-Id: I96be38b7daac37a7e35c149b4b3ec3f18c4415c9 Reviewed-by: Topi Reiniƶ (cherry picked from commit c248844b3b8ee004800606d1a6c6e6d6bee31738) Reviewed-by: Qt Cherry-pick Bot --- .../html2pdf/doc/src/html2pdf.qdoc | 10 ++++----- .../webenginewidgets/printme/doc/src/printme.qdoc | 2 +- .../simplebrowser/doc/src/simplebrowser.qdoc | 24 +++++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) (limited to 'examples/webenginewidgets') diff --git a/examples/webenginewidgets/html2pdf/doc/src/html2pdf.qdoc b/examples/webenginewidgets/html2pdf/doc/src/html2pdf.qdoc index 37fe3eb50..c60bc6d0b 100644 --- a/examples/webenginewidgets/html2pdf/doc/src/html2pdf.qdoc +++ b/examples/webenginewidgets/html2pdf/doc/src/html2pdf.qdoc @@ -43,9 +43,9 @@ In order to convert a web page into a PDF document we need to: \list 1 - \li Create a \l QWebEnginePage. - \li Tell the \l QWebEnginePage to begin loading the target URL and wait for it to finish. - \li Tell the \l QWebEnginePage to begin converting the loaded page into a PDF file and again wait for it to finish. + \li Create a \l QWebEngineView. + \li Tell the \l QWebEngineView to begin loading the target URL and wait for it to finish. + \li Tell the \l QWebEngineView to begin converting the loaded page into a PDF file and again wait for it to finish. \li Once the conversion is finished, exit the program. \endlist @@ -56,8 +56,8 @@ \printuntil Html2PdfConverter \printuntil /^\};/ - In the constructor we create the \l QWebEnginePage and connect to its \l - QWebEnginePage::loadFinished and \l QWebEnginePage::pdfPrintingFinished + In the constructor we create the \l QWebEngineView and connect to its \l + QWebEngineView::loadFinished and \l QWebEngineView::pdfPrintingFinished signals: \skipto Html2PdfConverter::Html2PdfConverter diff --git a/examples/webenginewidgets/printme/doc/src/printme.qdoc b/examples/webenginewidgets/printme/doc/src/printme.qdoc index d05d5147b..1ba37d0c3 100644 --- a/examples/webenginewidgets/printme/doc/src/printme.qdoc +++ b/examples/webenginewidgets/printme/doc/src/printme.qdoc @@ -82,7 +82,7 @@ \skipto PrintHandler::printDocument( \printuntil /^\}/ - To do actual painting on a printer, we call the \l{QWebEnginePage::print()} + To do actual painting on a printer, we call the \l QWebEngineView::print() function. Because this call blocks the main event loop, we need to create a local one. We begin the local event loop by calling \l{QEventLoop::exec()}. When the local event loop terminates, diff --git a/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc b/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc index 905fc3244..2e68df337 100644 --- a/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc +++ b/examples/webenginewidgets/simplebrowser/doc/src/simplebrowser.qdoc @@ -197,22 +197,26 @@ \printuntil menu->popup \printline } - \section1 Implementing WebPage Functionality + \section1 Implementing WebPage and WebView Functionality - We implement \c WebPage as a subclass of QWebEnginePage to enable HTTP, - proxy authentication, and ignoring SSL certificate errors when accessing web - pages: + We implement \c WebPage as a subclass of QWebEnginePage and \c WebView as + as subclass of QWebEngineView to enable HTTP, proxy authentication, as well + as ignoring SSL certificate errors when accessing web pages: \quotefromfile webenginewidgets/simplebrowser/webpage.h \skipto WebPage : \printuntil } + \quotefromfile webenginewidgets/simplebrowser/webview.h + \skipto WebView : + \printuntil } + In all the cases above, we display the appropriate dialog to the user. In case of authentication, we need to set the correct credential values on the QAuthenticator object: - \quotefromfile webenginewidgets/simplebrowser/webpage.cpp - \skipto WebPage::handleAuthenticationRequired( + \quotefromfile webenginewidgets/simplebrowser/webview.cpp + \skipto WebView::handleAuthenticationRequired( \printuntil } \printuntil } \printline } @@ -281,8 +285,8 @@ \skipto private: \printline private: \dots - \skipto m_otrProfile - \printline m_otrProfile + \skipto m_profile + \printline m_profile \printline /^\};$/ Required profile for \e{private browsing} is created together with its @@ -292,7 +296,7 @@ \quotefromfile webenginewidgets/simplebrowser/browser.cpp \skipto Browser::createWindow - \printuntil m_otrProfile.reset + \printuntil m_profile.reset \dots All that is left to do is to pass the appropriate profile down to the @@ -302,7 +306,7 @@ \e{off-the-record} profile instance: \dots - \skipto m_otrProfile.get + \skipto m_profile.get \printuntil mainWindow = new BrowserWindow \skipto return mainWindow \printuntil /^\}/ -- cgit v1.2.3