VirtualBox

Changeset 70475 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 7, 2018 11:59:41 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9072 'Case Sensitive' and 'Match Whole Word' checkboxes refresh the search

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp

    r70466 r70475  
    6464{
    6565    m_iSearchPosition = 0;
     66    /* We start the search from the end of the doc. assuming log's end is more interesting: */
    6667    search(BackwardSearch, true);
    6768}
     
    117118    if (strSearchString.length())
    118119    {
    119         /* Reset the position to force the search restart from the document's beginnig: */
     120        /* Reset the position to force the search restart from the document's end: */
    120121        m_iSearchPosition = 0;
    121122        search(BackwardSearch, true);
     
    163164    configureInfoLabels();
    164165    emit sigHighlightingUpdated();
     166}
     167
     168void UIVMLogViewerSearchPanel::sltCaseSentitiveCheckBox()
     169{
     170    refresh();
     171}
     172
     173void UIVMLogViewerSearchPanel::sltMatchWholeWordCheckBox()
     174{
     175    refresh();
    165176}
    166177
     
    328339{
    329340    /* Prepare connections: */
    330     connect(m_pCloseButton, SIGNAL(clicked()), this, SLOT(hide()));
    331     connect(m_pSearchEditor, SIGNAL(textChanged(const QString &)),
    332             this, SLOT(findCurrent(const QString &)));
    333     connect(m_pNextPrevButtons, SIGNAL(clicked(int)), this, SLOT(find(int)));
     341    connect(m_pCloseButton, &UIMiniCancelButton::clicked, this, &UIVMLogViewerSearchPanel::hide);
     342    connect(m_pSearchEditor, &UISearchField::textChanged, this, &UIVMLogViewerSearchPanel::findCurrent);
     343    connect(m_pNextPrevButtons, &UIRoundRectSegmentedButton::clicked, this, &UIVMLogViewerSearchPanel::find);
    334344    connect(m_pHighlightAllCheckBox, &QCheckBox::stateChanged,
    335345            this, &UIVMLogViewerSearchPanel::sltHighlightAllCheckBox);
     346    connect(m_pCaseSensitiveCheckBox, &QCheckBox::stateChanged,
     347            this, &UIVMLogViewerSearchPanel::sltCaseSentitiveCheckBox);
     348    connect(m_pMatchWholeWordCheckBox, &QCheckBox::stateChanged,
     349            this, &UIVMLogViewerSearchPanel::sltMatchWholeWordCheckBox);
    336350}
    337351
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h

    r70308 r70475  
    5151      * @param  pViewer  Specifies instance of VM Log-Viewer. */
    5252    UIVMLogViewerSearchPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
    53     /** Resets the saech position and starts a new search. */
     53    /** Resets the search position and starts a new search. */
    5454    void refresh();
    5555    void reset();
     
    6969    void findCurrent(const QString &strSearchString);
    7070    void sltHighlightAllCheckBox();
     71    void sltCaseSentitiveCheckBox();
     72    void sltMatchWholeWordCheckBox();
    7173
    7274private:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette