VirtualBox

Changeset 80666 in vbox for trunk/src


Ignore:
Timestamp:
Sep 9, 2019 10:47:00 AM (5 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
4 edited

Legend:

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

    r79365 r80666  
    343343    {
    344344        /* Configure settings loader: */
    345         connect(m_pSerializeProcess, SIGNAL(sigNotifyAboutProcessStarted()), this, SLOT(sltHandleProcessStarted()));
    346         connect(m_pSerializeProcess, SIGNAL(sigNotifyAboutProcessProgressChanged(int)), this, SLOT(sltHandleProcessProgressChange(int)));
    347         connect(m_pSerializeProcess, SIGNAL(sigNotifyAboutProcessFinished()), this, SLOT(sltMarkLoaded()));
     345        connect(m_pSerializeProcess, &UISettingsSerializer::sigNotifyAboutProcessStarted, this, &UISettingsDialog::sltHandleProcessStarted);
     346        connect(m_pSerializeProcess, &UISettingsSerializer::sigNotifyAboutProcessProgressChanged, this, &UISettingsDialog::sltHandleProcessProgressChange);
     347        connect(m_pSerializeProcess, &UISettingsSerializer::sigNotifyAboutProcessFinished, this, &UISettingsDialog::sltMarkLoaded);
    348348
    349349        /* Raise current page priority: */
     
    641641#endif /* !VBOX_GUI_WITH_TOOLBAR_SETTINGS */
    642642
    643         connect(m_pSelector, SIGNAL(sigCategoryChanged(int)), this, SLOT(sltCategoryChanged(int)));
     643        connect(m_pSelector, &UISettingsSelectorTreeView::sigCategoryChanged, this, &UISettingsDialog::sltCategoryChanged);
    644644    }
    645645
     
    726726    /* Assign validator: */
    727727    UIPageValidator *pValidator = new UIPageValidator(this, pPage);
    728     connect(pValidator, SIGNAL(sigValidityChanged(UIPageValidator*)), this, SLOT(sltHandleValidityChange(UIPageValidator*)));
     728    connect(pValidator, &UIPageValidator::sigValidityChanged, this, &UISettingsDialog::sltHandleValidityChange);
    729729    pPage->setValidator(pValidator);
    730730    m_pWarningPane->registerValidator(pValidator);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.cpp

    r76606 r80666  
    320320    m_pTreeWidget->hideColumn(TreeWidgetSection_Link);
    321321    /* Setup connections: */
    322     connect(m_pTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
    323              this, SLOT(sltSettingsGroupChanged(QTreeWidgetItem *, QTreeWidgetItem*)));
     322    connect(m_pTreeWidget, &QITreeWidget::currentItemChanged,
     323            this, &UISettingsSelectorTreeView::sltSettingsGroupChanged);
    324324}
    325325
     
    513513    m_pActionGroup = new QActionGroup(this);
    514514    m_pActionGroup->setExclusive(true);
    515     connect(m_pActionGroup, SIGNAL(triggered(QAction*)),
    516             this, SLOT(sltSettingsGroupChanged(QAction*)));
     515    connect(m_pActionGroup, &QActionGroup::triggered,
     516            this, static_cast<void(UISettingsSelectorToolBar::*)(QAction*)>(&UISettingsSelectorToolBar::sltSettingsGroupChanged));
    517517}
    518518
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSerializer.cpp

    r76606 r80666  
    4848
    4949    /* Handling internal signals, they are also redirected in their handlers: */
    50     connect(this, SIGNAL(sigNotifyAboutPageProcessed(int)), this, SLOT(sltHandleProcessedPage(int)), Qt::QueuedConnection);
    51     connect(this, SIGNAL(sigNotifyAboutPagesProcessed()), this, SLOT(sltHandleProcessedPages()), Qt::QueuedConnection);
     50    connect(this, &UISettingsSerializer::sigNotifyAboutPageProcessed, this, &UISettingsSerializer::sltHandleProcessedPage, Qt::QueuedConnection);
     51    connect(this, &UISettingsSerializer::sigNotifyAboutPagesProcessed, this, &UISettingsSerializer::sltHandleProcessedPages, Qt::QueuedConnection);
    5252
    5353    /* Redirecting unhandled internal signals: */
    54     connect(this, SIGNAL(finished()), this, SIGNAL(sigNotifyAboutProcessFinished()), Qt::QueuedConnection);
     54    connect(this, &UISettingsSerializer::finished, this, &UISettingsSerializer::sigNotifyAboutProcessFinished, Qt::QueuedConnection);
    5555}
    5656
     
    155155            m_iIdOfHighPriorityPage = -1;
    156156        /* Process this page if its enabled: */
    157         connect(pPage, SIGNAL(sigOperationProgressChange(ulong, QString, ulong, ulong)),
    158                 this, SIGNAL(sigOperationProgressChange(ulong, QString, ulong, ulong)));
    159         connect(pPage, SIGNAL(sigOperationProgressError(QString)),
    160                 this, SIGNAL(sigOperationProgressError(QString)));
     157        connect(pPage, &UISettingsPage::sigOperationProgressChange,
     158                this, &UISettingsSerializer::sigOperationProgressChange);
     159        connect(pPage, &UISettingsPage::sigOperationProgressError,
     160                this, &UISettingsSerializer::sigOperationProgressError);
    161161        if (pPage->isEnabled())
    162162        {
     
    167167        }
    168168        /* Remember what page was processed: */
    169         disconnect(pPage, SIGNAL(sigOperationProgressChange(ulong, QString, ulong, ulong)),
    170                    this, SIGNAL(sigOperationProgressChange(ulong, QString, ulong, ulong)));
    171         disconnect(pPage, SIGNAL(sigOperationProgressError(QString)),
    172                    this, SIGNAL(sigOperationProgressError(QString)));
     169        disconnect(pPage, &UISettingsPage::sigOperationProgressChange,
     170                   this, &UISettingsSerializer::sigOperationProgressChange);
     171        disconnect(pPage, &UISettingsPage::sigOperationProgressError,
     172                   this, &UISettingsSerializer::sigOperationProgressError);
    173173        pPage->setProcessed(true);
    174174        /* Remove processed page from our map: */
     
    241241    setWindowModality(Qt::WindowModal);
    242242    setWindowTitle(parentWidget()->windowTitle());
    243     connect(this, SIGNAL(sigAskForProcessStart()),
    244             this, SLOT(sltStartProcess()), Qt::QueuedConnection);
     243    connect(this, &UISettingsSerializerProgress::sigAskForProcessStart,
     244            this, &UISettingsSerializerProgress::sltStartProcess, Qt::QueuedConnection);
    245245
    246246    /* Create serializer: */
     
    249249    {
    250250        /* Install progress handler: */
    251         connect(m_pSerializer, SIGNAL(sigNotifyAboutProcessProgressChanged(int)),
    252                 this, SLOT(sltHandleProcessProgressChange(int)));
    253         connect(m_pSerializer, SIGNAL(sigOperationProgressChange(ulong, QString, ulong, ulong)),
    254                 this, SLOT(sltHandleOperationProgressChange(ulong, QString, ulong, ulong)));
    255         connect(m_pSerializer, SIGNAL(sigOperationProgressError(QString)),
    256                 this, SLOT(sltHandleOperationProgressError(QString)));
     251        connect(m_pSerializer, &UISettingsSerializer::sigNotifyAboutProcessProgressChanged,
     252                this, &UISettingsSerializerProgress::sltHandleProcessProgressChange);
     253        connect(m_pSerializer, &UISettingsSerializer::sigOperationProgressChange,
     254                this, &UISettingsSerializerProgress::sltHandleOperationProgressChange);
     255        connect(m_pSerializer, &UISettingsSerializer::sigOperationProgressError,
     256                this, &UISettingsSerializerProgress::sltHandleOperationProgressError);
    257257    }
    258258
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r79365 r80666  
    233233            pButtonGroup->addButton(m_pRadioProxyDisabled);
    234234            pButtonGroup->addButton(m_pRadioProxyEnabled);
    235             connect(pButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)), this, SLOT(sltHandleProxyToggle()));
     235            connect(pButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked),
     236                    this, &UIGlobalSettingsProxy::sltHandleProxyToggle);
    236237        }
    237238
     
    241242            /* Configure editor: */
    242243            m_pHostEditor->setValidator(new QRegExpValidator(QRegExp("\\S+"), m_pHostEditor));
    243             connect(m_pHostEditor, SIGNAL(textEdited(const QString &)), this, SLOT(revalidate()));
     244            connect(m_pHostEditor, &QILineEdit::textEdited, this, &UIGlobalSettingsProxy::revalidate);
    244245        }
    245246    }
     
    281282    return fSuccess;
    282283}
    283 
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