From 104adb064e0a639f3e4b6eb12c978ddc515ded26 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 1 Mar 2018 11:52:51 +0100 Subject: Doc: Fix doc generation for some QWebEnginePage functions Remove #ifdef Q_QDOC defines and fix the command signatures in \fn commands or remove the commands, where possible. Task-number: QTBUG-66709 Change-Id: Ic591b53f0d52c7c938d8651cd6610f31af0cc540 Reviewed-by: Kai Koehne --- src/webenginewidgets/api/qwebenginepage.cpp | 2 - src/webenginewidgets/api/qwebenginepage.h | 26 +---------- .../doc/src/qwebenginepage_lgpl.qdoc | 51 +++------------------- 3 files changed, 9 insertions(+), 70 deletions(-) (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 497083f4d..f475d660a 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -2183,7 +2183,6 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page /*! - \fn void QWebEnginePage::printToPdf(FunctorOrLambda resultCallback, const QPageLayout &pageLayout) Renders the current content of the page into a PDF document and returns a byte array containing the PDF data as parameter to \a resultCallback. The page size and orientation of the produced PDF document are taken from the values specified in \a pageLayout. @@ -2213,7 +2212,6 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback &res } /*! - \fn void QWebEnginePage::print(QPrinter *printer, FunctorOrLambda resultCallback) Renders the current content of the page into a temporary PDF document, then prints it using \a printer. The settings for creating and printing the PDF document will be retrieved from the \a printer diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index d716765fe..f81ba7373 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -243,12 +243,9 @@ public: void replaceMisspelledWord(const QString &replacement); virtual bool event(QEvent*); -#ifdef Q_QDOC - void findText(const QString &subString, FindFlags options = FindFlags()); - void findText(const QString &subString, FindFlags options, FunctorOrLambda resultCallback); -#else + void findText(const QString &subString, FindFlags options = FindFlags(), const QWebEngineCallback &resultCallback = QWebEngineCallback()); -#endif + QMenu *createStandardContextMenu(); void setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy); @@ -259,13 +256,8 @@ public: void setHtml(const QString &html, const QUrl &baseUrl = QUrl()); void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl()); -#ifdef Q_QDOC - void toHtml(FunctorOrLambda resultCallback) const; - void toPlainText(FunctorOrLambda resultCallback) const; -#else void toHtml(const QWebEngineCallback &resultCallback) const; void toPlainText(const QWebEngineCallback &resultCallback) const; -#endif QString title() const; void setUrl(const QUrl &url); @@ -282,13 +274,8 @@ public: void runJavaScript(const QString& scriptSource); void runJavaScript(const QString& scriptSource, quint32 worldId); -#ifdef Q_QDOC - void runJavaScript(const QString& scriptSource, FunctorOrLambda resultCallback); - void runJavaScript(const QString& scriptSource, quint32 worldId, FunctorOrLambda resultCallback); -#else void runJavaScript(const QString& scriptSource, const QWebEngineCallback &resultCallback); void runJavaScript(const QString& scriptSource, quint32 worldId, const QWebEngineCallback &resultCallback); -#endif QWebEngineScriptCollection &scripts(); QWebEngineSettings *settings() const; @@ -306,17 +293,8 @@ public: bool recentlyAudible() const; void printToPdf(const QString &filePath, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); -#ifdef Q_QDOC - void printToPdf(FunctorOrLambda resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); -#else void printToPdf(const QWebEngineCallback &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); -#endif - -#ifdef Q_QDOC - void print(QPrinter *printer, FunctorOrLambda resultCallback); -#else void print(QPrinter *printer, const QWebEngineCallback &resultCallback); -#endif // QDOC void setInspectedPage(QWebEnginePage *page); QWebEnginePage *inspectedPage() const; diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 2c161e2df..3013903c8 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -467,14 +467,7 @@ */ /*! - \fn void QWebEnginePage::findText(const QString &subString, FindFlags options) - Finds the specified string, \a subString, in the page, using the given \a options. - - To clear the search highlight, just pass an empty string. -*/ - -/*! - \fn void QWebEnginePage::findText(const QString &subString, FindFlags options, FunctorOrLambda resultCallback) + \fn void QWebEnginePage::findText(const QString &subString, QWebEnginePage::FindFlags options = FindFlags(), const QWebEngineCallback &resultCallback = QWebEngineCallback()) Finds the specified string, \a subString, in the page, using the given \a options. To clear the search highlight, just pass an empty string. @@ -604,7 +597,7 @@ */ /*! - \fn void QWebEnginePage::toHtml(FunctorOrLambda resultCallback) const + \fn void QWebEnginePage::toHtml(const QWebEngineCallback &resultCallback) const Asynchronous method to retrieve the page's content as HTML, enclosed in HTML and BODY tags. Upon successful completion, \a resultCallback is called with the page's content. @@ -614,7 +607,7 @@ */ /*! - \fn void QWebEnginePage::toPlainText(FunctorOrLambda resultCallback) const + \fn void QWebEnginePage::toPlainText(const QWebEngineCallback &resultCallback) const Asynchronous method to retrieve the page's content converted to plain text, completely stripped of all HTML formatting. Upon successful completion, \a resultCallback is called with the page's content. @@ -718,7 +711,10 @@ */ /*! - \fn void QWebEnginePage::runJavaScript(const QString& scriptSource, quint32 worldId, FunctorOrLambda resultCallback) + \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId, const QWebEngineCallback &resultCallback) + \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId) + \fn void QWebEnginePage::runJavaScript(const QString& scriptSource) + \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, const QWebEngineCallback &resultCallback) \since 5.7 Runs the JavaScript code contained in \a scriptSource in the world specified by \a worldId. @@ -742,39 +738,6 @@ \sa QWebEngineScript::ScriptWorldId */ -/*! - \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId) - \since 5.7 - \overload runJavaScript() - - This convenience function runs the JavaScript code contained in \a scriptSource in the world - specified by \a worldId. -*/ - -/*! - \fn void QWebEnginePage::runJavaScript(const QString& scriptSource) - \overload runJavaScript() - - This convenience function runs the JavaScript code contained in \a scriptSource in the same - world as other scripts that are part of the loaded site. - - \sa QWebEngineScript::MainWorld -*/ - -/*! - \fn void QWebEnginePage::runJavaScript(const QString& scriptSource, FunctorOrLambda resultCallback) - \overload runJavaScript() - - Runs the JavaScript code contained in \a scriptSource. - - The script will run in the same world as other scripts that are part of the loaded site. - - When the script has been executed, \a resultCallback is called with the result of the last - executed statement. - - \sa QWebEngineScript::MainWorld -*/ - /*! \fn void QWebEnginePage::setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy) -- cgit v1.2.3