VirtualBox

Ignore:
Timestamp:
Jul 2, 2008 3:00:14 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
32622
Message:

FE/Qt4: Make it compile without the Qt3Support library at least on Linux & OS X.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r9072 r10112  
    167167                   wchar_t *aUniKey = NULL);
    168168    bool mouseEvent (int aType, const QPoint &aPos, const QPoint &aGlobalPos,
    169                      Qt::ButtonState aButton,
    170169                     Qt::MouseButtons aButtons, Qt::KeyboardModifiers aModifiers,
    171170                     int aWheelDelta, Qt::Orientation aWheelDir);
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h

    r9729 r10112  
    6363    VBoxConsoleWnd (VBoxConsoleWnd **aSelf,
    6464                     QWidget* aParent = 0,
    65                      Qt::WFlags aFlags = Qt::WType_TopLevel);
     65                     Qt::WindowFlags aFlags = Qt::Window);
    6666    virtual ~VBoxConsoleWnd();
    6767
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h

    r9287 r10112  
    536536    static QString sizeRegexp();
    537537
    538     static Q_UINT64 parseSize (const QString &);
    539     static QString formatSize (Q_UINT64, int aMode = 0);
     538    static quint64 parseSize (const QString &);
     539    static QString formatSize (quint64, int aMode = 0);
    540540
    541541    static QString highlight (const QString &aStr, bool aToolTip = false);
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxNewHDWzd.h

    r9729 r10112  
    4141    CHardDisk hardDisk() { return mChd; }
    4242    void setRecommendedFileName (const QString &aName);
    43     void setRecommendedSize (Q_UINT64 aSize);
     43    void setRecommendedSize (quint64 aSize);
    4444
    4545protected:
     
    6161
    6262    QString imageFileName();
    63     Q_UINT64 imageSize();
     63    quint64 imageSize();
    6464    bool isDynamicImage();
    65     void updateSizeToolTip (Q_UINT64 aSizeB);
     65    void updateSizeToolTip (quint64 aSizeB);
    6666    bool createHardDisk();
    6767
     
    6969    CHardDisk          mChd;
    7070    int                mSliderScale;
    71     Q_UINT64           mMaxVDISize;
    72     Q_UINT64           mCurrentSize;
     71    quint64            mMaxVDISize;
     72    quint64            mCurrentSize;
    7373};
    7474
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h

    r9729 r10112  
    5353    VBoxSelectorWnd (VBoxSelectorWnd **aSelf,
    5454                     QWidget* aParent = 0,
    55                      Qt::WFlags aFlags = Qt::WType_TopLevel);
     55                     Qt::WindowFlags aFlags = Qt::Window);
    5656    virtual ~VBoxSelectorWnd();
    5757
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUtils.h

    r9951 r10112  
    8585    void keyPressEvent (QKeyEvent *aEvent)
    8686    {
    87         if (aEvent->QInputEvent::modifiers () == Qt::ControlButton)
     87        if (aEvent->QInputEvent::modifiers () == Qt::ControlModifier)
    8888        {
    8989            switch (aEvent->key())
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIHotKeyEdit.cpp

    r9820 r10112  
    2323#include "QIHotKeyEdit.h"
    2424#include "VBoxDefs.h"
     25
     26/* Qt includes */
    2527#include <QApplication>
    2628#include <QStyleOption>
     
    123125
    124126    QPalette p = palette();
    125     p.setColor (QPalette::Active, QColorGroup::Foreground,
    126                 p.color (QPalette::Active, QColorGroup::Text));
    127     p.setColor (QPalette::Active, QColorGroup::Background,
    128                 p.color (QPalette::Active, QColorGroup::Base));
     127    p.setColor (QPalette::Active, QPalette::Foreground,
     128                p.color (QPalette::Active, QPalette::Text));
     129    p.setColor (QPalette::Active, QPalette::Background,
     130                p.color (QPalette::Active, QPalette::Base));
    129131    setPalette (p);
    130132
     
    197199    ensurePolished();
    198200    QFontMetrics fm (font());
    199     int h = QMAX (fm.lineSpacing(), 14) + 2;
     201    int h = qMax (fm.lineSpacing(), 14) + 2;
    200202    int w = fm.width ('x') * 17; // "some"
    201203    int m = frameWidth() * 2;
     
    215217    ensurePolished();
    216218    QFontMetrics fm = fontMetrics();
    217     int h = fm.height() + QMAX (2, fm.leading());
     219    int h = fm.height() + qMax (2, fm.leading());
    218220    int w = fm.maxWidth();
    219221    int m = frameWidth() * 2;
     
    713715
    714716    QPalette p = palette();
    715     p.setColor (QPalette::Active, QColorGroup::Foreground,
    716                 p.color (QPalette::Active, QColorGroup::HighlightedText));
    717     p.setColor (QPalette::Active, QColorGroup::Background,
    718                 p.color (QPalette::Active, QColorGroup::Highlight));
     717    p.setColor (QPalette::Active, QPalette::Foreground,
     718                p.color (QPalette::Active, QPalette::HighlightedText));
     719    p.setColor (QPalette::Active, QPalette::Background,
     720                p.color (QPalette::Active, QPalette::Highlight));
    719721    setPalette (p);
    720722}
     
    725727
    726728    QPalette p = palette();
    727     p.setColor (QPalette::Active, QColorGroup::Foreground,
    728                 p.color (QPalette::Active, QColorGroup::Text));
    729     p.setColor (QPalette::Active, QColorGroup::Background,
    730                 p.color (QPalette::Active, QColorGroup::Base));
     729    p.setColor (QPalette::Active, QPalette::Foreground,
     730                p.color (QPalette::Active, QPalette::Text));
     731    p.setColor (QPalette::Active, QPalette::Background,
     732                p.color (QPalette::Active, QPalette::Base));
    731733    setPalette (p);
    732734}
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIStateIndicator.cpp

    r10105 r10112  
    126126    if (aEv->button() == Qt::LeftButton)
    127127    {
    128         QContextMenuEvent qme (QContextMenuEvent::Mouse, aEv->pos(), aEv->globalPos(), 0);
     128        QContextMenuEvent qme (QContextMenuEvent::Mouse, aEv->pos(), aEv->globalPos());
    129129        emit contextMenuRequested (this, &qme);
    130130        if (qme.isAccepted())
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r9495 r10112  
    15161516                QMouseEvent *me = (QMouseEvent *) e;
    15171517                if (mouseEvent (me->type(), me->pos(), me->globalPos(),
    1518                                 me->button(), me->buttons(), me->modifiers(),
     1518                                me->buttons(), me->modifiers(),
    15191519                                0, Qt::Horizontal))
    15201520                    return true; /* stop further event handling */
     
    15251525                QWheelEvent *we = (QWheelEvent *) e;
    15261526                if (mouseEvent (we->type(), we->pos(), we->globalPos(),
    1527                                 Qt::NoButton, we->buttons(), we->modifiers(),
     1527                                we->buttons(), we->modifiers(),
    15281528                                we->delta(), we->orientation()))
    15291529                    return true; /* stop further event handling */
     
    26512651 *  @return     true to consume the event and false to pass it to Qt
    26522652 */
    2653 bool VBoxConsoleView::mouseEvent (int aType, const QPoint &aPos,
    2654                                   const QPoint &aGlobalPos, Qt::ButtonState aButton,
     2653bool VBoxConsoleView::mouseEvent (int aType, const QPoint &aPos, const QPoint &aGlobalPos,
    26552654                                  Qt::MouseButtons aButtons, Qt::KeyboardModifiers aModifiers,
    26562655                                  int aWheelDelta, Qt::Orientation aWheelDir)
     
    26612660             "MOUSE: type=%03d x=%03d y=%03d btn=%03d btns=%08X mod=%08X "
    26622661             "wdelta=%03d wdir=%03d",
    2663              aType, aPos.x(), aPos.y(), aButton, aButtons, aModifiers,
     2662             aType, aPos.x(), aPos.y(), aButtons, aModifiers,
    26642663             aWheelDelta, aWheelDir);
    26652664    mMainWnd->statusBar()->message (buf);
    26662665#else
    2667     Q_UNUSED (aButton);
    26682666    Q_UNUSED (aModifiers);
    26692667#endif
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r9495 r10112  
    112112VBoxConsoleWnd::
    113113VBoxConsoleWnd (VBoxConsoleWnd **aSelf, QWidget* aParent,
    114                 Qt::WFlags aFlags)
     114                Qt::WindowFlags aFlags /* = Qt::Window */)
    115115    : QIWithRetranslateUI2<QMainWindow> (aParent, aFlags)
    116116    , mMainMenu (0)
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r10105 r10112  
    227227                        if (sVal.isEmpty() ||
    228228                            sVal == QString ("%1")
    229                                 .arg ((Q_ULLONG) vboxGlobal().mainWindow()->winId()))
     229                                .arg ((qulonglong) vboxGlobal().mainWindow()->winId()))
    230230                            *allowChange = TRUE;
    231231                        else
     
    278278                    }
    279279                    else if (sVal == QString ("%1")
    280                                 .arg ((Q_ULLONG) vboxGlobal().mainWindow()->winId()))
     280                                .arg ((qulonglong) vboxGlobal().mainWindow()->winId()))
    281281                    {
    282282                        mIsRegDlgOwner = true;
     
    28932893        frameh = current->frameGeometry().height() - current->height();
    28942894
    2895         extraw = QMAX (extraw, framew);
    2896         extrah = QMAX (extrah, frameh);
     2895        extraw = qMax (extraw, framew);
     2896        extrah = qMax (extrah, frameh);
    28972897    }
    28982898
     
    29642964 */
    29652965/* static */
    2966 Q_UINT64 VBoxGlobal::parseSize (const QString &aText)
     2966quint64 VBoxGlobal::parseSize (const QString &aText)
    29672967{
    29682968    QRegExp regexp (sizeRegexp());
     
    29802980        }
    29812981
    2982         Q_UINT64 denom = 0;
     2982        quint64 denom = 0;
    29832983        if (suff.isEmpty() || suff == "B")
    29842984            denom = 1;
     
    29942994            denom = _1P;
    29952995
    2996         Q_UINT64 intg = intgS.toULongLong();
     2996        quint64 intg = intgS.toULongLong();
    29972997        if (denom == 1)
    29982998            return intg;
    29992999
    3000         Q_UINT64 hund = hundS.leftJustified (2, '0').toULongLong();
     3000        quint64 hund = hundS.leftJustified (2, '0').toULongLong();
    30013001        hund = hund * denom / 100;
    30023002        intg = intg * denom + hund;
     
    30343034 */
    30353035/* static */
    3036 QString VBoxGlobal::formatSize (Q_UINT64 aSize, int aMode /* = 0 */)
     3036QString VBoxGlobal::formatSize (quint64 aSize, int aMode /* = 0 */)
    30373037{
    30383038    static const char *Suffixes [] = { "B", "KB", "MB", "GB", "TB", "PB", NULL };
    30393039
    3040     Q_UINT64 denom = 0;
     3040    quint64 denom = 0;
    30413041    int suffix = 0;
    30423042
     
    30723072    }
    30733073
    3074     Q_UINT64 intg = aSize / denom;
    3075     Q_UINT64 hund = aSize % denom;
     3074    quint64 intg = aSize / denom;
     3075    quint64 hund = aSize % denom;
    30763076
    30773077    QString number;
     
    38543854         * the SetExtraData() call. */
    38553855        mVBox.SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID,
    3856                             QString ("%1").arg ((Q_ULLONG) mMainWindow->winId()));
     3856                            QString ("%1").arg ((qulonglong) mMainWindow->winId()));
    38573857
    38583858        if (mVBox.isOk())
     
    38603860            /* We've got the "mutex", create a new registration dialog */
    38613861            VBoxRegistrationDlg *dlg =
    3862                 new VBoxRegistrationDlg (&mRegDlg, 0, Qt::WDestructiveClose);
     3862                new VBoxRegistrationDlg (&mRegDlg, 0);
     3863            dlg->setAttribute (Qt::WA_DeleteOnClose);
    38633864            Assert (dlg == mRegDlg);
    38643865            mRegDlg->show();
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNewHDWzd.cpp

    r9089 r10112  
    3030
    3131/** Minimum VDI size in MB */
    32 static const Q_UINT64 MinVDISize = 4;
     32static const quint64 MinVDISize = 4;
    3333
    3434/** Initial VDI size in MB */
    35 static const Q_UINT64 InitialVDISize = 2 * _1K;
     35static const quint64 InitialVDISize = 2 * _1K;
    3636
    3737/**
     
    6060}
    6161
    62 static inline int log2i (Q_UINT64 val)
    63 {
    64     Q_UINT64 n = val;
     62static inline int log2i (quint64 val)
     63{
     64    quint64 n = val;
    6565    int pow = -1;
    6666    while (n)
     
    7272}
    7373
    74 static inline int sizeMBToSlider (Q_UINT64 val, int aSliderScale)
     74static inline int sizeMBToSlider (quint64 val, int aSliderScale)
    7575{
    7676    int pow = log2i (val);
    77     Q_UINT64 tickMB = Q_UINT64 (1) << pow;
    78     Q_UINT64 tickMBNext = Q_UINT64 (1) << (pow + 1);
     77    quint64 tickMB = quint64 (1) << pow;
     78    quint64 tickMBNext = quint64 (1) << (pow + 1);
    7979    int step = (val - tickMB) * aSliderScale / (tickMBNext - tickMB);
    8080    return pow * aSliderScale + step;
    8181}
    8282
    83 static inline Q_UINT64 sliderToSizeMB (int val, int aSliderScale)
     83static inline quint64 sliderToSizeMB (int val, int aSliderScale)
    8484{
    8585    int pow = val / aSliderScale;
    8686    int step = val % aSliderScale;
    87     Q_UINT64 tickMB = Q_UINT64 (1) << pow;
    88     Q_UINT64 tickMBNext = Q_UINT64 (1) << (pow + 1);
     87    quint64 tickMB = quint64 (1) << pow;
     88    quint64 tickMBNext = quint64 (1) << (pow + 1);
    8989    return tickMB + (tickMBNext - tickMB) * step / aSliderScale;
    9090}
     
    110110    {
    111111        int pow = log2i (mMaxVDISize);
    112         Q_UINT64 tickMB = Q_UINT64 (1) << pow;
     112        quint64 tickMB = quint64 (1) << pow;
    113113        if (tickMB < mMaxVDISize)
    114114        {
    115             Q_UINT64 tickMBNext = Q_UINT64 (1) << (pow + 1);
    116             Q_UINT64 gap = tickMBNext - mMaxVDISize;
     115            quint64 tickMBNext = quint64 (1) << (pow + 1);
     116            quint64 gap = tickMBNext - mMaxVDISize;
    117117            mSliderScale = (int) ((tickMBNext - tickMB) / gap);
    118118        }
    119119    }
    120     mSliderScale = QMAX (mSliderScale, 8);
     120    mSliderScale = qMax (mSliderScale, 8);
    121121    mLeName->setValidator (new QRegExpValidator (QRegExp( ".+" ), this));
    122122    mLeSize->setValidator (new QRegExpValidator (QRegExp(vboxGlobal().sizeRegexp()), this));
     
    170170}
    171171
    172 void VBoxNewHDWzd::setRecommendedSize (Q_UINT64 aSize)
     172void VBoxNewHDWzd::setRecommendedSize (quint64 aSize)
    173173{
    174174    AssertReturnVoid (aSize >= MinVDISize && aSize <= mMaxVDISize);
     
    192192        type = VBoxGlobal::removeAccelMark (type);
    193193
    194         Q_UINT64 sizeB = imageSize() * _1M;
     194        quint64 sizeB = imageSize() * _1M;
    195195
    196196        /* compose summary */
     
    352352}
    353353
    354 Q_UINT64 VBoxNewHDWzd::imageSize()
     354quint64 VBoxNewHDWzd::imageSize()
    355355{
    356356    return mCurrentSize;
     
    362362}
    363363
    364 void VBoxNewHDWzd::updateSizeToolTip (Q_UINT64 aSizeB)
     364void VBoxNewHDWzd::updateSizeToolTip (quint64 aSizeB)
    365365{
    366366    QString tip = tr ("<nobr>%1 Bytes</nobr>").arg (aSizeB);
     
    372372{
    373373    QString src = imageFileName();
    374     Q_UINT64 size = imageSize();
     374    quint64 size = imageSize();
    375375
    376376    AssertReturn (!src.isEmpty(), false);
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp

    r9652 r10112  
    7171                        int aMinDuration = 2000, QWidget *aCreator = 0)
    7272        : QProgressDialog (aCreator,
    73                            Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title)
     73                           Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint)
    7474        , mProgress (aProgress)
    7575        , mCalcelEnabled (true)
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r10105 r10112  
    387387VBoxSelectorWnd::
    388388VBoxSelectorWnd (VBoxSelectorWnd **aSelf, QWidget* aParent,
    389                  Qt::WFlags aFlags)
     389                 Qt::WindowFlags aFlags /* = Qt::Window */)
    390390    : QIWithRetranslateUI2<QMainWindow> (aParent, aFlags)
    391391    , doneInaccessibleWarningOnce (false)
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMInformationDlg.cpp

    r9364 r10112  
    3838        /* Creating new information dialog if there is no one existing */
    3939        mSelfArray [machine.GetName()] = new VBoxVMInformationDlg (
    40             aConsole, aSession, Qt::WType_TopLevel | Qt::WDestructiveClose);
     40            aConsole, aSession, Qt::Window);
     41        mSelfArray [machine.GetName()]->setAttribute (Qt::WA_DeleteOnClose);
    4142    }
    4243
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSF.cpp

    r9654 r10112  
    271271        new SFTreeViewItem (mTreeView, fields, SFTreeViewItem::EllipsisEnd);
    272272    }
    273     mTreeView->sortItems (0, Qt::Ascending);
     273    mTreeView->sortItems (0, Qt::AscendingOrder);
    274274
    275275    retranslateUi();
     
    398398    SFTreeViewItem *item = new SFTreeViewItem (root, fields,
    399399                                               SFTreeViewItem::EllipsisFile);
    400     mTreeView->sortItems (0, Qt::Ascending);
     400    mTreeView->sortItems (0, Qt::AscendingOrder);
    401401    mTreeView->scrollToItem (item);
    402402    mTreeView->setCurrentItem (item);
     
    444444           << "edited" /* mark item as edited */;
    445445    item->updateText (fields);
    446     mTreeView->sortItems (0, Qt::Ascending);
     446    mTreeView->sortItems (0, Qt::AscendingOrder);
    447447    if (item->parent() != root)
    448448    {
     
    640640    }
    641641    aRoot->setExpanded (true);
    642     mTreeView->sortItems (0, Qt::Ascending);
     642    mTreeView->sortItems (0, Qt::AscendingOrder);
    643643    mTreeView->setCurrentItem (aRoot->childCount() ? aRoot->child (0) : aRoot);
    644644    processCurrentChanged (aRoot->childCount() ? aRoot->child (0) : aRoot);
  • trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp

    r9495 r10112  
    187187         * different annoying color, so fixing palette button's color */
    188188//#warning "port me: any longer required?"
    189         QPalette pal = a.palette();
    190         pal.setColor (QPalette::Disabled, QColorGroup::Button,
    191                       pal.color (QPalette::Disabled, QColorGroup::Background));
    192         pal.setColor (QPalette::Active, QColorGroup::Button,
    193                       pal.color (QPalette::Active, QColorGroup::Background));
    194         pal.setColor (QPalette::Inactive, QColorGroup::Button,
    195                       pal.color (QPalette::Inactive, QColorGroup::Background));
    196         a.setPalette (pal);
     189//        QPalette pal = a.palette();
     190//        pal.setColor (QPalette::Disabled, QColorGroup::Button,
     191//                      pal.color (QPalette::Disabled, QColorGroup::Background));
     192//        pal.setColor (QPalette::Active, QColorGroup::Button,
     193//                      pal.color (QPalette::Active, QColorGroup::Background));
     194//        pal.setColor (QPalette::Inactive, QColorGroup::Button,
     195//                      pal.color (QPalette::Inactive, QColorGroup::Background));
     196//        a.setPalette (pal);
    197197#else /* !Q_WS_MAC */
    198198        ::darwinDisableIconsInMenus();
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