Skip to content

Commit

Permalink
docs: Fix parameter name to methodName
Browse files Browse the repository at this point in the history
  • Loading branch information
narnaud committed Oct 7, 2024
1 parent 472729d commit 141cd3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/API/knut/cppdocument.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)|
Expand Down Expand Up @@ -142,9 +142,9 @@ Therefore, all overloads of the function will be deleted.

Also see: CppDocument::deleteMethod(string methodName, string signature)

#### <a name="deleteMethod"></a>void **deleteMethod**(string method, string signature)
#### <a name="deleteMethod"></a>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.
Expand Down
12 changes: 6 additions & 6 deletions src/core/cppdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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<CppDocument *>(Project::instance()->get(headerSourceName));
headerSource->deleteMethodLocal(method, signature);
headerSource->deleteMethodLocal(methodName, signature);
}
deleteMethodLocal(method, signature);
deleteMethodLocal(methodName, signature);
}

/*!
Expand Down

0 comments on commit 141cd3a

Please sign in to comment.