VirtualBox

Changeset 80955 in vbox


Ignore:
Timestamp:
Sep 23, 2019 5:27:06 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133541
Message:

FE/Qt: bugref:8938. Changing connection syntax under the widget subfolder.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp

    r79365 r80955  
    6262#endif
    6363    mSelectButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_disabled_16px.png"));
    64     connect(mSelectButton, SIGNAL(clicked()), this, SLOT(choose()));
     64    connect(mSelectButton, &QToolButton::clicked, this, &UIEmptyFilePathSelector::choose);
    6565    mMainLayout->addWidget(mSelectButton);
    6666
     
    254254    }
    255255}
    256 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp

    r79365 r80955  
    9696
    9797    /* Setup connections: */
    98     connect(this, SIGNAL(activated(int)), this, SLOT(onActivated(int)));
    99     connect(m_pCopyAction, SIGNAL(triggered(bool)), this, SLOT(copyToClipboard()));
     98    connect(this, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::activated), this, &UIFilePathSelector::onActivated);
     99    connect(m_pCopyAction, &QAction::triggered, this, &UIFilePathSelector::copyToClipboard);
    100100
    101101    /* Editable by default: */
     
    127127        /* Install line-edit connection/event-filter: */
    128128        Assert(lineEdit());
    129         connect(lineEdit(), SIGNAL(textEdited(const QString &)),
    130                 this, SLOT(onTextEdited(const QString &)));
     129        connect(lineEdit(), &QLineEdit::textEdited,
     130                this, &UIFilePathSelector::onTextEdited);
    131131        lineEdit()->installEventFilter(this);
    132132    }
     
    137137            /* Remove line-edit event-filter/connection: */
    138138            lineEdit()->removeEventFilter(this);
    139             disconnect(lineEdit(), SIGNAL(textEdited(const QString &)),
    140                        this, SLOT(onTextEdited(const QString &)));
     139            disconnect(lineEdit(), &QLineEdit::textEdited,
     140                       this, &UIFilePathSelector::onTextEdited);
    141141        }
    142142        if (comboBox())
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp

    r79798 r80955  
    492492            /* Configure UIHostComboEditorPrivate instance: */
    493493            setFocusProxy(m_pEditor);
    494             connect(m_pEditor, SIGNAL(sigDataChanged()), this, SLOT(sltCommitData()));
     494            connect(m_pEditor, &UIHostComboEditorPrivate::sigDataChanged, this, &UIHostComboEditor::sltCommitData);
    495495        }
    496496        /* Create 'clear' tool-button: */
     
    500500            m_pButtonClear->removeBorder();
    501501            m_pButtonClear->setIcon(UIIconPool::iconSet(":/eraser_16px.png"));
    502             connect(m_pButtonClear, SIGNAL(clicked(bool)), m_pEditor, SLOT(sltClear()));
     502            connect(m_pButtonClear, &QIToolButton::clicked, m_pEditor, &UIHostComboEditorPrivate::sltClear);
    503503        }
    504504        /* Add widgets to layout: */
     
    541541    setContextMenuPolicy(Qt::NoContextMenu);
    542542    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
    543     connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));
     543    connect(this, &UIHostComboEditorPrivate::selectionChanged, this, &UIHostComboEditorPrivate::sltDeselect);
    544544
    545545    /* Setup release-pending-keys timer: */
    546546    m_pReleaseTimer = new QTimer(this);
    547547    m_pReleaseTimer->setInterval(200);
    548     connect(m_pReleaseTimer, SIGNAL(timeout()), this, SLOT(sltReleasePendingKeys()));
     548    connect(m_pReleaseTimer, &QTimer::timeout, this, &UIHostComboEditorPrivate::sltReleasePendingKeys);
    549549
    550550#if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN)
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp

    r79798 r80955  
    7171
    7272    /* Connect selection preserver: */
    73     connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));
     73    connect(this, &UIHotKeyLineEdit::selectionChanged, this, &UIHotKeyLineEdit::sltDeselect);
    7474}
    7575
     
    155155    m_pResetButton->removeBorder();
    156156    m_pResetButton->setIcon(UIIconPool::iconSet(":/import_16px.png"));
    157     connect(m_pResetButton, SIGNAL(clicked(bool)), this, SLOT(sltReset()));
     157    connect(m_pResetButton, &QToolButton::clicked, this, &UIHotKeyEditor::sltReset);
    158158    m_pClearButton->removeBorder();
    159159    m_pClearButton->setIcon(UIIconPool::iconSet(":/eraser_16px.png"));
    160     connect(m_pClearButton, SIGNAL(clicked(bool)), this, SLOT(sltClear()));
     160    connect(m_pClearButton, &QToolButton::clicked, this, &UIHotKeyEditor::sltClear);
    161161
    162162    /* Translate finally: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp

    r79365 r80955  
    10711071        setRestrictionsOfMenuHelp(gEDataManager->restrictedRuntimeMenuHelpActionTypes(machineID()));
    10721072        /* And listen for the menu-bar configuration changes after that: */
    1073         connect(gEDataManager, SIGNAL(sigMenuBarConfigurationChange(const QString&)),
    1074                 this, SLOT(sltHandleConfigurationChange(const QString&)));
     1073        connect(gEDataManager, &UIExtraDataManager::sigMenuBarConfigurationChange,
     1074                this, &UIMenuBarEditorWidget::sltHandleConfigurationChange);
    10751075    }
    10761076}
     
    11391139            pCopiedMenuAction->setProperty("class", UIExtraDataMetaDefs::MenuType_All);
    11401140            pCopiedMenuAction->setProperty("type", pAction->extraDataID());
    1141             connect(pCopiedMenuAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));
     1141            connect(pCopiedMenuAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick);
    11421142            m_actions.insert(pAction->extraDataKey(), pCopiedMenuAction);
    11431143            /* Add menu action into tool-bar: */
     
    11911191            pCopiedMenuAction->setProperty("class", pCopiedMenu->property("class"));
    11921192            pCopiedMenuAction->setProperty("type", pAction->extraDataID());
    1193             connect(pCopiedMenuAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));
     1193            connect(pCopiedMenuAction, &QAction::triggered, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick);
    11941194            m_actions.insert(pAction->extraDataKey(), pCopiedMenuAction);
    11951195        }
     
    12111211        pCopiedAction->setProperty("class", pMenu->property("class"));
    12121212        pCopiedAction->setProperty("type", iExtraDataID);
    1213         connect(pCopiedAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));
     1213        connect(pCopiedAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick);
    12141214        m_actions.insert(strExtraDataID, pCopiedAction);
    12151215    }
     
    12281228        pCopiedAction->setProperty("class", pMenu->property("class"));
    12291229        pCopiedAction->setProperty("type", pAction->extraDataID());
    1230         connect(pCopiedAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));
     1230        connect(pCopiedAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick);
    12311231        m_actions.insert(pAction->extraDataKey(), pCopiedAction);
    12321232    }
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r79365 r80955  
    890890        m_pToolbar->setPalette(pal);
    891891        /* Configure child connections: */
    892         connect(m_pToolbar, SIGNAL(sigResized()), this, SLOT(sltHandleToolbarResize()));
    893         connect(m_pToolbar, SIGNAL(sigAutoHideToggled()), this, SLOT(sltAutoHideToggled()));
    894         connect(m_pToolbar, SIGNAL(sigMinimizeAction()), this, SIGNAL(sigMinimizeAction()));
    895         connect(m_pToolbar, SIGNAL(sigExitAction()), this, SIGNAL(sigExitAction()));
    896         connect(m_pToolbar, SIGNAL(sigCloseAction()), this, SIGNAL(sigCloseAction()));
     892        connect(m_pToolbar, &UIMiniToolBarPrivate::sigResized, this, &UIMiniToolBar::sltHandleToolbarResize);
     893        connect(m_pToolbar, &UIMiniToolBarPrivate::sigAutoHideToggled, this, &UIMiniToolBar::sltAutoHideToggled);
     894        connect(m_pToolbar, &UIMiniToolBarPrivate::sigMinimizeAction, this, &UIMiniToolBar::sigMinimizeAction);
     895        connect(m_pToolbar, &UIMiniToolBarPrivate::sigExitAction, this, &UIMiniToolBar::sigExitAction);
     896        connect(m_pToolbar, &UIMiniToolBarPrivate::sigCloseAction, this, &UIMiniToolBar::sigCloseAction);
    897897        /* Add child to area: */
    898898        m_pToolbar->setParent(m_pArea);
     
    906906        m_pHoverEnterTimer->setSingleShot(true);
    907907        m_pHoverEnterTimer->setInterval(500);
    908         connect(m_pHoverEnterTimer, SIGNAL(timeout()), this, SLOT(sltHoverEnter()));
     908        connect(m_pHoverEnterTimer, &QTimer::timeout, this, &UIMiniToolBar::sltHoverEnter);
    909909    }
    910910    m_pHoverLeaveTimer = new QTimer(this);
     
    912912        m_pHoverLeaveTimer->setSingleShot(true);
    913913        m_pHoverLeaveTimer->setInterval(500);
    914         connect(m_pHoverLeaveTimer, SIGNAL(timeout()), this, SLOT(sltHoverLeave()));
     914        connect(m_pHoverLeaveTimer, &QTimer::timeout, this, &UIMiniToolBar::sltHoverLeave);
    915915    }
    916916
     
    11881188
    11891189#include "UIMiniToolBar.moc"
    1190 
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp

    r76606 r80955  
    10131013        /* Finish configure table-view (after model is configured): */
    10141014        m_pTableView->setModel(m_pTableModel);
    1015         connect(m_pTableView, SIGNAL(sigCurrentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(sltCurrentChanged()));
    1016         connect(m_pTableView, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(sltShowTableContexMenu(const QPoint &)));
     1015        connect(m_pTableView, &UIPortForwardingView::sigCurrentChanged, this, &UIPortForwardingTable::sltCurrentChanged);
     1016        connect(m_pTableView, &UIPortForwardingView::customContextMenuRequested, this, &UIPortForwardingTable::sltShowTableContexMenu);
    10171017
    10181018        /* Prepare delegates: */
     
    11101110            m_pActionAdd->setShortcut(QKeySequence("Ins"));
    11111111            m_pActionAdd->setIcon(UIIconPool::iconSet(":/controller_add_16px.png", ":/controller_add_disabled_16px.png"));
    1112             connect(m_pActionAdd, SIGNAL(triggered(bool)), this, SLOT(sltAddRule()));
     1112            connect(m_pActionAdd, &QAction::triggered, this, &UIPortForwardingTable::sltAddRule);
    11131113            m_pToolBar->addAction(m_pActionAdd);
    11141114        }
     
    11201120            /* Configure action: */
    11211121            m_pActionCopy->setIcon(UIIconPool::iconSet(":/controller_add_16px.png", ":/controller_add_disabled_16px.png"));
    1122             connect(m_pActionCopy, SIGNAL(triggered(bool)), this, SLOT(sltCopyRule()));
     1122            connect(m_pActionCopy, &QAction::triggered, this, &UIPortForwardingTable::sltCopyRule);
    11231123        }
    11241124
     
    11301130            m_pActionRemove->setShortcut(QKeySequence("Del"));
    11311131            m_pActionRemove->setIcon(UIIconPool::iconSet(":/controller_remove_16px.png", ":/controller_remove_disabled_16px.png"));
    1132             connect(m_pActionRemove, SIGNAL(triggered(bool)), this, SLOT(sltRemoveRule()));
     1132            connect(m_pActionRemove, &QAction::triggered, this, &UIPortForwardingTable::sltRemoveRule);
    11331133            m_pToolBar->addAction(m_pActionRemove);
    11341134        }
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp

    r79365 r80955  
    339339                    m_pButtonCancel->setEnabled(m_fCancelEnabled);
    340340                    m_pButtonCancel->setFocusPolicy(Qt::ClickFocus);
    341                     connect(m_pButtonCancel, SIGNAL(clicked()), this, SLOT(sltCancelOperation()));
     341                    connect(m_pButtonCancel, &UIMiniCancelButton::clicked, this, &UIProgressDialog::sltCancelOperation);
    342342
    343343                    /* Add into layout: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingToolBar.cpp

    r79365 r80955  
    2424#include "UIAnimationFramework.h"
    2525#include "UIMachineWindow.h"
     26#include "UIMenuBarEditorWindow.h"
    2627#ifdef VBOX_WS_MAC
    2728# include "VBoxUtils-darwin.h"
     
    166167                pal2.setColor(QPalette::Window, palette().color(QPalette::Window));
    167168                m_pWidget->setPalette(pal2);
    168                 connect(m_pWidget, SIGNAL(sigCancelClicked()), this, SLOT(close()));
     169                UIMenuBarEditorWidget *pEditorWidget = qobject_cast<UIMenuBarEditorWidget*>(m_pWidget);
     170                if (pEditorWidget)
     171                    connect(pEditorWidget, &UIMenuBarEditorWidget::sigCancelClicked, this, &UISlidingToolBar::close);
    169172                /* Add child-widget into area: */
    170173                m_pWidget->setParent(m_pArea);
     
    213216
    214217    /* Activate window after it was shown: */
    215     connect(this, SIGNAL(sigShown()), this,
    216             SLOT(sltActivateWindow()), Qt::QueuedConnection);
     218    connect(this, &UISlidingToolBar::sigShown,
     219            this, &UISlidingToolBar::sltActivateWindow, Qt::QueuedConnection);
    217220    /* Update window geometry after parent geometry changed: */
     221    /* Leave this in the old connection syntax for now: */
    218222    connect(parent(), SIGNAL(sigGeometryChange(const QRect&)),
    219223            this, SLOT(sltParentGeometryChanged(const QRect&)));
     
    228232                                                         "startWidgetGeometry", "finalWidgetGeometry",
    229233                                                         SIGNAL(sigExpand()), SIGNAL(sigCollapse()));
    230     connect(m_pAnimation, SIGNAL(sigStateEnteredStart()), this, SLOT(sltMarkAsCollapsed()));
    231     connect(m_pAnimation, SIGNAL(sigStateEnteredFinal()), this, SLOT(sltMarkAsExpanded()));
     234    connect(m_pAnimation, &UIAnimation::sigStateEnteredStart, this, &UISlidingToolBar::sltMarkAsCollapsed);
     235    connect(m_pAnimation, &UIAnimation::sigStateEnteredFinal, this, &UISlidingToolBar::sltMarkAsExpanded);
    232236    /* Update geometry animation: */
    233237    updateAnimation();
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIStatusBarEditorWindow.cpp

    r79365 r80955  
    845845                                  gEDataManager->statusBarIndicatorOrder(machineID()));
    846846        /* And listen for the status-bar configuration changes after that: */
    847         connect(gEDataManager, SIGNAL(sigStatusBarConfigurationChange(const QUuid &)),
    848                 this, SLOT(sltHandleConfigurationChange(const QUuid &)));
     847        connect(gEDataManager, &UIExtraDataManager::sigStatusBarConfigurationChange,
     848                this, &UIStatusBarEditorWidget::sltHandleConfigurationChange);
    849849    }
    850850}
     
    857857    {
    858858        /* Configure status button: */
    859         connect(pButton, SIGNAL(sigClick()), this, SLOT(sltHandleButtonClick()));
    860         connect(pButton, SIGNAL(sigDragObjectDestroy()), this, SLOT(sltHandleDragObjectDestroy()));
     859        connect(pButton, &UIStatusBarEditorButton::sigClick, this, &UIStatusBarEditorWidget::sltHandleButtonClick);
     860        connect(pButton, &UIStatusBarEditorButton::sigDragObjectDestroy, this, &UIStatusBarEditorWidget::sltHandleDragObjectDestroy);
    861861        /* Add status button into button-layout: */
    862862        m_pButtonLayout->addWidget(pButton);
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp

    r76606 r80955  
    113113{
    114114    /* Disconnect button-click signal: */
    115     disconnect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked()));
     115    disconnect(this, &UIGraphicsRotatorButton::sigButtonClicked, this, &UIGraphicsRotatorButton::sltButtonClicked);
    116116    if (fEnabled)
    117117    {
    118118        /* Connect button-click signal: */
    119         connect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked()));
     119        connect(this, &UIGraphicsRotatorButton::sigButtonClicked, this, &UIGraphicsRotatorButton::sltButtonClicked);
    120120    }
    121121}
     
    230230    }
    231231}
    232 
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