VirtualBox

Ignore:
Timestamp:
Aug 31, 2020 1:32:41 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140152
Message:

FE/Qt: bugref:9812: VM settings / USB details page: Small fix forgotten in r140151.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp

    r85956 r85957  
    3030UIMachineSettingsUSBFilterDetails::UIMachineSettingsUSBFilterDetails(QWidget *pParent /* = 0 */)
    3131    : QIWithRetranslateUI2<QIDialog>(pParent, Qt::Sheet)
    32     , m_pLayoutMain(0)
    3332    , m_pLabelName(0)
    3433    , m_pEditorName(0)
     
    111110void UIMachineSettingsUSBFilterDetails::prepareWidgets()
    112111{
    113     m_pLayoutMain = new QGridLayout(this);
    114     if (m_pLayoutMain)
     112    /* Prepare main layout: */
     113    QGridLayout *pLayoutMain = new QGridLayout(this);
     114    if (pLayoutMain)
    115115    {
    116         m_pLayoutMain->setRowStretch(9, 1);
    117 
     116        pLayoutMain->setRowStretch(9, 1);
     117
     118        /* Prepare name label: */
    118119        m_pLabelName = new QLabel(this);
    119120        if (m_pLabelName)
    120121        {
    121122            m_pLabelName->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    122             m_pLayoutMain->addWidget(m_pLabelName, 0, 0);
    123         }
     123            pLayoutMain->addWidget(m_pLabelName, 0, 0);
     124        }
     125        /* Prepare name editor: */
    124126        m_pEditorName = new QLineEdit(this);
    125127        if (m_pEditorName)
     
    129131            m_pEditorName->setValidator(new QRegExpValidator(QRegExp(".+"), this));
    130132
    131             m_pLayoutMain->addWidget(m_pEditorName, 0, 1);
    132         }
    133 
     133            pLayoutMain->addWidget(m_pEditorName, 0, 1);
     134        }
     135
     136        /* Prepare vendor ID label: */
    134137        m_pLabelVendorID = new QLabel(this);
    135138        if (m_pLabelVendorID)
    136139        {
    137140            m_pLabelVendorID->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    138             m_pLayoutMain->addWidget(m_pLabelVendorID, 1, 0);
    139         }
     141            pLayoutMain->addWidget(m_pLabelVendorID, 1, 0);
     142        }
     143        /* Prepare vendor ID editor: */
    140144        m_pEditorVendorID = new QLineEdit(this);
    141145        if (m_pEditorVendorID)
     
    145149            m_pEditorVendorID->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));
    146150
    147             m_pLayoutMain->addWidget(m_pEditorVendorID, 1, 1);
    148         }
    149 
     151            pLayoutMain->addWidget(m_pEditorVendorID, 1, 1);
     152        }
     153
     154        /* Prepare product ID label: */
    150155        m_pLabelProductID = new QLabel(this);
    151156        if (m_pLabelProductID)
    152157        {
    153158            m_pLabelProductID->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    154             m_pLayoutMain->addWidget(m_pLabelProductID, 2, 0);
    155         }
     159            pLayoutMain->addWidget(m_pLabelProductID, 2, 0);
     160        }
     161        /* Prepare product ID editor: */
    156162        m_pEditorProductID = new QLineEdit(this);
    157163        if (m_pEditorProductID)
     
    161167            m_pEditorProductID->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));
    162168
    163             m_pLayoutMain->addWidget(m_pEditorProductID, 2, 1);
    164         }
    165 
     169            pLayoutMain->addWidget(m_pEditorProductID, 2, 1);
     170        }
     171
     172        /* Prepare revision label: */
    166173        m_pLabelRevision = new QLabel(this);
    167174        if (m_pLabelRevision)
    168175        {
    169176            m_pLabelRevision->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    170             m_pLayoutMain->addWidget(m_pLabelRevision, 3, 0);
    171         }
     177            pLayoutMain->addWidget(m_pLabelRevision, 3, 0);
     178        }
     179        /* Prepare revision editor: */
    172180        m_pEditorRevision = new QLineEdit(this);
    173181        if (m_pEditorRevision)
     
    177185            m_pEditorRevision->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));
    178186
    179             m_pLayoutMain->addWidget(m_pEditorRevision, 3, 1);
    180         }
    181 
     187            pLayoutMain->addWidget(m_pEditorRevision, 3, 1);
     188        }
     189
     190        /* Prepare manufacturer label: */
    182191        m_pLabelManufacturer = new QLabel(this);
    183192        if (m_pLabelManufacturer)
    184193        {
    185194            m_pLabelManufacturer->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    186             m_pLayoutMain->addWidget(m_pLabelManufacturer, 4, 0);
    187         }
     195            pLayoutMain->addWidget(m_pLabelManufacturer, 4, 0);
     196        }
     197        /* Prepare manufacturer editor: */
    188198        m_pEditorManufacturer = new QLineEdit(this);
    189199        if (m_pEditorManufacturer)
     
    191201            if (m_pLabelManufacturer)
    192202                m_pLabelManufacturer->setBuddy(m_pEditorManufacturer);
    193             m_pLayoutMain->addWidget(m_pEditorManufacturer, 4, 1);
    194         }
    195 
     203            pLayoutMain->addWidget(m_pEditorManufacturer, 4, 1);
     204        }
     205
     206        /* Prepare product label: */
    196207        m_pLabelProduct = new QLabel(this);
    197208        if (m_pLabelProduct)
    198209        {
    199210            m_pLabelProduct->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    200             m_pLayoutMain->addWidget(m_pLabelProduct, 5, 0);
    201         }
     211            pLayoutMain->addWidget(m_pLabelProduct, 5, 0);
     212        }
     213        /* Prepare product editor: */
    202214        m_pEditorProduct = new QLineEdit(this);
    203215        if (m_pEditorProduct)
     
    205217            if (m_pLabelProduct)
    206218                m_pLabelProduct->setBuddy(m_pEditorProduct);
    207             m_pLayoutMain->addWidget(m_pEditorProduct, 5, 1);
    208         }
    209 
     219            pLayoutMain->addWidget(m_pEditorProduct, 5, 1);
     220        }
     221
     222        /* Prepare serial NO label: */
    210223        m_pLabelSerialNo = new QLabel(this);
    211224        if (m_pLabelSerialNo)
    212225        {
    213226            m_pLabelSerialNo->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    214             m_pLayoutMain->addWidget(m_pLabelSerialNo, 6, 0);
    215         }
     227            pLayoutMain->addWidget(m_pLabelSerialNo, 6, 0);
     228        }
     229        /* Prepare serial NO editor: */
    216230        m_pEditorSerialNo = new QLineEdit(this);
    217231        if (m_pEditorSerialNo)
     
    219233            if (m_pLabelSerialNo)
    220234                m_pLabelSerialNo->setBuddy(m_pEditorSerialNo);
    221             m_pLayoutMain->addWidget(m_pEditorSerialNo, 6, 1);
    222         }
    223 
     235            pLayoutMain->addWidget(m_pEditorSerialNo, 6, 1);
     236        }
     237
     238        /* Prepare port label: */
    224239        m_pLabelPort = new QLabel(this);
    225240        if (m_pLabelPort)
    226241        {
    227242            m_pLabelPort->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    228             m_pLayoutMain->addWidget(m_pLabelPort, 7, 0);
    229         }
     243            pLayoutMain->addWidget(m_pLabelPort, 7, 0);
     244        }
     245        /* Prepare port editor: */
    230246        m_pEditorPort = new QLineEdit(this);
    231247        if (m_pEditorPort)
     
    235251            m_pEditorPort->setValidator(new QRegExpValidator(QRegExp("[0-9]*"), this));
    236252
    237             m_pLayoutMain->addWidget(m_pEditorPort, 7, 1);
    238         }
    239 
     253            pLayoutMain->addWidget(m_pEditorPort, 7, 1);
     254        }
     255
     256        /* Prepare remote label: */
    240257        m_pLabelRemote = new QLabel(this);
    241258        if (m_pLabelRemote)
    242259        {
    243260            m_pLabelRemote->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    244             m_pLayoutMain->addWidget(m_pLabelRemote, 8, 0);
    245         }
     261            pLayoutMain->addWidget(m_pLabelRemote, 8, 0);
     262        }
     263        /* Prepare remote combo: */
    246264        m_pComboRemote = new QComboBox(this);
    247265        if (m_pComboRemote)
     
    253271            m_pComboRemote->insertItem(UIMachineSettingsUSB::ModeOff, QString()); /* No */
    254272
    255             m_pLayoutMain->addWidget(m_pComboRemote, 8, 1);
    256         }
    257 
     273            pLayoutMain->addWidget(m_pComboRemote, 8, 1);
     274        }
     275
     276        /* Prepare button-box: */
    258277        m_pButtonBox = new QIDialogButtonBox(this);
    259278        if (m_pButtonBox)
    260279        {
    261280            m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    262             m_pLayoutMain->addWidget(m_pButtonBox, 10, 0, 1, 2);
     281            pLayoutMain->addWidget(m_pButtonBox, 10, 0, 1, 2);
    263282        }
    264283    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h

    r85956 r85957  
    2828/* Forward declarations: */
    2929class QComboBox;
    30 class QGridLayout;
    3130class QLabel;
    3231class QLineEdit;
     
    5756    /** @name Widgets
    5857     * @{ */
    59         /** Holds the main layout instance. */
    60         QGridLayout       *m_pLayoutMain;
    6158        /** Holds the name label instance. */
    6259        QLabel            *m_pLabelName;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette