LSP: add rename functionality

Fixes: QTCREATORBUG-21578
Change-Id: Iec54ebed6358453af4ef16a2a4e6aef0418faebe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-05-11 08:41:57 +02:00
parent 5f91985931
commit 2b36770d07
8 changed files with 269 additions and 16 deletions

View File

@@ -441,6 +441,11 @@ void SearchResultWidget::setSearchAgainEnabled(bool enabled)
m_searchAgainButton->setEnabled(enabled);
}
void SearchResultWidget::setReplaceEnabled(bool enabled)
{
m_replaceButton->setEnabled(enabled);
}
void SearchResultWidget::finishSearch(bool canceled)
{
Id sizeWarningId(SIZE_WARNING_ID);

View File

@@ -91,6 +91,8 @@ public:
void setSearchAgainSupported(bool supported);
void setSearchAgainEnabled(bool enabled);
void setReplaceEnabled(bool enabled);
public slots:
void finishSearch(bool canceled);
void sendRequestPopup();

View File

@@ -858,6 +858,14 @@ void SearchResult::setTextToReplace(const QString &textToReplace)
m_widget->setTextToReplace(textToReplace);
}
/*!
Sets whether replace is enabled and can be triggered by the user
*/
void SearchResult::setReplaceEnabled(bool enabled)
{
m_widget->setReplaceEnabled(enabled);
}
/*!
* Removes all search results.
*/

View File

@@ -77,6 +77,7 @@ public slots:
void finishSearch(bool canceled);
void setTextToReplace(const QString &textToReplace);
void restart();
void setReplaceEnabled(bool enabled);
void setSearchAgainEnabled(bool enabled);
void popup();