VirtualBox

Changeset 80818 in vbox for trunk/src


Ignore:
Timestamp:
Sep 16, 2019 10:35:16 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8938. Removing qobject_cast's in connection calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r80653 r80818  
    547547        foreach (UIMachineWindow *pMachineWindow, machineWindows())
    548548        {
     549            UIMachineWindowFullscreen *pMachineWindowFullscreen = qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow);
     550            if (!pMachineWindow)
     551                continue;
    549552            /* Logic => window signals: */
    550553            connect(this, &UIMachineLogicFullscreen::sigNotifyAboutNativeFullscreenShouldBeEntered,
    551                     qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sltEnterNativeFullscreen);
     554                    pMachineWindowFullscreen, &UIMachineWindowFullscreen::sltEnterNativeFullscreen);
    552555            connect(this, &UIMachineLogicFullscreen::sigNotifyAboutNativeFullscreenShouldBeExited,
    553                     qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sltExitNativeFullscreen);
     556                    pMachineWindowFullscreen, &UIMachineWindowFullscreen::sltExitNativeFullscreen);
    554557            /* Window => logic signals: */
    555             connect(qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenWillEnter,
     558            connect(pMachineWindowFullscreen, &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenWillEnter,
    556559                    this, &UIMachineLogicFullscreen::sltHandleNativeFullscreenWillEnter,
    557560                     Qt::QueuedConnection);
    558             connect(qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenDidEnter,
     561            connect(pMachineWindowFullscreen, &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenDidEnter,
    559562                    this, &UIMachineLogicFullscreen::sltHandleNativeFullscreenDidEnter,
    560563                    Qt::QueuedConnection);
    561             connect(qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenWillExit,
     564            connect(pMachineWindowFullscreen, &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenWillExit,
    562565                    this, &UIMachineLogicFullscreen::sltHandleNativeFullscreenWillExit,
    563566                    Qt::QueuedConnection);
    564             connect(qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenDidExit,
     567            connect(pMachineWindowFullscreen, &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenDidExit,
    565568                    this, &UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit,
    566569                    Qt::QueuedConnection);
    567             connect(qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow), &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenFailToEnter,
     570            connect(pMachineWindowFullscreen, &UIMachineWindowFullscreen::sigNotifyAboutNativeFullscreenFailToEnter,
    568571                    this, &UIMachineLogicFullscreen::sltHandleNativeFullscreenFailToEnter,
    569572                    Qt::QueuedConnection);
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