diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-03-01 11:52:51 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-03-08 13:01:53 +0000 |
commit | 104adb064e0a639f3e4b6eb12c978ddc515ded26 (patch) | |
tree | bb7eec453f50b7388a5e2ac8906c1d60de18beab | |
parent | d90885ba4885535bad6166bf1427141819e90fec (diff) |
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 <kai.koehne@qt.io>
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.h | 26 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 51 |
3 files changed, 9 insertions, 70 deletions
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<const QByteArray&> &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<bool> &resultCallback = QWebEngineCallback<bool>()); -#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<const QString &> &resultCallback) const; void toPlainText(const QWebEngineCallback<const QString &> &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<const QVariant &> &resultCallback); void runJavaScript(const QString& scriptSource, quint32 worldId, const QWebEngineCallback<const QVariant &> &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<const QByteArray&> &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<bool> &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<bool> &resultCallback = QWebEngineCallback<bool>()) 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<const QString &> &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<const QString &> &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<const QVariant &> &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<const QVariant &> &resultCallback) \since 5.7 Runs the JavaScript code contained in \a scriptSource in the world specified by \a worldId. @@ -743,39 +739,6 @@ */ /*! - \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) Sets the permission for the web site identified by \a securityOrigin to use \a feature to \a policy. |