VirtualBox

Changeset 59094 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 11, 2015 3:10:25 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 37): No MAC_LEOPARD_STYLE 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/extensions/QIListView.cpp

    r52733 r59094  
    2121
    2222/* Qt includes: */
    23 # if MAC_LEOPARD_STYLE
     23# ifdef Q_WS_MAC
     24#  include <QApplication>
    2425#  include <QPainter>
    25 #  include <QApplication>
    26 # endif /* MAC_LEOPARD_STYLE */
     26# endif /* Q_WS_MAC */
    2727
    2828#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2929
    30 #if MAC_LEOPARD_STYLE
     30/* Qt includes: */
     31#ifdef Q_WS_MAC
    3132# include <qmacstyle_mac.h>
    32 #endif /* MAC_LEOPARD_STYLE */
     33#endif /* Q_WS_MAC */
    3334
    3435/* GUI includes: */
     
    3940    :QListView (aParent)
    4041{
     42#ifdef Q_WS_MAC
    4143    /* Track if the application lost the focus */
    42 #if MAC_LEOPARD_STYLE
    4344    connect (QCoreApplication::instance(), SIGNAL (focusChanged (QWidget *, QWidget *)),
    4445             this, SLOT (focusChanged (QWidget *, QWidget *)));
     
    5152     * may change at any time! */
    5253    static_cast<QMacStyle *> (style())->setFocusRectPolicy (this, QMacStyle::FocusDisabled);
    53 #endif /* MAC_LEOPARD_STYLE */
     54#endif /* Q_WS_MAC */
    5455}
    5556
    5657void QIListView::focusChanged (QWidget * /* aOld */, QWidget *aNow)
    5758{
    58 #if MAC_LEOPARD_STYLE
     59#ifdef Q_WS_MAC
    5960    QColor bgColor (212, 221, 229);
    6061    if (aNow == NULL)
     
    6465    viewport()->setPalette (pal);
    6566    viewport()->setAutoFillBackground(true);
    66 #else /* MAC_LEOPARD_STYLE */
     67#else /* !Q_WS_MAC */
    6768    Q_UNUSED (aNow);
    68 #endif /* MAC_LEOPARD_STYLE */
     69#endif /* !Q_WS_MAC */
    6970}
    7071
     
    7475                                     const QModelIndex &aIndex) const
    7576{
    76 #if MAC_LEOPARD_STYLE
    77     NOREF (aIndex);
     77#ifdef Q_WS_MAC
     78    Q_UNUSED (aIndex);
    7879    /* Macify for Leopard */
    7980    if (aOption.state & QStyle::State_Selected)
     
    116117        aPainter->fillRect(aOption.rect, bgColor);
    117118    }
    118 #else /* MAC_LEOPARD_STYLE */
     119#else /* !Q_WS_MAC */
    119120    QItemDelegate::drawBackground (aPainter, aOption, aIndex);
    120 #endif /* MAC_LEOPARD_STYLE */
     121#endif /* !Q_WS_MAC */
    121122}
    122123
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r58866 r59094  
    13101310                         m_pMainLayout == centralWidget()->layout());
    13111311        {
    1312 #if MAC_LEOPARD_STYLE
     1312#ifdef Q_WS_MAC
    13131313            /* No spacing/margins on the Mac: */
    13141314            m_pMainLayout->setContentsMargins(0, 0, 0, 0);
    13151315            m_pMainLayout->insertSpacing(0, 10);
    1316 #else /* !MAC_LEOPARD_STYLE */
     1316#else /* !Q_WS_MAC */
    13171317            /* Set spacing/margin like in the selector window: */
    13181318            m_pMainLayout->setSpacing(5);
    13191319            m_pMainLayout->setContentsMargins(5, 5, 5, 5);
    1320 #endif /* !MAC_LEOPARD_STYLE */
     1320#endif /* !Q_WS_MAC */
    13211321            /* Prepare tool-bar: */
    13221322            prepareToolBar();
     
    13481348        m_pToolBar->addAction(m_pActionSave);
    13491349        /* Integrate tool-bar into dialog: */
    1350 #if MAC_LEOPARD_STYLE
     1350#ifdef Q_WS_MAC
    13511351        /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */
    13521352        addToolBar(m_pToolBar);
    13531353        m_pToolBar->enableMacToolbar();
    1354 #else /* !MAC_LEOPARD_STYLE */
     1354#else /* !Q_WS_MAC */
    13551355        /* Add tool-bar into main-layout: */
    13561356        m_pMainLayout->addWidget(m_pToolBar);
    1357 #endif /* !MAC_LEOPARD_STYLE */
     1357#endif /* !Q_WS_MAC */
    13581358    }
    13591359}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r57953 r59094  
    3636
    3737/* Defines: */
    38 #define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300)
    39 
    4038#ifdef DEBUG
    4139# define AssertWrapperOk(w)      \
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r59092 r59094  
    11541154        /* Integrate tool-bar into dialog: */
    11551155        QVBoxLayout *pMainLayout = qobject_cast<QVBoxLayout*>(centralWidget()->layout());
    1156 #if MAC_LEOPARD_STYLE
     1156#ifdef Q_WS_MAC
    11571157        /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */
    11581158        addToolBar(m_pToolBar);
     
    11611161        pMainLayout->setContentsMargins(0, 0, 0, 0);
    11621162        pMainLayout->insertSpacing(0, 10);
    1163 #else /* MAC_LEOPARD_STYLE */
     1163#else /* !Q_WS_MAC */
    11641164        /* Add the tool-bar: */
    11651165        pMainLayout->insertWidget(0, m_pToolBar);
     
    11671167        pMainLayout->setSpacing(5);
    11681168        pMainLayout->setContentsMargins(5, 5, 5, 5);
    1169 #endif /* !MAC_LEOPARD_STYLE */
     1169#endif /* !Q_WS_MAC */
    11701170    }
    11711171}
  • trunk/src/VBox/Frontends/VirtualBox/src/precomp.h

    r58948 r59094  
    673673#endif
    674674
    675 
    676 /*
    677  * Final tweaks.
    678  */
    679 #ifdef Q_WS_MAC
    680 # if MAC_LEOPARD_STYLE /* This is defined by UIDefs.h and must come after it was included */
    681 //#  include <qmacstyle_mac.h> - only used once
    682 # endif
    683 #endif
    684 
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r59092 r59094  
    11571157
    11581158#ifdef Q_WS_MAC
    1159 # if MAC_LEOPARD_STYLE
    1160     /* Enable unified toolbars on Mac OS X: */
     1159    /* Enable unified toolbar: */
    11611160    m_pToolBar->enableMacToolbar();
    1162 # endif /* MAC_LEOPARD_STYLE */
    11631161
    11641162    /* Beta label? */
     
    15091507
    15101508    /* Layout all the widgets: */
    1511 #if MAC_LEOPARD_STYLE
     1509#ifdef Q_WS_MAC
    15121510    addToolBar(m_pToolBar);
    15131511    /* Central widget @ horizontal layout: */
    15141512    setCentralWidget(m_pSplitter);
    15151513    m_pSplitter->addWidget(m_pPaneChooser);
    1516 #else /* MAC_LEOPARD_STYLE */
     1514#else /* !Q_WS_MAC */
    15171515    QWidget *pCentralWidget = new QWidget(this);
    15181516    setCentralWidget(pCentralWidget);
     
    15251523    pCentralLayout->addWidget(m_pSplitter);
    15261524    m_pSplitter->addWidget(m_pPaneChooser);
    1527 #endif /* !MAC_LEOPARD_STYLE */
     1525#endif /* !Q_WS_MAC */
    15281526    m_pSplitter->addWidget(m_pContainerDetails);
    15291527
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp

    r55742 r59094  
    4343# ifdef Q_WS_MAC
    4444#  include "VBoxUtils.h"
    45 # endif
     45# endif /* Q_WS_MAC */
    4646
    4747#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4848
    4949#ifdef Q_WS_MAC
    50 # if MAC_LEOPARD_STYLE
    51 #  define VBOX_GUI_WITH_TOOLBAR_SETTINGS
    52 # endif
    53 #endif
     50# define VBOX_GUI_WITH_TOOLBAR_SETTINGS
     51#endif /* Q_WS_MAC */
    5452
    5553/* Settings Dialog Constructor: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r55742 r59094  
    6262
    6363#ifdef Q_WS_MAC
    64 # if MAC_LEOPARD_STYLE
    65 #  define VBOX_GUI_WITH_TOOLBAR_SETTINGS
    66 # endif
    67 #endif
     64# define VBOX_GUI_WITH_TOOLBAR_SETTINGS
     65#endif /* Q_WS_MAC */
    6866
    6967UISettingsDialogGlobal::UISettingsDialogGlobal(QWidget *pParent,
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