VirtualBox

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


Ignore:
Timestamp:
Nov 25, 2022 10:04:21 AM (2 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9898: Migrating to Qt6; A bit of rework for QIComboBox signals.

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

Legend:

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

    r96407 r97679  
    409409                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated));
    410410#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textActivated was added in 5.14 actually */
    411             connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textActivated),
    412                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textActivated));
     411            connect(m_pComboBox, &QComboBox::textActivated,
     412                    this, &QIComboBox::textActivated);
    413413#else
    414414            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::activated),
    415                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::activated));
     415                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textActivated));
    416416#endif
    417417            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    418418                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged));
    419 #ifndef VBOX_IS_QT6_OR_LATER
    420             connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
    421                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::currentIndexChanged));
    422 #endif
    423419            connect(m_pComboBox, &QComboBox::currentTextChanged, this, &QIComboBox::currentTextChanged);
    424420            connect(m_pComboBox, &QComboBox::editTextChanged, this, &QIComboBox::editTextChanged);
    425421#ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    426             connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::textHighlighted),
    427                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textHighlighted));
     422            connect(m_pComboBox, &QComboBox::textHighlighted,
     423                    this, &QIComboBox::textHighlighted);
    428424#else
    429425            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
    430                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
    431             connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
    432                     this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
     426                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::textHighlighted));
    433427#endif
    434428            /* Add combo-box into layout: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h

    r96407 r97679  
    5353    void activated(int iIndex);
    5454    /** Notifies listeners about user chooses an item with @a strText in the combo-box. */
    55 #ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    5655    void textActivated(const QString &strText);
    57 #else
    58     void activated(const QString &strText);
    59 #endif
    6056
    6157    /** Notifies listeners about current item changed to item with @a iIndex. */
    6258    void currentIndexChanged(int iIndex);
    63 #ifndef VBOX_IS_QT6_OR_LATER
    64     /** Notifies listeners about current item changed to item with @a strText. */
    65     void currentIndexChanged(const QString &strText);
    66 #endif
    6759
    6860    /** Notifies listeners about current combo-box text is changed to @a strText. */
     
    7466    void highlighted(int iIndex);
    7567    /** Notifies listeners about user highlighted an item with @a strText in the popup list-view. */
    76 #ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: textHighlighted was added in 5.14 actually */
    7768    void textHighlighted(const QString &strText);
    78 #else
    79     void highlighted(const QString &strText);
    80 #endif
    8169
    8270public:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r96407 r97679  
    150150    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
    151151            this, &UIWizardAddCloudVMPageExpert::sltHandleProviderComboChange);
    152     connect(m_pProviderComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     152    connect(m_pProviderComboBox, &QIComboBox::activated,
    153153            this, &UIWizardAddCloudVMPageExpert::sltHandleProviderComboChange);
    154154    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.cpp

    r96426 r97679  
    368368    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
    369369            this, &UIWizardAddCloudVMPageSource::sltHandleProviderComboChange);
    370     connect(m_pProviderComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     370    connect(m_pProviderComboBox, &QIComboBox::activated,
    371371            this, &UIWizardAddCloudVMPageSource::sltHandleProviderComboChange);
    372372    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r96426 r97679  
    323323    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
    324324            this, &UIWizardImportAppPageExpert::sltHandleSourceComboChange);
    325     connect(m_pSourceComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     325    connect(m_pSourceComboBox, &QIComboBox::activated,
    326326            this, &UIWizardImportAppPageExpert::sltHandleSourceComboChange);
    327327    connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged,
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r96407 r97679  
    186186    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
    187187            this, &UIWizardNewCloudVMPageExpert::sltHandleProviderComboChange);
    188     connect(m_pProviderComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     188    connect(m_pProviderComboBox, &QIComboBox::activated,
    189189            this, &UIWizardNewCloudVMPageExpert::sltHandleProviderComboChange);
    190190    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r96426 r97679  
    430430    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged,
    431431            this, &UIWizardNewCloudVMPageSource::sltHandleProviderComboChange);
    432     connect(m_pProviderComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated),
     432    connect(m_pProviderComboBox, &QIComboBox::activated,
    433433            this, &UIWizardNewCloudVMPageSource::sltHandleProviderComboChange);
    434434    connect(m_pProfileComboBox, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
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