From 141cd3af39cccaa45d974653cd39d8217afb7e40 Mon Sep 17 00:00:00 2001 From: Nicolas Arnaud-Cormos Date: Fri, 13 Sep 2024 08:53:16 +0200 Subject: [PATCH] docs: Fix parameter name to `methodName` --- docs/API/knut/cppdocument.md | 6 +++--- src/core/cppdocument.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/API/knut/cppdocument.md b/docs/API/knut/cppdocument.md index 786758af..de8ecc2d 100644 --- a/docs/API/knut/cppdocument.md +++ b/docs/API/knut/cppdocument.md @@ -29,7 +29,7 @@ Inherited properties: [CodeDocument properties](../knut/codedocument.md#properti |string |**[correspondingHeaderSource](#correspondingHeaderSource)**()| |void |**[deleteMethod](#deleteMethod)**()| |void |**[deleteMethod](#deleteMethod)**(string methodName)| -|void |**[deleteMethod](#deleteMethod)**(string method, string signature)| +|void |**[deleteMethod](#deleteMethod)**(string methodName, string signature)| |int |**[gotoBlockEnd](#gotoBlockEnd)**(int count)| |int |**[gotoBlockStart](#gotoBlockStart)**(int count)| ||**[insertCodeInMethod](#insertCodeInMethod)**(string methodName, string code, Position insertAt)| @@ -142,9 +142,9 @@ Therefore, all overloads of the function will be deleted. Also see: CppDocument::deleteMethod(string methodName, string signature) -#### void **deleteMethod**(string method, string signature) +#### void **deleteMethod**(string methodName, string signature) -Delete the method or function with the specified `method` and optional `signature`. +Delete the method or function with the specified `methodName` and `signature`. The method definition/declaration will be deleted from the current file, as well as the corresponding header/source file. References to the method will not be deleted. diff --git a/src/core/cppdocument.cpp b/src/core/cppdocument.cpp index 3bd23545..b5662c78 100644 --- a/src/core/cppdocument.cpp +++ b/src/core/cppdocument.cpp @@ -1594,9 +1594,9 @@ void CppDocument::deleteMethodLocal(const QString &methodName, const QString &si } /*! - * \qmlmethod void CppDocument::deleteMethod(string method, string signature) + * \qmlmethod void CppDocument::deleteMethod(string methodName, string signature) * - * Delete the method or function with the specified `method` and optional `signature`. + * Delete the method or function with the specified `methodName` and `signature`. * The method definition/declaration will be deleted from the current file, * as well as the corresponding header/source file. * References to the method will not be deleted. @@ -1618,16 +1618,16 @@ void CppDocument::deleteMethodLocal(const QString &methodName, const QString &si * * If an empty string is provided as the `signature`, all overloads of the function are deleted as well. */ -void CppDocument::deleteMethod(const QString &method, const QString &signature) +void CppDocument::deleteMethod(const QString &methodName, const QString &signature) { - LOG(method, signature); + LOG(methodName, signature); QString headerSourceName = correspondingHeaderSource(); if (!headerSourceName.isEmpty()) { auto headerSource = qobject_cast(Project::instance()->get(headerSourceName)); - headerSource->deleteMethodLocal(method, signature); + headerSource->deleteMethodLocal(methodName, signature); } - deleteMethodLocal(method, signature); + deleteMethodLocal(methodName, signature); } /*!