VirtualBox

Changeset 78041 in vbox


Ignore:
Timestamp:
Apr 8, 2019 2:44:25 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9434: Extend QIComboBox with addItem API.

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

Legend:

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

    r76606 r78041  
    207207    AssertPtrReturn(m_pComboBox, -1);
    208208    return m_pComboBox->currentIndex();
     209}
     210
     211void QIComboBox::addItem(const QString &strText, const QVariant &userData /* = QVariant() */) const
     212{
     213    /* Redirect to combo-box: */
     214    AssertPtrReturnVoid(m_pComboBox);
     215    return m_pComboBox->addItem(strText, userData);
    209216}
    210217
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.h

    r76581 r78041  
    8787    int currentIndex() const;
    8888
     89    /** Adds the @a strText and userData (stored in the Qt::UserRole) into the combo-box. */
     90    void addItem(const QString &strText, const QVariant &userData = QVariant()) const;
    8991    /** Inserts the @a strText and userData (stored in the Qt::UserRole) into the combo-box at the given @a iIndex. */
    9092    void insertItem(int iIndex, const QString &strText, const QVariant &userData = QVariant()) const;
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