VirtualBox

Changeset 33909 in vbox for trunk/src


Ignore:
Timestamp:
Nov 9, 2010 3:40:09 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67565
Message:

FE/Qt4: the same as r67562 for the Serial settings page

File:
1 edited

Legend:

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

    r33882 r33909  
    190190    layout->addWidget (mTabWidget);
    191191
     192    /* Load port data: */
     193    ulong uCount = vboxGlobal().virtualBox().GetSystemProperties().GetSerialPortCount();
     194    /* Apply internal variables data to QWidget(s): */
     195    for (ulong iSlot = 0; iSlot < uCount; ++iSlot)
     196    {
     197        /* Creating port's page: */
     198        UIMachineSettingsSerial *pPage = new UIMachineSettingsSerial;
     199
     200        /* Attach port's page to Tab Widget: */
     201        mTabWidget->addTab(pPage, pPage->pageTitle());
     202
     203    }
     204
    192205    /* Applying language settings */
    193206    retranslateUi();
     
    236249    QWidget *pLastFocusWidget = mTabWidget->focusProxy();
    237250
     251    ulong uCount = qMin(mTabWidget->count(), m_cache.m_items.size());
    238252    /* Apply internal variables data to QWidget(s): */
    239     for (int iSlot = 0; iSlot < m_cache.m_items.size(); ++iSlot)
    240     {
    241         /* Creating port's page: */
    242         UIMachineSettingsSerial *pPage = new UIMachineSettingsSerial;
     253    for (ulong iSlot = 0; iSlot < uCount; ++iSlot)
     254    {
     255        /* Getting adapter's page: */
     256        UIMachineSettingsSerial *pPage = qobject_cast<UIMachineSettingsSerial*>(mTabWidget->widget(iSlot));
    243257
    244258        /* Loading port's data into page: */
    245259        pPage->fetchPortData(m_cache.m_items[iSlot]);
    246 
    247         /* Attach port's page to Tab Widget: */
    248         mTabWidget->addTab(pPage, pPage->pageTitle());
    249260
    250261        /* Setup page validation: */
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