VirtualBox

Changeset 95725 in vbox


Ignore:
Timestamp:
Jul 19, 2022 12:08:09 PM (2 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: bugref:6899: Fix for UIFormEditorWidget; Table rows should have table reference initialised; Required for accessibility needs.

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

Legend:

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

    r93990 r95725  
    464464    void prepare();
    465465
    466     /** Return the parent table-view reference. */
    467     QITableView *parentTable() const;
     466    /** Returns the parent table-view reference. */
     467    QITableView *view() const;
    468468
    469469    /** Updates row generation values. */
     
    956956    beginInsertRows(QModelIndex(), 0, values.size() - 1);
    957957    foreach (const CFormValue &comValue, values)
    958         m_dataList << new UIFormEditorRow(parentTable(), m_pFormEditorWidget, comValue);
     958        m_dataList << new UIFormEditorRow(view(), m_pFormEditorWidget, comValue);
    959959    endInsertRows();
    960960}
     
    12221222{
    12231223    /* Create dialog on-the-fly: */
    1224     QPointer<QIDialog> pDialog = new QIDialog(parentTable());
     1224    QPointer<QIDialog> pDialog = new QIDialog(view());
    12251225    if (pDialog)
    12261226    {
     
    12811281}
    12821282
    1283 QITableView *UIFormEditorModel::parentTable() const
    1284 {
    1285     return qobject_cast<QITableView*>(parent());
     1283QITableView *UIFormEditorModel::view() const
     1284{
     1285    return m_pFormEditorWidget->view();
    12861286}
    12871287
     
    13941394}
    13951395
     1396UIFormEditorView *UIFormEditorWidget::view() const
     1397{
     1398    return m_pTableView;
     1399}
     1400
    13961401QHeaderView *UIFormEditorWidget::horizontalHeader() const
    13971402{
     
    14041409    AssertPtrReturn(m_pTableView, 0);
    14051410    return m_pTableView->verticalHeader();
     1411}
     1412
     1413void UIFormEditorWidget::setWhatsThis(const QString &strWhatsThis)
     1414{
     1415    AssertPtrReturnVoid(m_pTableView);
     1416    m_pTableView->setWhatsThis(strWhatsThis);
    14061417}
    14071418
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFormEditorWidget.h

    r93990 r95725  
    5757    void setNotificationCenter(UINotificationCenter *pNotificationCenter) { m_pNotificationCenter = pNotificationCenter; }
    5858
     59    /** Returns table-view reference. */
     60    UIFormEditorView *view() const;
    5961    /** Returns horizontal header reference. */
    6062    QHeaderView *horizontalHeader() const;
    6163    /** Returns vertical header reference. */
    6264    QHeaderView *verticalHeader() const;
     65    /** Defines table-view @a strWhatsThis help text. */
     66    void setWhatsThis(const QString &strWhatsThis);
    6367
    6468    /** Clears form. */
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