VirtualBox

Changeset 94042 in vbox for trunk


Ignore:
Timestamp:
Mar 1, 2022 2:49:29 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: The signal QComboBox::activated(const QString &) was renamed QComboBox::textActivated (5.14), and similarly highlighted() to textHighlighted (5.14). The QComboBox::currentIndexChanged(const QString &) signal was removed (replaced by already existing currentTextChanged(), I think). bugref:9898

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp

    r93990 r94042  
    398398            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
    399399                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated));
     400#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textActivated was added in 5.14 actually */
     401            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textActivated),
     402                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textActivated));
     403#else
    400404            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::activated),
    401405                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::activated));
     406#endif
    402407            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    403408                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged));
     409#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
    404410            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
    405411                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::currentIndexChanged));
     412#endif
    406413            connect(m_pComboBox, &QComboBox::currentTextChanged, this, &QIComboBox::currentTextChanged);
    407414            connect(m_pComboBox, &QComboBox::editTextChanged, this, &QIComboBox::editTextChanged);
     415#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     416            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textHighlighted),
     417                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textHighlighted));
     418#else
    408419            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
    409420                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
    410421            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
    411422                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
     423#endif
    412424            /* Add combo-box into layout: */
    413425            pLayout->addWidget(m_pComboBox);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h

    r93986 r94042  
    4343    void activated(int iIndex);
    4444    /** Notifies listeners about user chooses an item with @a strText in the combo-box. */
     45#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     46    void textActivated(const QString &strText);
     47#else
    4548    void activated(const QString &strText);
     49#endif
    4650
    4751    /** Notifies listeners about current item changed to item with @a iIndex. */
    4852    void currentIndexChanged(int iIndex);
     53#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
    4954    /** Notifies listeners about current item changed to item with @a strText. */
    5055    void currentIndexChanged(const QString &strText);
     56#endif
    5157
    5258    /** Notifies listeners about current combo-box text is changed to @a strText. */
     
    5864    void highlighted(int iIndex);
    5965    /** Notifies listeners about user highlighted an item with @a strText in the popup list-view. */
     66#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /** @todo qt6: textHighlighted was added in 5.14 actually */
     67    void textHighlighted(const QString &strText);
     68#else
    6069    void highlighted(const QString &strText);
     70#endif
    6171
    6272public:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r93998 r94042  
    291291    if (m_pHistoryComboBox)
    292292    {
     293#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     294        disconnect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
     295                   this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     296        m_pHistoryComboBox->clear();
     297        connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
     298                this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     299#else
    293300        disconnect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
    294301                   this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     
    296303        connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
    297304                this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     305#endif
    298306    }
    299307
     
    330338            connect(m_pHistoryComboBox, &UIFileManagerHistoryComboBox::sigHidePopup,
    331339                    this, &UIFileManagerNavigationWidget::sltHandleHidePopup);
     340#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
     341            connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
     342                    this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     343#else
    332344            connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
    333345                    this, &UIFileManagerNavigationWidget::sltHandlePathChange);
     346#endif
    334347
    335348            m_pContainer->addWidget(m_pBreadCrumbs);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r93998 r94042  
    506506{
    507507    connect(m_pCheckBoxPort, &QCheckBox::toggled, this, &UIMachineSettingsSerial::sltGbSerialToggled);
     508#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     509    connect(m_pComboNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::textActivated),
     510            this, &UIMachineSettingsSerial::sltCbNumberActivated);
     511#else
    508512    connect(m_pComboNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated),
    509513            this, &UIMachineSettingsSerial::sltCbNumberActivated);
     514#endif
    510515    connect(m_pLineEditIRQ, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
    511516    connect(m_pLineEditIOPort, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
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