VirtualBox

Changeset 77006 in vbox


Ignore:
Timestamp:
Jan 26, 2019 6:27:09 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128428
Message:

FE/Qt: Modifications to medium selector widget to adjust to search widget changes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/medium
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSearchWidget.cpp

    r77005 r77006  
    5353            return false;
    5454
    55         UIMediumItem *pMediumItem = static_cast<UIMediumItem*>(pItem);
     55        UIMediumItem *pMediumItem = dynamic_cast<UIMediumItem*>(pItem);
    5656        if (!pMediumItem)
    5757            return false;
     
    114114    {
    115115        m_pShowPreviousMatchButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_backward_16px.png", ":/log_viewer_search_backward_disabled_16px.png"));
    116         connect(m_pShowPreviousMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget::sigShowPreviousMatchingItem);
    117116        connect(m_pShowPreviousMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget::sltShowPreviousMatchingItem);
    118 
    119117        pLayout->addWidget(m_pShowPreviousMatchButton);
    120118    }
     
    123121    {
    124122        m_pShowNextMatchButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_forward_16px.png", ":/log_viewer_search_forward_disabled_16px.png"));
    125         connect(m_pShowNextMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget:: sigShowNextMatchingItem);
    126123        connect(m_pShowNextMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget:: sltShowNextMatchingItem);
    127 
    128124        pLayout->addWidget(m_pShowNextMatchButton);
    129125    }
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSearchWidget.h

    r77005 r77006  
    4545
    4646    void sigPerformSearch();
    47     void sigShowNextMatchingItem();
    48     void sigShowPreviousMatchingItem();
    4947
    5048public:
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp

    r76979 r77006  
    243243        connect(m_pSearchWidget, &UIMediumSearchWidget::sigPerformSearch,
    244244                this, &UIMediumSelector::sltHandlePerformSearch);
    245         connect(m_pSearchWidget, &UIMediumSearchWidget::sigShowNextMatchingItem,
    246                 this, &UIMediumSelector::sltHandleShowNextMatchingItem);
    247         connect(m_pSearchWidget, &UIMediumSearchWidget::sigShowPreviousMatchingItem,
    248                 this, &UIMediumSelector::sltHandleShowPreviousMatchingItem);
    249245    }
    250246}
     
    461457void UIMediumSelector::sltHandlePerformSearch()
    462458{
    463     performMediumSearch();
    464 }
    465 
    466 void UIMediumSelector::sltHandleShowNextMatchingItem()
    467 {
    468     if (m_mathingItemList.isEmpty())
    469         return;
    470 
    471     if (++m_iCurrentShownIndex >= m_mathingItemList.size())
    472         m_iCurrentShownIndex = 0;
    473     scrollToItem(m_mathingItemList[m_iCurrentShownIndex]);
    474 }
    475 
    476 void UIMediumSelector::sltHandleShowPreviousMatchingItem()
    477 {
    478     if (m_mathingItemList.isEmpty())
    479         return;
    480     if (--m_iCurrentShownIndex < 0)
    481         m_iCurrentShownIndex = m_mathingItemList.size() -1;
    482     scrollToItem(m_mathingItemList[m_iCurrentShownIndex]);
     459    //performMediumSearch();
     460    if (!m_pSearchWidget)
     461        return;
     462    m_pSearchWidget->search(m_pTreeWidget);
    483463}
    484464
     
    701681void UIMediumSelector::performMediumSearch()
    702682{
     683    return;
    703684    if (!m_pSearchWidget || !m_pTreeWidget)
    704685        return;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h

    r76979 r77006  
    7070    void sltHandleRefresh();
    7171    void sltHandlePerformSearch();
    72     void sltHandleShowNextMatchingItem();
    73     void sltHandleShowPreviousMatchingItem();
    7472    void sltHandleTreeContextMenuRequest(const QPoint &point);
    7573    void sltHandleTreeExpandAllSignal();
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