VirtualBox

Changeset 68079 in vbox for trunk


Ignore:
Timestamp:
Jul 21, 2017 11:32:19 AM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Using Qt5 signal-slot connection notation for VBox Qt extensions.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/extensions
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp

    r62493 r68079  
    273273    pMainLayout->addWidget(m_pSlider);
    274274
    275     connect(m_pSlider, SIGNAL(sliderMoved(int)), this, SLOT(sltSliderMoved(int)));
    276     connect(m_pSlider, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int)));
    277     connect(m_pSlider, SIGNAL(sliderPressed()), this, SIGNAL(sliderPressed()));
    278     connect(m_pSlider, SIGNAL(sliderReleased()), this, SIGNAL(sliderReleased()));
     275    connect(m_pSlider, &CPrivateSlider::sliderMoved,    this, &QIAdvancedSlider::sltSliderMoved);
     276    connect(m_pSlider, &CPrivateSlider::valueChanged,   this, &QIAdvancedSlider::valueChanged);
     277    connect(m_pSlider, &CPrivateSlider::sliderPressed,  this, &QIAdvancedSlider::sliderPressed);
     278    connect(m_pSlider, &CPrivateSlider::sliderReleased, this, &QIAdvancedSlider::sliderReleased);
    279279}
    280280
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp

    r63054 r68079  
    255255                m_pSwitchButton->setIcons(UIIconPool::iconSet(":/arrow_right_10px.png"),
    256256                                          UIIconPool::iconSet(":/arrow_down_10px.png"));
    257                 connect(m_pSwitchButton, SIGNAL(sigClicked()), this, SLOT(sltUpdateNavigationButtonsVisibility()));
    258                 connect(m_pSwitchButton, SIGNAL(sigClicked()), this, SLOT(sltUpdateDetailsBrowserVisibility()));
     257                connect(m_pSwitchButton, &QIArrowButtonSwitch::sigClicked, this, &QIArrowSplitter::sltUpdateNavigationButtonsVisibility);
     258                connect(m_pSwitchButton, &QIArrowButtonSwitch::sigClicked, this, &QIArrowSplitter::sltUpdateDetailsBrowserVisibility);
     259
    259260                /* Add switch-button into button-layout: */
    260261                pButtonLayout->addWidget(m_pSwitchButton);
     
    269270                m_pBackButton->setIconSize(QSize(iIconMetric, iIconMetric));
    270271                m_pBackButton->setIcon(UIIconPool::iconSet(":/arrow_left_10px.png"));
    271                 connect(m_pBackButton, SIGNAL(sigClicked()), this, SLOT(sltSwitchDetailsPageBack()));
     272                connect(m_pBackButton, &QIArrowButtonPress::sigClicked, this, &QIArrowSplitter::sltSwitchDetailsPageBack);
     273
    272274                /* Add back-button into button-layout: */
    273275                pButtonLayout->addWidget(m_pBackButton);
     
    280282                m_pNextButton->setIconSize(QSize(iIconMetric, iIconMetric));
    281283                m_pNextButton->setIcon(UIIconPool::iconSet(":/arrow_right_10px.png"));
    282                 connect(m_pNextButton, SIGNAL(sigClicked()), this, SLOT(sltSwitchDetailsPageNext()));
     284                connect(m_pNextButton, &QIArrowButtonPress::sigClicked, this, &QIArrowSplitter::sltSwitchDetailsPageNext);
     285
    283286                /* Add next-button into button-layout: */
    284287                pButtonLayout->addWidget(m_pNextButton);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIComboBox.cpp

    r64540 r68079  
    312312        {
    313313            /* Configure combo-box: */
    314             connect(m_pComboBox, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
    315             connect(m_pComboBox, SIGNAL(activated(const QString &)), this, SIGNAL(activated(const QString &)));
    316             connect(m_pComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(currentIndexChanged(int)));
    317             connect(m_pComboBox, SIGNAL(currentIndexChanged(const QString &)), this, SIGNAL(currentIndexChanged(const QString &)));
    318             connect(m_pComboBox, SIGNAL(currentTextChanged(const QString &)), this, SIGNAL(currentTextChanged(const QString &)));
    319             connect(m_pComboBox, SIGNAL(editTextChanged(const QString &)), this, SIGNAL(editTextChanged(const QString &)));
    320             connect(m_pComboBox, SIGNAL(highlighted(int)), this, SIGNAL(highlighted(int)));
    321             connect(m_pComboBox, SIGNAL(highlighted(const QString &)), this, SIGNAL(highlighted(const QString &)));
     314            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
     315                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::activated));
     316            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::activated),
     317                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::activated));
     318            connect(m_pComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
     319                    this, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged));
     320            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
     321                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::currentIndexChanged));
     322            connect(m_pComboBox, &QComboBox::currentTextChanged, this, &QIComboBox::currentTextChanged);
     323            connect(m_pComboBox, &QComboBox::editTextChanged, this, &QIComboBox::editTextChanged);
     324            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
     325                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
     326            connect(m_pComboBox, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::highlighted),
     327                    this, static_cast<void(QIComboBox::*)(const QString &)>(&QIComboBox::highlighted));
    322328            /* Add combo-box into layout: */
    323329            pLayout->addWidget(m_pComboBox);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIFileDialog.cpp

    r63317 r68079  
    357357
    358358    QEventLoop eventLoop;
    359     QObject::connect(&dlg, SIGNAL(finished(int)),
    360                      &eventLoop, SLOT(quit()));
     359    QObject::connect(&dlg, &QFileDialog::finished,
     360                     &eventLoop, &QEventLoop::quit);
    361361    dlg.open();
    362362    eventLoop.exec();
     
    593593
    594594    QEventLoop eventLoop;
    595     QObject::connect(&dlg, SIGNAL(finished(int)),
    596                      &eventLoop, SLOT(quit()));
     595    QObject::connect(&dlg, &QFileDialog::finished,
     596                     &eventLoop, &QEventLoop::quit);
    597597    dlg.open();
    598598    eventLoop.exec();
     
    851851
    852852    QEventLoop eventLoop;
    853     QObject::connect(&dlg, SIGNAL(finished(int)),
    854                      &eventLoop, SLOT(quit()));
     853    QObject::connect(&dlg, &QFileDialog::finished,
     854                     &eventLoop, &QEventLoop::quit);
    855855    dlg.open();
    856856    eventLoop.exec();
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp

    r62493 r68079  
    255255    mCopyAction->setShortcut (QKeySequence (QKeySequence::Copy));
    256256    mCopyAction->setShortcutContext (Qt::WidgetShortcut);
    257     connect (mCopyAction, SIGNAL (triggered()), this, SLOT (copy()));
     257    connect(mCopyAction, &QAction::triggered, this, &QILabel::copy);
    258258}
    259259
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r62493 r68079  
    217217        {
    218218            /* Configure container: */
    219             connect(m_pDetailsContainer, SIGNAL(sigSizeHintChange()), this, SLOT(sltUpdateSize()));
     219            connect(m_pDetailsContainer, &QIArrowSplitter::sigSizeHintChange,
     220                    this, &QIMessageBox::sltUpdateSize);
    220221            /* Add details-container into main-layout: */
    221222            pMainLayout->addWidget(m_pDetailsContainer);
     
    242243            m_pButton1 = createButton(m_iButton1);
    243244            if (m_pButton1)
    244                 connect(m_pButton1, SIGNAL(clicked()), SLOT(sltDone1()));
     245                connect(m_pButton1, &QPushButton::clicked, this, &QIMessageBox::sltDone1);
    245246            m_pButton2 = createButton(m_iButton2);
    246247            if (m_pButton2)
    247                 connect(m_pButton2, SIGNAL(clicked()), SLOT(sltDone2()));
     248                connect(m_pButton2, &QPushButton::clicked, this, &QIMessageBox::sltDone2);
    248249            m_pButton3 = createButton(m_iButton3);
    249250            if (m_pButton3)
    250                 connect(m_pButton3, SIGNAL(clicked()), SLOT(sltDone3()));
     251                connect(m_pButton3, &QPushButton::clicked, this, &QIMessageBox::sltDone3);
    251252            /* Make sure Escape button always set: */
    252253            Assert(m_iButtonEsc);
     
    256257                QPushButton *pCopyButton = createButton(AlertButton_Copy);
    257258                pCopyButton->setToolTip(tr("Copy all errors to the clipboard"));
    258                 connect(pCopyButton, SIGNAL(clicked()), SLOT(sltCopy()));
     259                connect(pCopyButton, &QPushButton::clicked, this, &QIMessageBox::sltCopy);
    259260            }
    260261            /* Add button-box into main-layout: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp

    r62493 r68079  
    121121            m_pButton->removeBorder();
    122122            m_pButton->setFocusPolicy(Qt::NoFocus);
    123             connect(m_pButton, SIGNAL(clicked(bool)), this, SLOT(sltButtonClicked()));
    124             connect(m_pButton, SIGNAL(clicked(bool)), this, SIGNAL(sigClicked()));
     123            connect(m_pButton, &QIToolButton::clicked, this, &QIRichToolButton::sltButtonClicked);
     124            connect(m_pButton, &QIToolButton::clicked, this, &QIRichToolButton::sigClicked);
    125125            /* Add tool-button into main-layout: */
    126126            pMainLayout->addWidget(m_pButton);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBar.cpp

    r65253 r68079  
    6262
    6363    /* Make sure we remember the last one status message: */
    64     connect(this, SIGNAL(messageChanged(const QString &)),
    65             this, SLOT(sltRememberLastMessage(const QString &)));
     64    connect(this, &QIStatusBar::messageChanged,
     65            this, &QIStatusBar::sltRememberLastMessage);
    6666
    6767    /* Remove that ugly border around the status-bar items on every platform: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.cpp

    r64479 r68079  
    433433{
    434434    /* Connect created editor to the table and store it: */
    435     connect(pEditor, SIGNAL(destroyed(QObject *)), this, SLOT(sltEditorDestroyed(QObject *)));
     435    connect(pEditor, &QWidget::destroyed, this, &QITableView::sltEditorDestroyed);
    436436    m_editors[index] = pEditor;
    437437}
     
    471471        setItemDelegate(pStyledItemDelegate);
    472472        /* Connect newly created delegate to the table: */
    473         connect(pStyledItemDelegate, SIGNAL(sigEditorCreated(QWidget *, const QModelIndex &)),
    474                 this, SLOT(sltEditorCreated(QWidget *, const QModelIndex &)));
    475     }
    476 }
    477 
     473        connect(pStyledItemDelegate, &QIStyledItemDelegate::sigEditorCreated,
     474                this, &QITableView::sltEditorCreated);
     475    }
     476}
     477
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.cpp

    r62493 r68079  
    8888
    8989    /* Attach object-validator to group: */
    90     connect(pObjectValidator, SIGNAL(sigValidityChange(QValidator::State)),
    91             this, SLOT(sltValidate(QValidator::State)));
     90    connect(pObjectValidator, &QObjectValidator::sigValidityChange,
     91            this, &QObjectValidatorGroup::sltValidate);
    9292}
    9393
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWidgetValidator.h

    r62493 r68079  
    5454    QValidator::State state() const { return m_state; }
    5555
    56 private slots:
     56public slots:
    5757
    5858    /** Performs validation: */
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