VirtualBox

Changeset 69548 in vbox


Ignore:
Timestamp:
Nov 2, 2017 9:55:27 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: Using Qt5 signal-slot connection notation for VBox Qt 'src/medium' classes.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp

    r69500 r69548  
    7575
    7676    /* Prepare Main event handlers: */
    77     connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)), this, SLOT(sltHandleMachineUpdate(QString)));
    78     connect(gVBoxEvents, SIGNAL(sigSnapshotTake(QString, QString)), this, SLOT(sltHandleMachineUpdate(QString)));
    79     connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QString, QString)), this, SLOT(sltHandleSnapshotDeleted(QString, QString)));
    80     connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QString, QString)), this, SLOT(sltHandleMachineUpdate(QString)));
    81     connect(gVBoxEvents, SIGNAL(sigSnapshotRestore(QString, QString)), this, SLOT(sltHandleSnapshotDeleted(QString, QString)));
    82     connect(gVBoxEvents, SIGNAL(sigMachineRegistered(QString, bool)), this, SLOT(sltHandleMachineRegistration(QString, bool)));
     77    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange, this, &UIMediumEnumerator::sltHandleMachineUpdate);
     78    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake,      this, &UIMediumEnumerator::sltHandleMachineUpdate);
     79    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete,    this, &UIMediumEnumerator::sltHandleSnapshotDeleted);
     80    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange,    this, &UIMediumEnumerator::sltHandleMachineUpdate);
     81    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore,   this, &UIMediumEnumerator::sltHandleSnapshotDeleted);
     82    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered, this, &UIMediumEnumerator::sltHandleMachineRegistration);
    8383
    8484    /* Listen for global thread-pool: */
    85     connect(vboxGlobal().threadPool(), SIGNAL(sigTaskComplete(UITask*)), this, SLOT(sltHandleMediumEnumerationTaskComplete(UITask*)));
     85    connect(vboxGlobal().threadPool(), &UIThreadPool::sigTaskComplete, this, &UIMediumEnumerator::sltHandleMediumEnumerationTaskComplete);
    8686}
    8787
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r69519 r69548  
    13561356{
    13571357    /* Configure medium-processing connections: */
    1358     connect(&vboxGlobal(), SIGNAL(sigMediumCreated(const QString&)),
    1359             this, SLOT(sltHandleMediumCreated(const QString&)));
    1360     connect(&vboxGlobal(), SIGNAL(sigMediumDeleted(const QString&)),
    1361             this, SLOT(sltHandleMediumDeleted(const QString&)));
     1358    connect(&vboxGlobal(), &VBoxGlobal::sigMediumCreated,
     1359            this, &UIMediumManagerWidget::sltHandleMediumCreated);
     1360    connect(&vboxGlobal(), &VBoxGlobal::sigMediumDeleted,
     1361            this, &UIMediumManagerWidget::sltHandleMediumDeleted);
    13621362
    13631363    /* Configure medium-enumeration connections: */
    1364     connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationStarted()),
    1365             this, SLOT(sltHandleMediumEnumerationStart()));
    1366     connect(&vboxGlobal(), SIGNAL(sigMediumEnumerated(const QString&)),
    1367             this, SLOT(sltHandleMediumEnumerated(const QString&)));
    1368     connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()),
    1369             this, SLOT(sltHandleMediumEnumerationFinish()));
     1364    connect(&vboxGlobal(), &VBoxGlobal::sigMediumEnumerationStarted,
     1365            this, &UIMediumManagerWidget::sltHandleMediumEnumerationStart);
     1366    connect(&vboxGlobal(), &VBoxGlobal::sigMediumEnumerated,
     1367            this, &UIMediumManagerWidget::sltHandleMediumEnumerated);
     1368    connect(&vboxGlobal(), &VBoxGlobal::sigMediumEnumerationFinished,
     1369            this, &UIMediumManagerWidget::sltHandleMediumEnumerationFinish);
    13701370}
    13711371
     
    15681568        m_pTabWidget->setTabIcon(tabIndex(UIMediumType_DVD), m_iconCD);
    15691569        m_pTabWidget->setTabIcon(tabIndex(UIMediumType_Floppy), m_iconFD);
    1570         connect(m_pTabWidget, SIGNAL(currentChanged(int)), this, SLOT(sltHandleCurrentTabChanged()));
     1570        connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIMediumManagerWidget::sltHandleCurrentTabChanged);
    15711571
    15721572        /* Add tab-widget into central layout: */
     
    16241624        pTreeWidget->header()->setStretchLastSection(false);
    16251625        pTreeWidget->setSortingEnabled(true);
    1626         connect(pTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
    1627                 this, SLOT(sltHandleCurrentItemChanged()));
     1626        connect(pTreeWidget, &QITreeWidget::currentItemChanged,
     1627                this, &UIMediumManagerWidget::sltHandleCurrentItemChanged);
    16281628        if (m_pActionDetails)
    16291629            connect(pTreeWidget, &QITreeWidget::itemDoubleClicked,
    16301630                    m_pActionDetails, &QAction::setChecked);
    1631         connect(pTreeWidget, SIGNAL(customContextMenuRequested(const QPoint&)),
    1632                 this, SLOT(sltHandleContextMenuCall(const QPoint&)));
    1633         connect(pTreeWidget, SIGNAL(resized(const QSize&, const QSize&)),
    1634                 this, SLOT(sltPerformTablesAdjustment()), Qt::QueuedConnection);
    1635         connect(pTreeWidget->header(), SIGNAL(sectionResized(int, int, int)),
    1636                 this, SLOT(sltPerformTablesAdjustment()), Qt::QueuedConnection);
     1631        connect(pTreeWidget, &QITreeWidget::customContextMenuRequested,
     1632                this, &UIMediumManagerWidget::sltHandleContextMenuCall);
     1633        connect(pTreeWidget, &QITreeWidget::resized,
     1634                this, &UIMediumManagerWidget::sltPerformTablesAdjustment, Qt::QueuedConnection);
     1635        connect(pTreeWidget->header(), &QHeaderView::sectionResized,
     1636                this, &UIMediumManagerWidget::sltPerformTablesAdjustment, Qt::QueuedConnection);
    16371637        /* Add tree-widget into tab layout: */
    16381638        tab(type)->layout()->addWidget(pTreeWidget);
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