VirtualBox

Changeset 9495 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 6, 2008 4:36:40 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31761
Message:

FE/Qt4: Made it build on win.x86.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk

    r9386 r9495  
    6868
    6969VBOX_MODULE_QT4     = QtCore QtGui QtNetwork Qt3Support
     70# @todo: remove later: this is necessary only as long as Qt3Support is necessary
     71# (it links to them)
     72VBOX_MODULE_QT4    += QtSql QtXml
     73
    7074VBOX_DEFS_QT4       = QT_CORE_LIB QT_GUI_LIB QT_NETWORK_LIB QT_QT3SUPPORT_LIB
    7175
     
    7680 VBOX_LIBS_QT4       =
    7781else
     82
    7883 VBOX_INCS_QT4       = \
    79         $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++ \
    8084        $(addprefix $(VBOX_PATH_QT4_INCLUDE)/, $(VBOX_MODULE_QT4) Qt) \
    8185        $(VBOX_PATH_QT4_INCLUDE)
    82  VBOX_LIBS_QT4       = $(VBOX_MODULE_QT4)
     86 ifeq ($(KBUILD_TARGET),win)
     87  ifeq ($(KBUILD_TARGET_ARCH),amd64)
     88   $(error Port me!)
     89  else
     90   VBOX_INCS_QT4    += $(VBOX_PATH_QT4_SHARE)/mkspecs/win32-msvc.net
     91  endif
     92 else ifeq ($(KBUILD_TARGET),linux)
     93  VBOX_INCS_QT4     += $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++
     94 endif
     95
     96 # add the VBox prefix to Qt libs if they are built by us
     97 ifeq ($(KBUILD_TARGET),win)
     98  VBOX_LIBS_QT4      = $(patsubst %, VBox%4, $(VBOX_MODULE_QT4))
     99  VBOX_QT4_RUNTIME   = $(patsubst %, $(VBOX_PATH_QT4_LIB)/VBox%4.dll, $(VBOX_MODULE_QT4))
     100 else
     101  VBOX_LIBS_QT4      = $(VBOX_MODULE_QT4)
     102  VBOX_QT4_RUNTIME   =
     103 endif
     104
     105 ifeq ($(KBUILD_TARGET),win)
     106  VBOX_LIBS_QT4     := $(addsuffix .lib, $(VBOX_LIBS_QT4)) VBoxqtmain.lib
     107 endif
     108
    83109endif
    84110
     
    96122VBOX_LRELEASE4 ?= $(VBOX_PATH_QT4_BIN)/lrelease
    97123
     124# tell moc what platform we are on to let it properly define
     125# Q_OS_* and Q_WS_* macros when including qglobal.h
     126# (is there a better way?)
     127ifeq ($(KBUILD_TARGET),win)
     128 ifeq ($(KBUILD_TARGET_ARCH),amd64)
     129  VBOX_MOC4    += -DWIN64
     130 else
     131  VBOX_MOC4    += -DWIN32
     132 endif
     133else ifeq ($(KBUILD_TARGET),linux)
     134 # when nothing special is defined, Q_OS_UNIX/Q_WS_X11 will be set
     135else
     136 $(error Port me!)
     137endif
     138
     139# The Qt DLLs (move to the root Makefile.kmk, and remove bin from INSTALLS below).
     140bin_SOURCES += $(VBOX_QT4_RUNTIME)
     141bin_INST = $(INST_BIN)
     142bin_MODE = 644
     143
    98144# Template copy from the qt3 stuff. Appended a "4" on the
    99145# relevant places.
     
    110156
    111157ifeq ($(KBUILD_TARGET),win)
    112  # drag in library configuration (we need QMAKE_PRL_DEFINES)
    113  ifneq ($(LIB_QT_PRL),)
    114   include $(LIB_QT_PRL)
    115  endif
    116158 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL)
    117159 TEMPLATE_VBOXQT4GUIEXE_DEFS += \
     
    136178 TEMPLATE_VBOXQT4GUIEXE_SDKS = WINPSDK
    137179 TEMPLATE_VBOXQT4GUIEXE_LIBS = \
    138         $(LIB_QT) \
    139         $(LIB_QTMAIN) \
     180        $(VBOX_LIBS_QT4) \
    140181        $(LIB_RUNTIME) \
    141182        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
     
    144185        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
    145186        $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
     187 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = $(VBOX_PATH_QT4_LIB)
    146188 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
    147189
     
    185227  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(foreach mod, $(VBOX_MODULE_QT4), -framework $(mod)) \
    186228        -framework Carbon -framework QuickTime -bind_at_load
    187   TEMPLATE_VBOXQT4GUIEXE_LIBS +=
    188   TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
    189  else ifeq ($(KBUILD_TARGET),os2)
    190   # drag in library configuration (we need QMAKE_PRL_DEFINES)
    191   ifneq ($(LIB_QT_PRL),)
    192    include $(LIB_QT_PRL)
    193   endif
    194   TEMPLATE_VBOXQT4GUIEXE_DEFS += $(QMAKE_PRL_DEFINES)
    195229  TEMPLATE_VBOXQT4GUIEXE_LIBS +=
    196230  TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
     
    332366OTHERS = $(PATH_BIN)/vboxkeyboard4.tar.gz
    333367endif
    334 INSTALLS = VirtualBox.nls
     368INSTALLS = VirtualBox.nls bin
    335369
    336370ifeq ($(KBUILD_TARGET),os2)
     
    486520# Sources containing local definitions of classes that use the Q_OBJECT macro
    487521VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
    488 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
    489 VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
    490 endif
    491522ifdef VBOX_WITH_XPCOM
    492523VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h

    r8155 r9495  
    8282     * This is a temporary hack, we'll set the style globally later.
    8383     */
    84 #warning port me
     84//#warning port me
    8585    void setMacStyle()
    8686    {
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIHotKeyEdit.cpp

    r8946 r9495  
    210210    int w = fm.width( 'x' ) * 17; // "some"
    211211    int m = frameWidth() * 2;
    212 #warning port me
     212//#warning port me
    213213//    return (style()->sizeFromContents (QStyle::CT_LineEdit, this,
    214214//                                      QSize (w + m, h + m)
     
    231231
    232232#if defined (Q_WS_PM)
    233 /** 
     233/**
    234234 *  Returns the virtual key extracted from the QMSG structure.
    235235 *
     
    237237 *  in PM (like Left Shift, Left Ctrl, Win keys). In all other cases it simply
    238238 *  returns SHORT2FROMMP (aMsg->mp2).
    239  * 
     239 *
    240240 *  @param aMsg  Pointer to the QMSG structure to extract the virtual key from.
    241241 *  @return The extracted virtual key code or zero if there is no virtual key.
     
    733733void QIHotKeyEdit::drawContents (QPainter * p)
    734734{
    735 #warning port me
     735//#warning port me
    736736//    QLabel::drawContents (p);
    737737//    if (hasFocus())
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIStateIndicator.cpp

    r8705 r9495  
    111111    if (icon)
    112112    {
    113 #warning port me
     113//#warning port me
    114114        /* I didn't see any benefits of caching the icon
    115115         * background drawing in Qt4. This is already done
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp

    r9091 r9495  
    5151    QStatusBar::paintEvent (e);
    5252    return;
    53 #warning port me: is this needed anymore?
     53//#warning port me: is this needed anymore?
    5454//    QPainter p (this);
    5555//
     
    6464//#endif
    6565//
    66 //    if (!message.isEmpty()) 
     66//    if (!message.isEmpty())
    6767//    {
    6868//        p.setPen (colorGroup().foreground());
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r9076 r9495  
    22662266#else
    22672267
    2268 #warning Adapt VBoxConsoleView::fixModifierState
     2268//#warning Adapt VBoxConsoleView::fixModifierState
    22692269
    22702270#endif
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r9304 r9495  
    33583358void VBoxConsoleWnd::tryClose()
    33593359{
    3360 #warning "port me"
     3360//#warning "port me"
    33613361    /* First close any open modal & popup widgets. Use a single shot with
    33623362     * timeout 0 to allow the widgets to cleany close and test then again. If
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBDDRAW.cpp

    r8155 r9495  
    236236    if (mSynchronousUpdates)
    237237    {
    238         mView->updateContents (aX, aY, aW, aH);
     238//#warning check me!
     239        mView->viewport()->update (aX, aY, aW, aH);
    239240    }
    240241    else
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp

    r8902 r9495  
    352352     * we create a qpainter object and paint on
    353353     * that. Todo: Do some performance test. */
    354 #warning port me: do it faster?
     354//#warning port me: do it faster?
    355355    QPainter painter (mView->viewport());
    356356    painter.drawImage (r.x(), r.y(), mImg,
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r9287 r9495  
    226226                    {
    227227                        if (sVal.isEmpty() ||
    228                             sVal == QString ("%1").arg (static_cast<long> (vboxGlobal().mainWindow()->winId())))
     228                            sVal == QString ("%1")
     229                                .arg ((Q_ULLONG) vboxGlobal().mainWindow()->winId()))
    229230                            *allowChange = TRUE;
    230231                        else
     
    276277                        QApplication::postEvent (&mGlobal, new VBoxCanShowRegDlgEvent (true));
    277278                    }
    278                     else if (sVal == QString ("%1").arg (static_cast<long> (vboxGlobal().mainWindow()->winId())))
     279                    else if (sVal == QString ("%1")
     280                                .arg ((Q_ULLONG) vboxGlobal().mainWindow()->winId()))
    279281                    {
    280282                        mIsRegDlgOwner = true;
     
    520522 *  QObject class reimplementation which is the target for OpenNativeDialogEvent
    521523 *  event. It receives OpenNativeDialogEvent event from another thread,
    522  *  stores result information and exits event processing loop.
     524 *  stores result information and exits the given local event loop.
    523525 */
    524526class LoopObject : public QObject
     
    526528public:
    527529
    528     LoopObject (QEvent::Type aType) : mType (aType), mResult (QString::null) {}
     530    LoopObject (QEvent::Type aType, QEventLoop &aLoop)
     531        : mType (aType), mLoop (aLoop), mResult (QString::null) {}
    529532    const QString& result() { return mResult; }
    530533
     
    533536    bool event (QEvent *aEvent)
    534537    {
     538//#warning check me!
    535539        if (aEvent->type() == mType)
    536540        {
    537541            OpenNativeDialogEvent *ev = (OpenNativeDialogEvent*) aEvent;
    538542            mResult = ev->result();
    539             qApp->eventLoop()->exitLoop();
     543            mLoop.exit();
    540544            return true;
    541545        }
     
    544548
    545549    QEvent::Type mType;
     550    QEventLoop &mLoop;
    546551    QString mResult;
    547552};
     
    24732478     * human readable key names, we keep a table of them, which must be
    24742479     * updated when the language is changed. */
    2475 #warning port me
     2480//#warning port me
    24762481    QIHotKeyEdit::retranslateUi();
    24772482#endif
     
    32453250            QString result;
    32463251
    3247             QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow();
     3252            QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget();
    32483253            QString title = mCaption.isNull() ? tr ("Select a directory") : mCaption;
    32493254
     
    33023307    };
    33033308
     3309//#warning check me!
     3310
     3311    /* Local event loop to run while waiting for the result from another
     3312     * thread */
     3313    QEventLoop loop;
     3314
    33043315    QString dir = QDir::convertSeparators (aDir);
    3305     LoopObject loopObject ((QEvent::Type) GetExistDirectoryEvent::TypeId);
     3316    LoopObject loopObject ((QEvent::Type) GetExistDirectoryEvent::TypeId, loop);
     3317
    33063318    Thread openDirThread (aParent, &loopObject, dir, aCaption);
    33073319    openDirThread.start();
    3308     qApp->eventLoop()->enterLoop();
     3320    loop.exec();
    33093321    openDirThread.wait();
     3322
    33103323    return loopObject.result();
    33113324
     
    33943407            QString title = mCaption.isNull() ? tr ("Select a file") : mCaption;
    33953408
    3396             QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow();
     3409            QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget();
    33973410            QString winFilters = winFilter (mFilters);
    33983411            AssertCompile (sizeof (TCHAR) == sizeof (QChar));
     
    34453458    if (aSelectedFilter)
    34463459        *aSelectedFilter = QString::null;
     3460
     3461//#warning check me!
     3462
     3463    /* Local event loop to run while waiting for the result from another
     3464     * thread */
     3465    QEventLoop loop;
     3466
    34473467    QString startWith = QDir::convertSeparators (aStartWith);
    3448     LoopObject loopObject ((QEvent::Type) GetOpenFileNameEvent::TypeId);
    3449     if (aParent) qt_enter_modal (aParent);
     3468    LoopObject loopObject ((QEvent::Type) GetOpenFileNameEvent::TypeId, loop);
     3469
     3470//#warning check me!
     3471    if (aParent)
     3472        aParent->setWindowModality (Qt::WindowModal);
     3473
    34503474    Thread openDirThread (aParent, &loopObject, startWith, aFilters, aCaption);
    34513475    openDirThread.start();
    3452     qApp->eventLoop()->enterLoop();
     3476    loop.exec();
    34533477    openDirThread.wait();
    3454     if (aParent) qt_leave_modal (aParent);
     3478
     3479//#warning check me!
     3480    if (aParent)
     3481        aParent->setWindowModality (Qt::NonModal);
     3482
    34553483    return loopObject.result();
    34563484
     
    38233851         * the SetExtraData() call. */
    38243852        mVBox.SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID,
    3825             QString ("%1").arg (static_cast<long> (mMainWindow->winId())));
     3853                            QString ("%1").arg ((Q_ULLONG) mMainWindow->winId()));
    38263854
    38273855        if (mVBox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp

    r8981 r9495  
    134134    if (mProgress.isOk())
    135135    {
    136 #warning port me
     136//#warning port me
    137137        /* start a refresh timer */
    138138        startTimer (aRefreshInterval);
     
    179179        if (mLoopLevel != -1)
    180180        {
    181 #warning port me
     181//#warning port me
    182182//            /* we've entered the loop in run() */
    183183//            if (mLoopLevel + 1 == qApp->eventLoop()->loopLevel())
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r9299 r9495  
    9494    void gotLinkClicked (const QUrl &aURL)
    9595    {
    96 #warning is this still necessary?
     96//#warning is this still necessary?
    9797        QTextDocument* text = mDetailsText->document();
    9898        emit linkClicked (aURL.toString());
     
    524524    /* add actions to the toolbar */
    525525
    526 #warning port me
     526//#warning port me
    527527//    setUsesTextLabel (true);
    528528//    setUsesBigPixmaps (true);
     
    639639    }
    640640
    641 #warning port me
     641//#warning port me
    642642//    clearWState (WState_Polished);
    643643
  • trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp

    r9437 r9495  
    186186         * causing tool-buttons and dropped menu displayed in
    187187         * different annoying color, so fixing palette button's color */
    188 #warning "port me: any longer required?"
     188//#warning "port me: any longer required?"
    189189        QPalette pal = a.palette();
    190190        pal.setColor (QPalette::Disabled, QColorGroup::Button,
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui

    r9386 r9495  
    66
    77     Copyright (C) 2006-2007 Sun Microsystems, Inc.
    8    
     8
    99     This file is part of VirtualBox Open Source Edition (OSE), as
    1010     available from http://www.virtualbox.org. This file is free software;
     
    1414     VirtualBox OSE distribution. VirtualBox OSE is distributed in the
    1515     hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    16    
     16
    1717     Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
    1818     Clara, CA 95054 USA or visit http://www.sun.com if you need
     
    13071307    <include location="local" impldecl="in implementation">VBoxGlobal.h</include>
    13081308    <include location="local" impldecl="in implementation">VBoxProblemReporter.h</include>
    1309     <include location="local" impldecl="in implementation">VBoxUSBFilterSettings.h</include>
    13101309    <include location="local" impldecl="in implementation">QILabel.h</include>
    13111310</includes>
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui.h

    r9386 r9495  
    248248                       const char *aSrc, const char *aCmnt)
    249249    {
    250 #warning port me: check this
     250//#warning port me: check this
    251251        QString msg = aTranslator.translate (aCtxt, aSrc, aCmnt);
    252252//        QString msg = aTranslator.findMessage (aCtxt, aSrc, aCmnt).translation();
     
    271271    valid = true;
    272272    buttonOk->setEnabled (true);
    273 #warning port me
     273//#warning port me
    274274//    warningSpacer->changeSize (0, 0, QSizePolicy::Expanding);
    275275    warningLabel->setHidden (true);
     
    304304    whatsThisCandidate = NULL;
    305305
    306 #warning port me
     306//#warning port me
    307307    whatsThisLabel = new QILabel (this);
    308308//    VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1);
     
    349349            "entry field and press a new Host Key. Note that alphanumeric, "
    350350            "cursor movement and editing keys cannot be used as a Host Key."));
    351 #warning port me
     351//#warning port me
    352352//    layoutHostKey->addWidget (hkeHostKey);
    353353    txHostKey->setBuddy (hkeHostKey);
     
    379379    new QIListViewSelectionPreserver (this, lvUSBFilters);
    380380    wstUSBFilters = new Q3WidgetStack (grbUSBFilters, "wstUSBFilters");
    381 #warning port me
     381//#warning port me
    382382//    grbUSBFiltersLayout->addWidget (wstUSBFilters);
    383383    /* create a default (disabled) filter settings widget at index 0 */
     
    740740    {
    741741        USBListItem *uli = static_cast <USBListItem *> (item);
     742//#warning port me
     743        /*
    742744        VBoxUSBFilterSettings *settings =
    743745            static_cast <VBoxUSBFilterSettings *>
     
    756758            host.InsertUSBDeviceFilter (host.GetUSBDeviceFilters().GetCount(),
    757759                                        insertedFilter);
     760        */
    758761    }
    759762    mUSBFilterListModified = false;
     
    766769    {
    767770        gs.setLanguageId (selItem->text (1));
    768 #warning "port me: check if this is longer necessary (See the ChangeGUILanguageEvent)"
     771//#warning "port me: check if this is longer necessary (See the ChangeGUILanguageEvent)"
    769772        VBoxGlobal::loadLanguage (selItem->text (1));
    770773    }
     
    783786    else
    784787    {
    785 #warning port me
     788//#warning port me
    786789//        widget = focusData()->focusWidget();
    787790    }
     
    789792    while (widget && widget != this)
    790793    {
    791 #warning port me
     794//#warning port me
    792795//        text = Q3WhatsThis::textFor (widget);
    793796        if (!text.isEmpty())
     
    798801    if (text.isEmpty() && !warningString.isEmpty())
    799802        text = warningString;
    800 #warning port me
     803//#warning port me
    801804//    if (text.isEmpty())
    802805//        text = Q3WhatsThis::textFor (this);
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