Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp	(revision 78458)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp	(revision 78459)
@@ -32,4 +32,5 @@
 #include "QIToolButton.h"
 #include "UIIconPool.h"
+#include "UISearchLineEdit.h"
 #include "UIVMLogPage.h"
 #include "UIVMLogViewerSearchPanel.h"
@@ -70,4 +71,5 @@
     /* Private member vars */
     QBrush m_baseBrush;
+
 };
 
@@ -80,5 +82,5 @@
     , m_pMatchWholeWordCheckBox(0)
     , m_pHighlightAllCheckBox(0)
-    , m_iSearchPosition(0)
+    , m_iSearchCursorPosition(0)
     , m_iMatchCount(0)
 {
@@ -89,5 +91,5 @@
 void UIVMLogViewerSearchPanel::refresh()
 {
-    m_iSearchPosition = 0;
+    m_iSearchCursorPosition = 0;
     /* We start the search from the end of the doc. assuming log's end is more interesting: */
     search(BackwardSearch, true);
@@ -97,7 +99,9 @@
 void UIVMLogViewerSearchPanel::reset()
 {
-    m_iSearchPosition = 0;
+    m_iSearchCursorPosition = 0;
     m_matchLocationVector.clear();
-    m_iMatchCount = 0;
+    setMatchCount(0);
+    if (m_pSearchEditor)
+        m_pSearchEditor->reset();
 }
 
@@ -112,5 +116,5 @@
 }
 
-int UIVMLogViewerSearchPanel::marchCount() const
+int UIVMLogViewerSearchPanel::matchCount() const
 {
     return m_iMatchCount;
@@ -141,5 +145,5 @@
     {
         /* Reset the position to force the search restart from the document's end: */
-        m_iSearchPosition = 0;
+        m_iSearchCursorPosition = 0;
         search(BackwardSearch, true);
         emit sigHighlightingUpdated();
@@ -161,6 +165,6 @@
         pBrowser->setTextCursor(cursor);
     }
-    m_iSearchPosition = -1;
-    m_iMatchCount = 0;
+    m_iSearchCursorPosition = -1;
+    setMatchCount(0);
     emit sigSearchUpdated();
     clearHighlighting();
@@ -216,5 +220,5 @@
 
         /* Create search-editor: */
-        m_pSearchEditor = new UIVMLogViewerSearchField(0 /* parent */);
+        m_pSearchEditor = new UISearchLineEdit(0 /* parent */);
         if (m_pSearchEditor)
         {
@@ -409,4 +413,5 @@
         /* Select all the text: */
         m_pSearchEditor->selectAll();
+        m_pSearchEditor->setMatchCount(m_iMatchCount);
     }
 }
@@ -424,5 +429,5 @@
 
     const QString &searchString = m_pSearchEditor->text();
-    m_iMatchCount = countMatches(pDocument, searchString);
+    setMatchCount(countMatches(pDocument, searchString));
     emit sigSearchUpdated();
 
@@ -443,5 +448,5 @@
 
     QTextCursor resultCursor(pDocument);
-    int startPosition = m_iSearchPosition;
+    int startPosition = m_iSearchCursorPosition;
     if (direction == BackwardSearch)
         startPosition -= searchString.length();
@@ -460,5 +465,5 @@
         if (direction == ForwardSearch)
         {
-            m_iSearchPosition = startCursor.position();
+            m_iSearchCursorPosition = startCursor.position();
             search(ForwardSearch, false);
             return;
@@ -468,5 +473,5 @@
             /* Set the search position away from the end position to be
                able to find the string at the end of the document: */
-            m_iSearchPosition = endCursor.position() + searchString.length();
+            m_iSearchCursorPosition = endCursor.position() + searchString.length();
             search(BackwardSearch, false);
             return;
@@ -474,5 +479,5 @@
     }
     pTextEdit->setTextCursor(resultCursor);
-    m_iSearchPosition = resultCursor.position();
+    m_iSearchCursorPosition = resultCursor.position();
 }
 
@@ -550,4 +555,13 @@
 }
 
+void UIVMLogViewerSearchPanel::setMatchCount(int iCount)
+{
+    if (m_iMatchCount == iCount)
+        return;
+    m_iMatchCount = iCount;
+    if (m_pSearchEditor)
+        m_pSearchEditor->setMatchCount(iCount);
+}
+
 QTextDocument::FindFlags UIVMLogViewerSearchPanel::constructFindFlags(SearchDirection eDirection) const
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h	(revision 78458)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h	(revision 78459)
@@ -34,4 +34,5 @@
 class QWidget;
 class QIToolButton;
+class UISearchLineEdit;
 class UIVMLogViewerSearchField;
 class UIVMLogViewerWidget;
@@ -59,5 +60,5 @@
     virtual QString panelName() const /* override */;
     /** Returns the number of the matches to the current search. */
-    int marchCount() const;
+    int matchCount() const;
 
 protected:
@@ -103,6 +104,7 @@
     /** Searches the whole document and return the number of matches to the current search term. */
     int countMatches(QTextDocument *pDocument, const QString &searchString) const;
+    void setMatchCount(int iCount);
     /** Holds the instance of search-editor we create. */
-    UIVMLogViewerSearchField *m_pSearchEditor;
+    UISearchLineEdit *m_pSearchEditor;
 
     QIToolButton *m_pNextButton;
@@ -114,7 +116,8 @@
 
     /** Holds the position where we start the next search. */
-    int          m_iSearchPosition;
+    int          m_iSearchCursorPosition;
     /** Holds the number of the matches for the string. 0 for no matches. */
     int          m_iMatchCount;
+
     /** Stores relative positions of the lines of the matches. The values are [0,1]
         0 being the first line 1 being the last. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 78458)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 78459)
@@ -312,5 +312,5 @@
     for (int i = 0; i < m_logPageList.size(); ++i)
         if (UIVMLogPage *pPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]))
-            pPage->setSearchMatchCount(m_pSearchPanel->marchCount());
+            pPage->setSearchMatchCount(m_pSearchPanel->matchCount());
 }
 
@@ -768,5 +768,5 @@
         }
         pLogPage->setSearchResultOverlayShowHide(m_pSearchPanel->isVisible());
-        pLogPage->setSearchMatchCount(m_pSearchPanel->marchCount());
+        pLogPage->setSearchMatchCount(m_pSearchPanel->matchCount());
         pLogPage->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector());
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.cpp	(revision 78458)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.cpp	(revision 78459)
@@ -83,4 +83,12 @@
 }
 
+void UISearchLineEdit::reset()
+{
+    clear();
+    m_iMatchCount = 0;
+    m_iScrollToIndex = 0;
+    colorBackground(false);
+}
+
 void UISearchLineEdit::colorBackground(bool fWarning)
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.h	(revision 78458)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISearchLineEdit.h	(revision 78459)
@@ -42,4 +42,5 @@
     void setMatchCount(int iMatchCount);
     void setScroolToIndex(int iScrollToIndex);
+    void reset();
 
 protected:
