VirtualBox

Changeset 80914 in vbox


Ignore:
Timestamp:
Sep 20, 2019 6:16:55 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8938. Changing connection syntax in UILineTextEdit and UIPopupPane related classes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/widgets
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UILineTextEdit.cpp

    r79365 r80914  
    4949    pMainLayout->addWidget(m_pButtonBox);
    5050    /* Connect the buttons so that they are useful */
    51     connect(m_pButtonBox, SIGNAL(accepted()),
    52             this, SLOT(accept()));
    53     connect(m_pButtonBox, SIGNAL(rejected()),
    54             this, SLOT(reject()));
    55     connect(m_pOpenButton, SIGNAL(clicked()),
    56             this, SLOT(open()));
     51    connect(m_pButtonBox, &QDialogButtonBox::accepted,
     52            this, &UITextEditor::accept);
     53    connect(m_pButtonBox, &QDialogButtonBox::rejected,
     54            this, &UITextEditor::reject);
     55    connect(m_pOpenButton, &QPushButton::clicked,
     56            this, &UITextEditor::open);
    5757
    5858    /* Applying language settings */
     
    9898  : QIWithRetranslateUI<QPushButton>(pParent)
    9999{
    100     connect(this, SIGNAL(clicked()),
    101             this, SLOT(edit()));
     100    connect(this, &UILineTextEdit::clicked,
     101        this, &UILineTextEdit::edit);
    102102
    103103    /* Don't interpret the Enter Key. */
     
    125125    }
    126126}
    127 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp

    r76606 r80914  
    446446
    447447    /* Connect got-hover signal of the popup-box to hover-change slot of the popup-box group: */
    448     connect(pPopupBox, SIGNAL(sigGotHover()), this, SLOT(sltHoverChanged()));
     448    connect(pPopupBox, &UIPopupBox::sigGotHover, this, &UIPopupBoxGroup::sltHoverChanged);
    449449}
    450450
     
    466466        list[i]->revokeHover();
    467467}
    468 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp

    r78007 r80914  
    251251    {
    252252        /* Configure message-pane: */
    253         connect(this, SIGNAL(sigProposePaneWidth(int)), m_pMessagePane, SLOT(sltHandleProposalForWidth(int)));
    254         connect(m_pMessagePane, SIGNAL(sigSizeHintChanged()), this, SLOT(sltUpdateSizeHint()));
     253        connect(this, &UIPopupPane::sigProposePaneWidth, m_pMessagePane, &UIPopupPaneMessage::sltHandleProposalForWidth);
     254        connect(m_pMessagePane, &UIPopupPaneMessage::sigSizeHintChanged, this, &UIPopupPane::sltUpdateSizeHint);
    255255        m_pMessagePane->installEventFilter(this);
    256256    }
     
    260260    {
    261261        /* Configure button-box: */
    262         connect(m_pButtonPane, SIGNAL(sigButtonClicked(int)), this, SLOT(sltButtonClicked(int)));
     262        connect(m_pButtonPane, &UIPopupPaneButtonPane::sigButtonClicked, this, &UIPopupPane::sltButtonClicked);
    263263        m_pButtonPane->installEventFilter(this);
    264264        m_pButtonPane->setButtons(m_buttonDescriptions);
     
    294294    m_pShowAnimation = UIAnimation::installPropertyAnimation(this, "minimumSizeHint", "hiddenSizeHint", "shownSizeHint",
    295295                                                             SIGNAL(sigShow()), SIGNAL(sigHide()));
    296     connect(m_pShowAnimation, SIGNAL(sigStateEnteredFinal()), this, SLOT(sltMarkAsShown()));
     296    connect(m_pShowAnimation, &UIAnimation::sigStateEnteredFinal, this, &UIPopupPane::sltMarkAsShown);
    297297
    298298    /* Install 'hover' animation for 'opacity' property: */
     
    540540    }
    541541}
    542 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneButtonPane.cpp

    r76606 r80914  
    110110            m_pButtonLayout->addWidget(pButton);
    111111            m_buttons[iButtonID] = pButton;
    112             connect(pButton, SIGNAL(clicked(bool)), this, SLOT(sltButtonClicked()));
     112            connect(pButton, &QIToolButton::clicked, this, &UIPopupPaneButtonPane::sltButtonClicked);
    113113            if (pButton->property("default").toBool())
    114114                m_iDefaultButton = iButtonID;
     
    231231    return icon;
    232232}
    233 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneDetails.cpp

    r76606 r80914  
    2323/* GUI includes: */
    2424#include "UIAnimationFramework.h"
     25#include "UIPopupPane.h"
    2526#include "UIPopupPaneDetails.h"
    2627
     28/* Other VBox includes: */
     29#include <iprt/assert.h>
    2730
    2831UIPopupPaneDetails::UIPopupPaneDetails(QWidget *pParent, const QString &strText, bool fFocused)
     
    187190void UIPopupPaneDetails::prepareAnimation()
    188191{
    189     /* Propagate parent signals: */
    190     connect(parent(), SIGNAL(sigFocusEnter()), this, SLOT(sltFocusEnter()));
    191     connect(parent(), SIGNAL(sigFocusLeave()), this, SLOT(sltFocusLeave()));
     192    UIPopupPane *pPopupPane = qobject_cast<UIPopupPane*>(parent());
     193    AssertReturnVoid(pPopupPane);
     194    {
     195        /* Propagate parent signals: */
     196        connect(pPopupPane, &UIPopupPane::sigFocusEnter, this, &UIPopupPaneDetails::sltFocusEnter);
     197        connect(pPopupPane, &UIPopupPane::sigFocusLeave, this, &UIPopupPaneDetails::sltFocusLeave);
     198    }
    192199    /* Install geometry animation for 'minimumSizeHint' property: */
    193200    m_pAnimation = UIAnimation::installPropertyAnimation(this, "minimumSizeHint", "collapsedSizeHint", "expandedSizeHint",
     
    251258    return font;
    252259}
    253 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.cpp

    r76606 r80914  
    2222/* GUI includes: */
    2323#include "UIAnimationFramework.h"
     24#include "UIPopupPane.h"
    2425#include "UIPopupPaneMessage.h"
    2526
     27/* Other VBox includes: */
     28#include <iprt/assert.h>
    2629
    2730UIPopupPaneMessage::UIPopupPaneMessage(QWidget *pParent, const QString &strText, bool fFocused)
     
    155158void UIPopupPaneMessage::prepareAnimation()
    156159{
    157     /* Propagate parent signals: */
    158     connect(parent(), SIGNAL(sigFocusEnter()), this, SLOT(sltFocusEnter()));
    159     connect(parent(), SIGNAL(sigFocusLeave()), this, SLOT(sltFocusLeave()));
     160    UIPopupPane *pPopupPane = qobject_cast<UIPopupPane*>(parent());
     161    AssertReturnVoid(pPopupPane);
     162    {
     163        /* Propagate parent signals: */
     164        connect(pPopupPane, &UIPopupPane::sigFocusEnter, this, &UIPopupPaneMessage::sltFocusEnter);
     165        connect(pPopupPane, &UIPopupPane::sigFocusLeave, this, &UIPopupPaneMessage::sltFocusLeave);
     166    }
    160167    /* Install geometry animation for 'minimumSizeHint' property: */
    161168    m_pAnimation = UIAnimation::installPropertyAnimation(this, "minimumSizeHint", "collapsedSizeHint", "expandedSizeHint",
     
    201208    return font;
    202209}
    203 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.h

    r76581 r80914  
    7272    QSize expandedSizeHint() const { return m_expandedSizeHint; }
    7373
    74 private slots:
     74public slots:
    7575
    7676    /** Handles proposal for @a iWidth. */
    7777    void sltHandleProposalForWidth(int iWidth);
     78
     79private slots:
    7880
    7981    /** Handles focus enter. */
     
    128130
    129131#endif /* !FEQT_INCLUDED_SRC_widgets_UIPopupPaneMessage_h */
    130 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp

    r79365 r80914  
    263263                connect(this, &UIPopupStack::sigProposeStackViewportSize,
    264264                        m_pScrollViewport, &UIPopupStackViewport::sltHandleProposalForSize);
    265                 connect(m_pScrollViewport, SIGNAL(sigSizeHintChanged()),
    266                         this, SLOT(sltAdjustGeometry()));
    267                 connect(m_pScrollViewport, SIGNAL(sigPopupPaneDone(QString, int)),
    268                         this, SIGNAL(sigPopupPaneDone(QString, int)));
    269                 connect(m_pScrollViewport, SIGNAL(sigPopupPaneRemoved(QString)),
    270                         this, SLOT(sltPopupPaneRemoved(QString)));
    271                 connect(m_pScrollViewport, SIGNAL(sigPopupPanesRemoved()),
    272                         this, SLOT(sltPopupPanesRemoved()));
     265                connect(m_pScrollViewport, &UIPopupStackViewport::sigSizeHintChanged,
     266                        this, &UIPopupStack::sltAdjustGeometry);
     267                connect(m_pScrollViewport, &UIPopupStackViewport::sigPopupPaneDone,
     268                        this, &UIPopupStack::sigPopupPaneDone);
     269                connect(m_pScrollViewport, &UIPopupStackViewport::sigPopupPaneRemoved,
     270                        this, &UIPopupStack::sltPopupPaneRemoved);
     271                connect(m_pScrollViewport, &UIPopupStackViewport::sigPopupPanesRemoved,
     272                        this, &UIPopupStack::sltPopupPanesRemoved);
    273273            }
    274274            /* Assign scroll-viewport to scroll-area: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStackViewport.cpp

    r76606 r80914  
    5454    /* Attach popup-pane connection: */
    5555    connect(this, &UIPopupStackViewport::sigProposePopupPaneSize, pPopupPane, &UIPopupPane::sltHandleProposalForSize);
    56     connect(pPopupPane, SIGNAL(sigSizeHintChanged()), this, SLOT(sltAdjustGeometry()));
    57     connect(pPopupPane, SIGNAL(sigDone(int)), this, SLOT(sltPopupPaneDone(int)));
     56    connect(pPopupPane, &UIPopupPane::sigSizeHintChanged, this, &UIPopupStackViewport::sltAdjustGeometry);
     57    connect(pPopupPane, &UIPopupPane::sigDone, this, &UIPopupStackViewport::sltPopupPaneDone);
    5858
    5959    /* Show popup-pane: */
     
    209209    }
    210210}
    211 
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