VirtualBox

Changeset 65520 in vbox


Ignore:
Timestamp:
Jan 30, 2017 4:56:35 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8636: Runtime UI: Get rid of Qt4 code, way too complex to support already.

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

Legend:

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

    r64334 r65520  
    2424# include <QTimer>
    2525# ifdef VBOX_WS_WIN
    26 #  if QT_VERSION >= 0x050000
    27 #   include <QWindow>
    28 #  endif /* QT_VERSION >= 0x050000 */
    29 # endif /* VBOX_WS_WIN */
     26#  include <QWindow>
     27# endif
    3028
    3129/* GUI includes: */
     
    6260#endif /* VBOX_WS_MAC */
    6361    , m_fWasMinimized(false)
    64 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     62#ifdef VBOX_WS_X11
    6563    , m_fIsMinimized(false)
    66 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     64#endif
    6765{
    6866}
     
    356354#elif defined(VBOX_WS_WIN)
    357355
    358 # if QT_VERSION >= 0x050000
    359356    /* Map window onto required screen: */
    360357    windowHandle()->setScreen(qApp->screens().at(iHostScreen));
    361 # endif /* QT_VERSION >= 0x050000 */
    362358    /* Set appropriate window size: */
    363359    resize(workingArea.size());
    364 # if QT_VERSION < 0x050000
    365     /* Move window onto required screen: */
    366     move(workingArea.topLeft());
    367 # endif /* QT_VERSION < 0x050000 */
    368360
    369361#elif defined(VBOX_WS_X11)
     
    545537#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    546538
    547 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     539#ifdef VBOX_WS_X11
    548540void UIMachineWindowFullscreen::changeEvent(QEvent *pEvent)
    549541{
     
    583575    UIMachineWindow::changeEvent(pEvent);
    584576}
    585 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     577#endif /* VBOX_WS_X11 */
    586578
    587579#ifdef VBOX_WS_WIN
    588 # if QT_VERSION >= 0x050000
    589580void UIMachineWindowFullscreen::showEvent(QShowEvent *pEvent)
    590581{
     
    598589    UIMachineWindow::showEvent(pEvent);
    599590}
    600 # endif /* QT_VERSION >= 0x050000 */
    601591#endif /* VBOX_WS_WIN */
    602592
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h

    r62493 r65520  
    102102#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    103103
    104 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    105     /** Handles @a pEvent about state change. */
     104#ifdef VBOX_WS_X11
     105    /** X11: Handles @a pEvent about state change. */
    106106    void changeEvent(QEvent *pEvent);
    107 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     107#endif
    108108
    109109#ifdef VBOX_WS_WIN
    110 # if QT_VERSION >= 0x050000
    111110    /** Win: Handles show @a pEvent. */
    112111    void showEvent(QShowEvent *pEvent);
    113 # endif /* QT_VERSION >= 0x050000 */
    114 #endif /* VBOX_WS_WIN */
     112#endif
    115113
    116114#if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
     
    129127      * Used to restore minimized state when the window shown again. */
    130128    bool m_fWasMinimized;
    131 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    132     /** Holds whether the window is currently minimized.
     129#ifdef VBOX_WS_X11
     130    /** X11: Holds whether the window is currently minimized.
    133131      * Used to restore full-screen state when the window restored again. */
    134132    bool m_fIsMinimized;
    135 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     133#endif
    136134
    137135    /** Factory support. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r65519 r65520  
    5252#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    5353    , m_fWasMinimized(false)
    54 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     54#ifdef VBOX_WS_X11
    5555    , m_fIsMinimized(false)
    56 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     56#endif
    5757{
    5858}
     
    9292
    9393#ifdef VBOX_WITH_TRANSLUCENT_SEAMLESS
    94 # if defined(VBOX_WS_MAC) && QT_VERSION < 0x050000
    95     /* Using native API to enable translucent background for the Mac host.
    96      * - We also want to disable window-shadows which is possible
    97      *   using Qt::WA_MacNoShadow only since Qt 4.8,
    98      *   while minimum supported version is 4.7.1 for now: */
    99     ::darwinSetShowsWindowTransparent(this, true);
    100 # else /* !VBOX_WS_MAC || QT_VERSION >= 0x050000 */
    101     /* Using Qt API to enable translucent background:
    102      * - Under Win host Qt conflicts with 3D stuff (black seamless regions).
    103      * - Under Mac host Qt doesn't allows to disable window-shadows
    104      *   until version 4.8, but minimum supported version is 4.7.1 for now. */
     94    /* Using Qt API to enable translucent background: */
    10595    setAttribute(Qt::WA_TranslucentBackground);
    106 # endif /* !VBOX_WS_MAC || QT_VERSION >= 0x050000 */
    10796#endif /* VBOX_WITH_TRANSLUCENT_SEAMLESS */
    10897
     
    185174    Q_UNUSED(workingArea);
    186175
    187 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     176#ifdef VBOX_WS_X11
    188177
    189178    /* Make sure we are located on corresponding host-screen: */
     
    257246        placeOnScreen();
    258247
    259 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     248#ifdef VBOX_WS_X11
    260249        /* Show window: */
    261250        if (!isMaximized())
     
    307296#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    308297
    309 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
     298#ifdef VBOX_WS_X11
    310299void UIMachineWindowSeamless::changeEvent(QEvent *pEvent)
    311300{
     
    345334    UIMachineWindow::changeEvent(pEvent);
    346335}
    347 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     336#endif /* VBOX_WS_X11 */
    348337
    349338#ifdef VBOX_WS_WIN
    350 # if QT_VERSION >= 0x050000
    351339void UIMachineWindowSeamless::showEvent(QShowEvent *pEvent)
    352340{
     
    360348    UIMachineWindow::showEvent(pEvent);
    361349}
    362 # endif /* QT_VERSION >= 0x050000 */
    363350#endif /* VBOX_WS_WIN */
    364351
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h

    r65419 r65520  
    7474#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    7575
    76 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    77     /** Handles @a pEvent about state change. */
     76#ifdef VBOX_WS_X11
     77    /** X11: Handles @a pEvent about state change. */
    7878    void changeEvent(QEvent *pEvent);
    79 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     79#endif
    8080
    8181#ifdef VBOX_WS_WIN
    82 # if QT_VERSION >= 0x050000
    8382    /** Win: Handles show @a pEvent. */
    8483    void showEvent(QShowEvent *pEvent);
    85 # endif /* QT_VERSION >= 0x050000 */
    86 #endif /* VBOX_WS_WIN */
     84#endif
    8785
    8886#ifdef VBOX_WITH_MASKED_SEAMLESS
     
    106104      * Used to restore minimized state when the window shown again. */
    107105    bool m_fWasMinimized;
    108 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    109     /** Holds whether the window is currently minimized.
     106#ifdef VBOX_WS_X11
     107    /** X11: Holds whether the window is currently minimized.
    110108      * Used to restore maximized state when the window restored again. */
    111109    bool m_fIsMinimized;
    112 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
     110#endif
    113111
    114112    /** Factory support. */
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