VirtualBox

Changeset 80199 in vbox for trunk/src


Ignore:
Timestamp:
Aug 8, 2019 3:26:00 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7720: Forgot something in r132638.

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

Legend:

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

    r80198 r80199  
    216216}
    217217
     218QVariant QIComboBox::currentData(int iRole /* = Qt::UserRole */) const
     219{
     220    /* Redirect to combo-box: */
     221    AssertPtrReturn(m_pComboBox, QVariant());
     222    return m_pComboBox->currentData(iRole);
     223}
     224
    218225void QIComboBox::addItems(const QStringList &items) const
    219226{
     
    279286    /* Redirect to combo-box: */
    280287    AssertPtrReturn(m_pComboBox, -1);
    281     return m_pComboBox->findData(strText, flags);
     288    return m_pComboBox->findText(strText, flags);
    282289}
    283290
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h

    r80197 r80199  
    8888    /** Returns the text of the current item in the combo-box. */
    8989    QString currentText() const;
     90    /** Returns the data of the current item in the combo-box. */
     91    QVariant currentData(int iRole = Qt::UserRole) const;
    9092
    9193    /** Adds the @a items into the combo-box. */
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