VirtualBox

Changeset 59092 in vbox


Ignore:
Timestamp:
Dec 11, 2015 2:51:51 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 36): No QT_MAC_USE_COCOA for Mac OS X in Qt5, it's impliciltly expected.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
8 edited

Legend:

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

    r58849 r59092  
    417417        }
    418418
    419 # ifdef QT_MAC_USE_COCOA
    420419        /* Instantiate own NSApplication before QApplication do it for us: */
    421420        UICocoaApplication::instance();
    422 # endif /* QT_MAC_USE_COCOA */
    423421#endif /* Q_WS_MAC */
    424422
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r58866 r59092  
    17761776    /* Translate tool-bar: */
    17771777#ifdef Q_WS_MAC
    1778 # ifdef QT_MAC_USE_COCOA
    17791778    /* There is a bug in Qt Cocoa which result in showing a "more arrow" when
    17801779       the necessary size of the toolbar is increased. Also for some languages
     
    17831782    if (m_pToolBar)
    17841783        m_pToolBar->updateLayout();
    1785 # endif /* QT_MAC_USE_COCOA */
    17861784#endif /* Q_WS_MAC */
    17871785
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DockIconPreview.h

    r52727 r59092  
    1919#define ___UIDockIconPreview_h___
    2020
    21 #ifdef QT_MAC_USE_COCOA
     21/* GUI includes: */
     22#include "UICocoaDockIconPreview.h"
    2223
    23 #include "UICocoaDockIconPreview.h"
    24 class UIDockIconPreview: public UICocoaDockIconPreview
     24
     25/** UICocoaDockIconPreview extension to be used for VM. */
     26class UIDockIconPreview : public UICocoaDockIconPreview
    2527{
    2628public:
     29
     30    /** Constructor taking passed @a pSession and @a overlayImage. */
    2731    UIDockIconPreview(UISession *pSession, const QPixmap& overlayImage)
    28       : UICocoaDockIconPreview(pSession, overlayImage) {}
     32        : UICocoaDockIconPreview(pSession, overlayImage) {}
    2933};
    30 
    31 #endif /* QT_MAC_USE_COCOA */
    3234
    3335#endif /* !___UIDockIconPreview_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp

    r58142 r59092  
    7676void darwinSetHidesAllTitleButtons(QWidget *pWidget)
    7777{
    78 #ifdef QT_MAC_USE_COCOA
    7978    /* Currently only necessary in the Cocoa version */
    8079    ::darwinSetHidesAllTitleButtonsImpl(::darwinToNativeWindow(pWidget));
    81 #else /* QT_MAC_USE_COCOA */
    82     NOREF(pWidget);
    83 #endif /* !QT_MAC_USE_COCOA */
    8480}
    8581
     
    111107void darwinWindowInvalidateShape(QWidget *pWidget)
    112108{
    113 #ifdef QT_MAC_USE_COCOA
    114109    /* Here a simple update is enough! */
    115110    pWidget->update();
    116 #else /* QT_MAC_USE_COCOA */
    117     ::darwinWindowInvalidateShapeImpl(::darwinToNativeWindow(pWidget));
    118 #endif /* QT_MAC_USE_COCOA */
    119 }
    120 ;
     111}
     112
    121113void darwinWindowInvalidateShadow(QWidget *pWidget)
    122114{
    123 #ifdef QT_MAC_USE_COCOA
    124115    ::darwinWindowInvalidateShadowImpl(::darwinToNativeWindow(pWidget));
    125 #else /* QT_MAC_USE_COCOA */
    126     NOREF(pWidget);
    127 #endif /* QT_MAC_USE_COCOA */
    128116}
    129117
     
    135123bool darwinIsWindowMaximized(QWidget *pWidget)
    136124{
    137 #ifdef QT_MAC_USE_COCOA
    138125    /* Currently only necessary in the Cocoa version */
    139126    return ::darwinIsWindowMaximized(::darwinToNativeWindow(pWidget));
    140 #else /* QT_MAC_USE_COCOA */
    141     NOREF(pWidget);
    142     return false;
    143 #endif /* !QT_MAC_USE_COCOA */
    144127}
    145128
     
    229212int darwinWindowToolBarHeight(QWidget *pWidget)
    230213{
    231 #ifndef QT_MAC_USE_COCOA
    232     return ::darwinWindowToolBarHeight(::darwinToNativeWindow(pWidget));
    233 #else /* QT_MAC_USE_COCOA */
    234214    NOREF(pWidget);
    235215    return 0;
    236 #endif /* QT_MAC_USE_COCOA */
    237216}
    238217
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r59032 r59092  
    667667                    if (mouseEvent(pWheelEvent->type(), uScreenId,
    668668                                   pWheelEvent->pos(), pWheelEvent->globalPos(),
    669 #ifdef QT_MAC_USE_COCOA
     669#ifdef Q_WS_MAC
    670670                                   /* Qt Cocoa is buggy. It always reports a left button pressed when the
    671671                                    * mouse wheel event occurs. A workaround is to ask the application which
    672672                                    * buttons are pressed currently: */
    673673                                   QApplication::mouseButtons(),
    674 #else /* QT_MAC_USE_COCOA */
     674#else /* !Q_WS_MAC */
    675675                                   pWheelEvent->buttons(),
    676 #endif /* !QT_MAC_USE_COCOA */
     676#endif /* !Q_WS_MAC */
    677677                                   iDelta, pWheelEvent->orientation()))
    678678                        return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r58863 r59092  
    10251025    sltHandleChooserPaneIndexChange();
    10261026
    1027 #ifdef QT_MAC_USE_COCOA
     1027#ifdef Q_WS_MAC
    10281028    /* Avoid bug in Qt Cocoa which results in showing a "more arrow" on size-hint changes: */
    10291029    m_pToolBar->updateLayout();
    1030 #endif /* QT_MAC_USE_COCOA */
     1030#endif /* Q_WS_MAC */
    10311031}
    10321032
     
    18311831    actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->blockSignals(false);
    18321832
    1833 #ifdef QT_MAC_USE_COCOA
     1833#ifdef Q_WS_MAC
    18341834    /* Avoid bug in Qt Cocoa which results in showing a "more arrow" on size-hint changes: */
    18351835    m_pToolBar->updateLayout();
    1836 #endif /* QT_MAC_USE_COCOA */
     1836#endif /* Q_WS_MAC */
    18371837}
    18381838
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r58856 r59092  
    397397                 * the button hasn't a rectangle shape. This prevents the
    398398                 * display of parts from the current text on the Mac. */
    399 #ifdef QT_MAC_USE_COCOA
     399#ifdef Q_WS_MAC
    400400                /* Use the palette from the tree view, not the one from the
    401401                 * editor. */
     
    403403                p.setBrush(QPalette::Highlight, pParent->palette().brush(QPalette::Highlight));
    404404                e->setPalette(p);
    405 #endif /* QT_MAC_USE_COCOA */
     405#endif /* Q_WS_MAC */
    406406                e->setAutoFillBackground(true);
    407407                e->setBackgroundRole(QPalette::Highlight);
     
    999999}
    10001000
    1001 #ifdef QT_MAC_USE_COCOA
     1001#ifdef Q_WS_MAC
    10021002bool VirtualSystemDelegate::eventFilter(QObject *pObject, QEvent *pEvent)
    10031003{
     
    10181018    return QItemDelegate::eventFilter(pObject, pEvent);
    10191019}
    1020 #endif /* QT_MAC_USE_COCOA */
     1020#endif /* Q_WS_MAC */
    10211021
    10221022////////////////////////////////////////////////////////////////////////////////
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h

    r55401 r59092  
    199199{
    200200public:
     201
    201202    VirtualSystemDelegate(QAbstractProxyModel *pProxy, QObject *pParent = NULL);
    202203
     
    219220
    220221protected:
    221 #ifdef QT_MAC_USE_COCOA
     222
     223#ifdef Q_WS_MAC
    222224    bool eventFilter(QObject *pObject, QEvent *pEvent);
    223 #endif /* QT_MAC_USE_COCOA */
    224 
    225 private:
     225#endif /* Q_WS_MAC */
     226
     227private:
     228
    226229    /* Private member vars */
    227230    QAbstractProxyModel *mProxy;
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