summaryrefslogtreecommitdiff
path: root/src/plugins/find
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2009-10-06 18:42:28 +0200
committercon <qtc-committer@nokia.com>2009-10-06 18:42:28 +0200
commitead9c19c4065525f4e743e5ea409146739d539d6 (patch)
treed3d4006ecff029f8fe518b210c07dfc1bbaa05ab /src/plugins/find
parent7e5da60d0e60f502446b624c90c88cd9282093fa (diff)
parent671f1b2215596070552d69c58cb76bfb71f38439 (diff)
downloadqt-creator-ead9c19c4065525f4e743e5ea409146739d539d6.tar.gz
Merge commit 'origin/1.3'
Diffstat (limited to 'src/plugins/find')
-rw-r--r--src/plugins/find/searchresultwindow.cpp12
-rw-r--r--src/plugins/find/searchresultwindow.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/find/searchresultwindow.cpp b/src/plugins/find/searchresultwindow.cpp
index 2f846cd89c..a995dfc5b7 100644
--- a/src/plugins/find/searchresultwindow.cpp
+++ b/src/plugins/find/searchresultwindow.cpp
@@ -104,6 +104,17 @@ SearchResultWindow::~SearchResultWindow()
m_items.clear();
}
+void SearchResultWindow::setTextToReplace(const QString &textToReplace)
+{
+ m_replaceTextEdit->setText(textToReplace);
+ m_replaceTextEdit->selectAll();
+}
+
+QString SearchResultWindow::textToReplace() const
+{
+ return m_replaceTextEdit->text();
+}
+
void SearchResultWindow::setShowReplaceUI(bool show)
{
m_searchResultTreeView->model()->setShowReplaceUI(show);
@@ -169,6 +180,7 @@ SearchResult *SearchResultWindow::startNewSearch(SearchMode searchOrSearchAndRep
void SearchResultWindow::clearContents()
{
setReplaceUIEnabled(false);
+ m_replaceTextEdit->clear();
m_searchResultTreeView->clear();
m_items.clear();
m_widget->setCurrentWidget(m_searchResultTreeView);
diff --git a/src/plugins/find/searchresultwindow.h b/src/plugins/find/searchresultwindow.h
index 093eb26884..c41ca3424f 100644
--- a/src/plugins/find/searchresultwindow.h
+++ b/src/plugins/find/searchresultwindow.h
@@ -106,6 +106,9 @@ public:
void setShowReplaceUI(bool show);
bool isShowingReplaceUI() const;
+ void setTextToReplace(const QString &textToReplace);
+ QString textToReplace() const;
+
// search result object only lives till next startnewsearch call
SearchResult *startNewSearch(SearchMode searchOrSearchAndReplace = SearchOnly);