VirtualBox

Changeset 66723 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 28, 2017 2:56:19 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115125
Message:

FE/Qt: bugref:8847: Host Network Manager: Using safe Qt5 way of connect; a bit of code formatting.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsDialog.cpp

    r66697 r66723  
    238238            {
    239239                /* Configure check-box: */
    240                 connect(m_pCheckBoxDHCP, SIGNAL(stateChanged(int)), this, SLOT(sltDhcpServerStatusChanged()));
     240                connect(m_pCheckBoxDHCP, &QCheckBox::stateChanged,
     241                        this, &UIHostNetworkDetailsDialog::sltDhcpServerStatusChanged);
    241242                /* Add into layout: */
    242243                pLayoutDHCPServer->addWidget(m_pCheckBoxDHCP, 0, 0, 1, 3);
     
    347348        /* Configure button-box: */
    348349        pButtonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    349         connect(pButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
    350         connect(pButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
     350        connect(pButtonBox, &QIDialogButtonBox::accepted,
     351                this, &UIHostNetworkDetailsDialog::accept);
     352        connect(pButtonBox, &QIDialogButtonBox::rejected,
     353                this, &UIHostNetworkDetailsDialog::reject);
    351354        /* Add button-box into layout: */
    352355        layout()->addWidget(pButtonBox);
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsDialog.h

    r66697 r66723  
    214214        UIDataHostNetwork &m_data;
    215215        /** Holds the tab-widget. */
    216         QITabWidget *m_pTabWidget;
     216        QITabWidget       *m_pTabWidget;
    217217    /** @} */
    218218
     
    220220     * @{ */
    221221        /** Holds the IPv4 address label. */
    222         QLabel      *m_pLabelIPv4;
     222        QLabel     *m_pLabelIPv4;
    223223        /** Holds the IPv4 address editor. */
    224         QILineEdit  *m_pEditorIPv4;
     224        QILineEdit *m_pEditorIPv4;
    225225        /** Holds the IPv4 network mask label. */
    226         QLabel      *m_pLabelNMv4;
     226        QLabel     *m_pLabelNMv4;
    227227        /** Holds the IPv4 network mask editor. */
    228         QILineEdit  *m_pEditorNMv4;
     228        QILineEdit *m_pEditorNMv4;
    229229        /** Holds the IPv6 address label. */
    230         QLabel      *m_pLabelIPv6;
     230        QLabel     *m_pLabelIPv6;
    231231        /** Holds the IPv6 address editor. */
    232         QILineEdit  *m_pEditorIPv6;
     232        QILineEdit *m_pEditorIPv6;
    233233        /** Holds the IPv6 network mask label. */
    234         QLabel      *m_pLabelNMv6;
     234        QLabel     *m_pLabelNMv6;
    235235        /** Holds the IPv6 network mask editor. */
    236         QILineEdit  *m_pEditorNMv6;
     236        QILineEdit *m_pEditorNMv6;
    237237    /** @} */
    238238
     
    240240     * @{ */
    241241        /** Holds the DHCP server status chack-box. */
    242         QCheckBox   *m_pCheckBoxDHCP;
     242        QCheckBox  *m_pCheckBoxDHCP;
    243243        /** Holds the DHCP address label. */
    244         QLabel      *m_pLabelDHCPAddress;
     244        QLabel     *m_pLabelDHCPAddress;
    245245        /** Holds the DHCP address editor. */
    246         QILineEdit  *m_pEditorDHCPAddress;
     246        QILineEdit *m_pEditorDHCPAddress;
    247247        /** Holds the DHCP network mask label. */
    248         QLabel      *m_pLabelDHCPMask;
     248        QLabel     *m_pLabelDHCPMask;
    249249        /** Holds the DHCP network mask editor. */
    250         QILineEdit  *m_pEditorDHCPMask;
     250        QILineEdit *m_pEditorDHCPMask;
    251251        /** Holds the DHCP lower address label. */
    252         QLabel      *m_pLabelDHCPLowerAddress;
     252        QLabel     *m_pLabelDHCPLowerAddress;
    253253        /** Holds the DHCP lower address editor. */
    254         QILineEdit  *m_pEditorDHCPLowerAddress;
     254        QILineEdit *m_pEditorDHCPLowerAddress;
    255255        /** Holds the DHCP upper address label. */
    256         QLabel      *m_pLabelDHCPUpperAddress;
     256        QLabel     *m_pLabelDHCPUpperAddress;
    257257        /** Holds the DHCP upper address editor. */
    258         QILineEdit  *m_pEditorDHCPUpperAddress;
     258        QILineEdit *m_pEditorDHCPUpperAddress;
    259259    /** @} */
    260260};
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp

    r66722 r66723  
    700700                                                      ":/add_host_iface_disabled_22px.png",
    701701                                                      ":/add_host_iface_disabled_16px.png"));
    702         connect(m_pActionAdd, SIGNAL(triggered()), this, SLOT(sltAddHostNetwork()));
     702        connect(m_pActionAdd, &QAction::triggered, this, &UIHostNetworkManager::sltAddHostNetwork);
    703703    }
    704704
     
    713713                                                         ":/remove_host_iface_disabled_22px.png",
    714714                                                         ":/remove_host_iface_disabled_16px.png"));
    715         connect(m_pActionRemove, SIGNAL(triggered()), this, SLOT(sltRemoveHostNetwork()));
     715        connect(m_pActionRemove, &QAction::triggered, this, &UIHostNetworkManager::sltRemoveHostNetwork);
    716716    }
    717717
     
    726726                                                       ":/edit_host_iface_disabled_22px.png",
    727727                                                       ":/edit_host_iface_disabled_16px.png"));
    728         connect(m_pActionEdit, SIGNAL(triggered()), this, SLOT(sltEditHostNetwork()));
     728        connect(m_pActionEdit, &QAction::triggered, this, &UIHostNetworkManager::sltEditHostNetwork);
    729729    }
    730730
     
    824824        m_pTreeWidget->setSortingEnabled(true);
    825825        m_pTreeWidget->sortByColumn(Column_Name, Qt::AscendingOrder);
    826         connect(m_pTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
    827                 this, SLOT(sltHandleCurrentItemChange()));
    828         connect(m_pTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)),
    829                 this, SLOT(sltEditHostNetwork()));
    830         connect(m_pTreeWidget, SIGNAL(customContextMenuRequested(const QPoint &)),
    831                 this, SLOT(sltHandleContextMenuRequest(const QPoint &)));
    832         connect(m_pTreeWidget, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
    833                 this, SLOT(sltHandleItemChange(QTreeWidgetItem *)));
     826        connect(m_pTreeWidget, &QITreeWidget::currentItemChanged,
     827                this, &UIHostNetworkManager::sltHandleCurrentItemChange);
     828        connect(m_pTreeWidget, &QITreeWidget::itemDoubleClicked,
     829                this, &UIHostNetworkManager::sltEditHostNetwork);
     830        connect(m_pTreeWidget, &QITreeWidget::customContextMenuRequested,
     831                this, &UIHostNetworkManager::sltHandleContextMenuRequest);
     832        connect(m_pTreeWidget, &QITreeWidget::itemChanged,
     833                this, &UIHostNetworkManager::sltHandleItemChange);
    834834        /* Add tree-widget into layout: */
    835835        QVBoxLayout *pMainLayout = qobject_cast<QVBoxLayout*>(centralWidget()->layout());
     
    847847        m_pButtonBox->setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::Close);
    848848        m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape);
    849         connect(m_pButtonBox, SIGNAL(helpRequested()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));
    850         connect(m_pButtonBox, SIGNAL(rejected()), this, SLOT(close()));
     849        connect(m_pButtonBox, &QIDialogButtonBox::helpRequested, &msgCenter(), &UIMessageCenter::sltShowHelpHelpDialog);
     850        connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIHostNetworkManager::close);
    851851        /* Add button-box into layout: */
    852852        QVBoxLayout *pMainLayout = qobject_cast<QVBoxLayout*>(centralWidget()->layout());
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