VirtualBox

Changeset 80736 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 11, 2019 2:38:29 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8938. Converting connection syntaxes under settings. part 6.

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

Legend:

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

    r79365 r80736  
    445445
    446446    /* Connect header-resize signal just before widget is shown after all the items properly loaded and initialized: */
    447     connect(mTwFolders->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(sltAdjustTreeFields()));
     447    connect(mTwFolders->header(), &QHeaderView::sectionResized, this, &UIMachineSettingsSF::sltAdjustTreeFields);
    448448
    449449    /* Adjusting size after all pending show events are processed: */
     
    751751{
    752752    /* Configure tree-widget connections: */
    753     connect(mTwFolders, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
    754             this, SLOT(sltHandleCurrentItemChange(QTreeWidgetItem *)));
    755     connect(mTwFolders, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
    756             this, SLOT(sltHandleDoubleClick(QTreeWidgetItem *)));
    757     connect(mTwFolders, SIGNAL(customContextMenuRequested(const QPoint &)),
    758             this, SLOT(sltHandleContextMenuRequest(const QPoint &)));
     753    connect(mTwFolders, &QITreeWidget::currentItemChanged,
     754            this, &UIMachineSettingsSF::sltHandleCurrentItemChange);
     755    connect(mTwFolders, &QITreeWidget::itemDoubleClicked,
     756            this, &UIMachineSettingsSF::sltHandleDoubleClick);
     757    connect(mTwFolders, &QITreeWidget::customContextMenuRequested,
     758            this, &UIMachineSettingsSF::sltHandleContextMenuRequest);
    759759}
    760760
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r79365 r80736  
    167167
    168168    /* Setup connections: */
    169     connect(mGbSerial, SIGNAL(toggled(bool)),
    170             this, SLOT(sltGbSerialToggled(bool)));
    171     connect(mCbNumber, SIGNAL(activated(const QString &)),
    172             this, SLOT(sltCbNumberActivated(const QString &)));
    173     connect(mCbMode, SIGNAL(activated(const QString &)),
    174             this, SLOT(sltCbModeActivated(const QString &)));
     169    connect(mGbSerial, &QCheckBox::toggled,
     170            this, &UIMachineSettingsSerial::sltGbSerialToggled);
     171    connect(mCbNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated),
     172            this, &UIMachineSettingsSerial::sltCbNumberActivated);
     173    connect(mCbMode, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated),
     174            this, &UIMachineSettingsSerial::sltCbModeActivated);
    175175
    176176    /* Prepare validation: */
     
    310310{
    311311    /* Prepare validation: */
    312     connect(mLeIRQ, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));
    313     connect(mLeIOPort, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));
    314     connect(mLePath, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));
     312    connect(mLeIRQ, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
     313    connect(mLeIOPort, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
     314    connect(mLePath, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate);
    315315}
    316316
     
    687687
    688688# include "UIMachineSettingsSerial.moc"
    689 
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r79365 r80736  
    31683168    if (pOpenMediumMenu)
    31693169    {
    3170         /* Eraze menu initially: */
     3170        /* Erase menu initially: */
    31713171        pOpenMediumMenu->clear();
    31723172        /* Depending on current medium type: */
     
    31783178                QAction *pCreateNewHardDisk = pOpenMediumMenu->addAction(tr("Create New Hard Disk..."));
    31793179                pCreateNewHardDisk->setIcon(iconPool()->icon(HDNewEn, HDNewDis));
    3180                 connect(pCreateNewHardDisk, SIGNAL(triggered(bool)), this, SLOT(sltCreateNewHardDisk()));
     3180                connect(pCreateNewHardDisk, &QAction::triggered, this, &UIMachineSettingsStorage::sltCreateNewHardDisk);
    31813181                /* Add "Choose a virtual hard disk" action: */
    31823182                addChooseExistingMediumAction(pOpenMediumMenu, tr("Choose Virtual Hard Disk..."));
     
    31983198                pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull());
    31993199                pEjectCurrentMedium->setIcon(iconPool()->icon(CDUnmountEnabled, CDUnmountDisabled));
    3200                 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice()));
     3200                connect(pEjectCurrentMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltUnmountDevice);
    32013201                break;
    32023202            }
     
    32143214                pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull());
    32153215                pEjectCurrentMedium->setIcon(iconPool()->icon(FDUnmountEnabled, FDUnmountDisabled));
    3216                 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice()));
     3216                connect(pEjectCurrentMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltUnmountDevice);
    32173217                break;
    32183218            }
     
    39683968{
    39693969    /* Configure this: */
    3970     connect(&uiCommon(), SIGNAL(sigMediumEnumerated(const QUuid &)),
    3971             this, SLOT(sltHandleMediumEnumerated(const QUuid &)));
    3972     connect(&uiCommon(), SIGNAL(sigMediumDeleted(const QUuid &)),
    3973             this, SLOT(sltHandleMediumDeleted(const QUuid &)));
     3970    connect(&uiCommon(), &UICommon::sigMediumEnumerated,
     3971            this, &UIMachineSettingsStorage::sltHandleMediumEnumerated);
     3972    connect(&uiCommon(), &UICommon::sigMediumDeleted,
     3973            this, &UIMachineSettingsStorage::sltHandleMediumDeleted);
    39743974
    39753975    /* Configure tree-view: */
    3976     connect(m_pTreeStorage, SIGNAL(currentItemChanged(const QModelIndex &, const QModelIndex &)),
    3977              this, SLOT(sltHandleCurrentItemChange()));
    3978     connect(m_pTreeStorage, SIGNAL(customContextMenuRequested(const QPoint &)),
    3979              this, SLOT(sltHandleContextMenuRequest(const QPoint &)));
    3980     connect(m_pTreeStorage, SIGNAL(drawItemBranches(QPainter *, const QRect &, const QModelIndex &)),
    3981              this, SLOT(sltHandleDrawItemBranches(QPainter *, const QRect &, const QModelIndex &)));
    3982     connect(m_pTreeStorage, SIGNAL(mouseMoved(QMouseEvent *)),
    3983              this, SLOT(sltHandleMouseMove(QMouseEvent *)));
     3976    connect(m_pTreeStorage, &QITreeView::currentItemChanged,
     3977             this, &UIMachineSettingsStorage::sltHandleCurrentItemChange);
     3978    connect(m_pTreeStorage, &QITreeView::customContextMenuRequested,
     3979            this, &UIMachineSettingsStorage::sltHandleContextMenuRequest);
     3980    connect(m_pTreeStorage, &QITreeView::drawItemBranches,
     3981            this, &UIMachineSettingsStorage::sltHandleDrawItemBranches);
     3982    connect(m_pTreeStorage, &QITreeView::mouseMoved,
     3983            this, &UIMachineSettingsStorage::sltHandleMouseMove);
    39843984    connect(m_pTreeStorage, &QITreeView::mousePressed,
    39853985            this, &UIMachineSettingsStorage::sltHandleMouseClick);
    39863986    connect(m_pTreeStorage, &QITreeView::mouseReleased,
    39873987            this, &UIMachineSettingsStorage::sltHandleMouseRelease);
    3988     connect(m_pTreeStorage, SIGNAL(mouseDoubleClicked(QMouseEvent *)),
    3989              this, SLOT(sltHandleMouseClick(QMouseEvent *)));
     3988    connect(m_pTreeStorage, &QITreeView::mouseDoubleClicked,
     3989            this, &UIMachineSettingsStorage::sltHandleMouseClick);
    39903990    connect(m_pTreeStorage, &QITreeView::dragEntered,
    39913991            this, &UIMachineSettingsStorage::sltHandleDragEnter);
     
    39963996
    39973997    /* Create model: */
    3998     connect(m_pModelStorage, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
    3999             this, SLOT(sltHandleRowInsertion(const QModelIndex &, int)));
    4000     connect(m_pModelStorage, SIGNAL(rowsRemoved(const QModelIndex&, int, int)),
    4001             this, SLOT(sltHandleRowRemoval()));
     3998    connect(m_pModelStorage, &StorageModel::rowsInserted,
     3999            this, &UIMachineSettingsStorage::sltHandleRowInsertion);
     4000    connect(m_pModelStorage, &StorageModel::rowsRemoved,
     4001            this, &UIMachineSettingsStorage::sltHandleRowRemoval);
    40024002
    40034003    /* Configure actions: */
    4004     connect(m_pActionAddController, SIGNAL(triggered(bool)), this, SLOT(sltAddController()));
    4005     connect(m_pActionAddControllerIDE, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerIDE()));
    4006     connect(m_pActionAddControllerSATA, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSATA()));
    4007     connect(m_pActionAddControllerSCSI, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSCSI()));
    4008     connect(m_pActionAddControllerFloppy, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerFloppy()));
    4009     connect(m_pActionAddControllerSAS, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSAS()));
    4010     connect(m_pActionAddControllerUSB, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerUSB()));
    4011     connect(m_pActionAddControllerNVMe, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerNVMe()));
    4012     connect(m_pActionAddControllerVirtioSCSI, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerVirtioSCSI()));
    4013     connect(m_pActionRemoveController, SIGNAL(triggered(bool)), this, SLOT(sltRemoveController()));
    4014     connect(m_pActionAddAttachment, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachment()));
    4015     connect(m_pActionAddAttachmentHD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentHD()));
    4016     connect(m_pActionAddAttachmentCD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentCD()));
    4017     connect(m_pActionAddAttachmentFD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentFD()));
    4018     connect(m_pActionRemoveAttachment, SIGNAL(triggered(bool)), this, SLOT(sltRemoveAttachment()));
     4004    connect(m_pActionAddController, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddController);
     4005    connect(m_pActionAddControllerIDE, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerIDE);
     4006    connect(m_pActionAddControllerSATA, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSATA);
     4007    connect(m_pActionAddControllerSCSI, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSCSI);
     4008    connect(m_pActionAddControllerFloppy, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerFloppy);
     4009    connect(m_pActionAddControllerSAS, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSAS);
     4010    connect(m_pActionAddControllerUSB, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerUSB);
     4011    connect(m_pActionAddControllerNVMe, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerNVMe);
     4012    connect(m_pActionAddControllerVirtioSCSI, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerVirtioSCSI);
     4013    connect(m_pActionRemoveController, &QAction::triggered, this, &UIMachineSettingsStorage::sltRemoveController);
     4014    connect(m_pActionAddAttachment, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachment);
     4015    connect(m_pActionAddAttachmentHD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentHD);
     4016    connect(m_pActionAddAttachmentCD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentCD);
     4017    connect(m_pActionAddAttachmentFD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentFD);
     4018    connect(m_pActionRemoveAttachment, &QAction::triggered, this, &UIMachineSettingsStorage::sltRemoveAttachment);
    40194019
    40204020    /* Configure tool-button: */
    4021     connect(mTbOpen, SIGNAL(clicked(bool)), mTbOpen, SLOT(showMenu()));
     4021    connect(mTbOpen, &QIToolButton::clicked, mTbOpen, &QIToolButton::showMenu);
    40224022    /* Configure menu: */
    4023     connect(mTbOpen->menu(), SIGNAL(aboutToShow()), this, SLOT(sltPrepareOpenMediumMenu()));
     4023    connect(mTbOpen->menu(), &QMenu::aboutToShow, this, &UIMachineSettingsStorage::sltPrepareOpenMediumMenu);
    40244024
    40254025    /* Configure widgets: */
    4026     connect(m_pMediumIdHolder, SIGNAL(sigChanged()), this, SLOT(sltSetInformation()));
    4027     connect(mSbPortCount, SIGNAL(valueChanged(int)), this, SLOT(sltSetInformation()));
    4028     connect(mLeName, SIGNAL(textEdited(const QString &)), this, SLOT(sltSetInformation()));
    4029     connect(mCbBus, SIGNAL(activated(int)), this, SLOT(sltSetInformation()));
    4030     connect(mCbType, SIGNAL(activated(int)), this, SLOT(sltSetInformation()));
    4031     connect(mCbSlot, SIGNAL(activated(int)), this, SLOT(sltSetInformation()));
    4032     connect(mCbIoCache, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation()));
    4033     connect(mCbPassthrough, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation()));
    4034     connect(mCbTempEject, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation()));
    4035     connect(mCbNonRotational, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation()));
    4036     connect(m_pCheckBoxHotPluggable, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation()));
     4026    connect(m_pMediumIdHolder, &UIMediumIDHolder::sigChanged,
     4027            this, &UIMachineSettingsStorage::sltSetInformation);
     4028    connect(mSbPortCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
     4029            this, &UIMachineSettingsStorage::sltSetInformation);
     4030    connect(mLeName, &QLineEdit::textEdited,
     4031            this, &UIMachineSettingsStorage::sltSetInformation);
     4032    connect(mCbBus, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
     4033            this, &UIMachineSettingsStorage::sltSetInformation);
     4034    connect(mCbType, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
     4035            this, &UIMachineSettingsStorage::sltSetInformation);
     4036    connect(mCbSlot, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
     4037            this, &UIMachineSettingsStorage::sltSetInformation);
     4038    connect(mCbIoCache, &QCheckBox::stateChanged,
     4039            this, &UIMachineSettingsStorage::sltSetInformation);
     4040    connect(mCbPassthrough, &QCheckBox::stateChanged,
     4041            this, &UIMachineSettingsStorage::sltSetInformation);
     4042    connect(mCbTempEject, &QCheckBox::stateChanged,
     4043            this, &UIMachineSettingsStorage::sltSetInformation);
     4044    connect(mCbNonRotational, &QCheckBox::stateChanged,
     4045            this, &UIMachineSettingsStorage::sltSetInformation);
     4046    connect(m_pCheckBoxHotPluggable, &QCheckBox::stateChanged,
     4047            this, &UIMachineSettingsStorage::sltSetInformation);
    40374048}
    40384049
     
    41854196    QAction *pChooseExistingMedium = pOpenMediumMenu->addAction(strActionName);
    41864197    pChooseExistingMedium->setIcon(iconPool()->icon(ChooseExistingEn, ChooseExistingDis));
    4187     connect(pChooseExistingMedium, SIGNAL(triggered(bool)), this, SLOT(sltChooseExistingMedium()));
     4198    connect(pChooseExistingMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltChooseExistingMedium);
    41884199}
    41894200
     
    41974208            QAction *pHostDriveAction = pOpenMediumMenu->addAction(medium.name());
    41984209            pHostDriveAction->setData(medium.id());
    4199             connect(pHostDriveAction, SIGNAL(triggered(bool)), this, SLOT(sltChooseHostDrive()));
     4210            connect(pHostDriveAction, &QAction::triggered, this, &UIMachineSettingsStorage::sltChooseHostDrive);
    42004211        }
    42014212    }
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