Changeset 9495 in vbox for trunk/src/VBox
- Timestamp:
- Jun 6, 2008 4:36:40 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 31761
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r9386 r9495 68 68 69 69 VBOX_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) 72 VBOX_MODULE_QT4 += QtSql QtXml 73 70 74 VBOX_DEFS_QT4 = QT_CORE_LIB QT_GUI_LIB QT_NETWORK_LIB QT_QT3SUPPORT_LIB 71 75 … … 76 80 VBOX_LIBS_QT4 = 77 81 else 82 78 83 VBOX_INCS_QT4 = \ 79 $(VBOX_PATH_QT4_SHARE)/mkspecs/linux-g++ \80 84 $(addprefix $(VBOX_PATH_QT4_INCLUDE)/, $(VBOX_MODULE_QT4) Qt) \ 81 85 $(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 83 109 endif 84 110 … … 96 122 VBOX_LRELEASE4 ?= $(VBOX_PATH_QT4_BIN)/lrelease 97 123 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?) 127 ifeq ($(KBUILD_TARGET),win) 128 ifeq ($(KBUILD_TARGET_ARCH),amd64) 129 VBOX_MOC4 += -DWIN64 130 else 131 VBOX_MOC4 += -DWIN32 132 endif 133 else ifeq ($(KBUILD_TARGET),linux) 134 # when nothing special is defined, Q_OS_UNIX/Q_WS_X11 will be set 135 else 136 $(error Port me!) 137 endif 138 139 # The Qt DLLs (move to the root Makefile.kmk, and remove bin from INSTALLS below). 140 bin_SOURCES += $(VBOX_QT4_RUNTIME) 141 bin_INST = $(INST_BIN) 142 bin_MODE = 644 143 98 144 # Template copy from the qt3 stuff. Appended a "4" on the 99 145 # relevant places. … … 110 156 111 157 ifeq ($(KBUILD_TARGET),win) 112 # drag in library configuration (we need QMAKE_PRL_DEFINES)113 ifneq ($(LIB_QT_PRL),)114 include $(LIB_QT_PRL)115 endif116 158 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL) 117 159 TEMPLATE_VBOXQT4GUIEXE_DEFS += \ … … 136 178 TEMPLATE_VBOXQT4GUIEXE_SDKS = WINPSDK 137 179 TEMPLATE_VBOXQT4GUIEXE_LIBS = \ 138 $(LIB_QT) \ 139 $(LIB_QTMAIN) \ 180 $(VBOX_LIBS_QT4) \ 140 181 $(LIB_RUNTIME) \ 141 182 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \ … … 144 185 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \ 145 186 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib 187 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = $(VBOX_PATH_QT4_LIB) 146 188 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) 147 189 … … 185 227 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(foreach mod, $(VBOX_MODULE_QT4), -framework $(mod)) \ 186 228 -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 endif194 TEMPLATE_VBOXQT4GUIEXE_DEFS += $(QMAKE_PRL_DEFINES)195 229 TEMPLATE_VBOXQT4GUIEXE_LIBS += 196 230 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += … … 332 366 OTHERS = $(PATH_BIN)/vboxkeyboard4.tar.gz 333 367 endif 334 INSTALLS = VirtualBox.nls 368 INSTALLS = VirtualBox.nls bin 335 369 336 370 ifeq ($(KBUILD_TARGET),os2) … … 486 520 # Sources containing local definitions of classes that use the Q_OBJECT macro 487 521 VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp 488 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11489 VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp490 endif491 522 ifdef VBOX_WITH_XPCOM 492 523 VirtualBox_QT_MOCSRCS += src/COMDefs.cpp -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
r8155 r9495 82 82 * This is a temporary hack, we'll set the style globally later. 83 83 */ 84 #warning port me84 //#warning port me 85 85 void setMacStyle() 86 86 { -
trunk/src/VBox/Frontends/VirtualBox4/src/QIHotKeyEdit.cpp
r8946 r9495 210 210 int w = fm.width( 'x' ) * 17; // "some" 211 211 int m = frameWidth() * 2; 212 #warning port me212 //#warning port me 213 213 // return (style()->sizeFromContents (QStyle::CT_LineEdit, this, 214 214 // QSize (w + m, h + m) … … 231 231 232 232 #if defined (Q_WS_PM) 233 /** 233 /** 234 234 * Returns the virtual key extracted from the QMSG structure. 235 235 * … … 237 237 * in PM (like Left Shift, Left Ctrl, Win keys). In all other cases it simply 238 238 * returns SHORT2FROMMP (aMsg->mp2). 239 * 239 * 240 240 * @param aMsg Pointer to the QMSG structure to extract the virtual key from. 241 241 * @return The extracted virtual key code or zero if there is no virtual key. … … 733 733 void QIHotKeyEdit::drawContents (QPainter * p) 734 734 { 735 #warning port me735 //#warning port me 736 736 // QLabel::drawContents (p); 737 737 // if (hasFocus()) -
trunk/src/VBox/Frontends/VirtualBox4/src/QIStateIndicator.cpp
r8705 r9495 111 111 if (icon) 112 112 { 113 #warning port me113 //#warning port me 114 114 /* I didn't see any benefits of caching the icon 115 115 * background drawing in Qt4. This is already done -
trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp
r9091 r9495 51 51 QStatusBar::paintEvent (e); 52 52 return; 53 #warning port me: is this needed anymore?53 //#warning port me: is this needed anymore? 54 54 // QPainter p (this); 55 55 // … … 64 64 //#endif 65 65 // 66 // if (!message.isEmpty()) 66 // if (!message.isEmpty()) 67 67 // { 68 68 // p.setPen (colorGroup().foreground()); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
r9076 r9495 2266 2266 #else 2267 2267 2268 #warning Adapt VBoxConsoleView::fixModifierState2268 //#warning Adapt VBoxConsoleView::fixModifierState 2269 2269 2270 2270 #endif -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r9304 r9495 3358 3358 void VBoxConsoleWnd::tryClose() 3359 3359 { 3360 #warning "port me"3360 //#warning "port me" 3361 3361 /* First close any open modal & popup widgets. Use a single shot with 3362 3362 * timeout 0 to allow the widgets to cleany close and test then again. If -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBDDRAW.cpp
r8155 r9495 236 236 if (mSynchronousUpdates) 237 237 { 238 mView->updateContents (aX, aY, aW, aH); 238 //#warning check me! 239 mView->viewport()->update (aX, aY, aW, aH); 239 240 } 240 241 else -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp
r8902 r9495 352 352 * we create a qpainter object and paint on 353 353 * that. Todo: Do some performance test. */ 354 #warning port me: do it faster?354 //#warning port me: do it faster? 355 355 QPainter painter (mView->viewport()); 356 356 painter.drawImage (r.x(), r.y(), mImg, -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r9287 r9495 226 226 { 227 227 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())) 229 230 *allowChange = TRUE; 230 231 else … … 276 277 QApplication::postEvent (&mGlobal, new VBoxCanShowRegDlgEvent (true)); 277 278 } 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())) 279 281 { 280 282 mIsRegDlgOwner = true; … … 520 522 * QObject class reimplementation which is the target for OpenNativeDialogEvent 521 523 * event. It receives OpenNativeDialogEvent event from another thread, 522 * stores result information and exits event processingloop.524 * stores result information and exits the given local event loop. 523 525 */ 524 526 class LoopObject : public QObject … … 526 528 public: 527 529 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) {} 529 532 const QString& result() { return mResult; } 530 533 … … 533 536 bool event (QEvent *aEvent) 534 537 { 538 //#warning check me! 535 539 if (aEvent->type() == mType) 536 540 { 537 541 OpenNativeDialogEvent *ev = (OpenNativeDialogEvent*) aEvent; 538 542 mResult = ev->result(); 539 qApp->eventLoop()->exitLoop();543 mLoop.exit(); 540 544 return true; 541 545 } … … 544 548 545 549 QEvent::Type mType; 550 QEventLoop &mLoop; 546 551 QString mResult; 547 552 }; … … 2473 2478 * human readable key names, we keep a table of them, which must be 2474 2479 * updated when the language is changed. */ 2475 #warning port me2480 //#warning port me 2476 2481 QIHotKeyEdit::retranslateUi(); 2477 2482 #endif … … 3245 3250 QString result; 3246 3251 3247 QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow();3252 QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget(); 3248 3253 QString title = mCaption.isNull() ? tr ("Select a directory") : mCaption; 3249 3254 … … 3302 3307 }; 3303 3308 3309 //#warning check me! 3310 3311 /* Local event loop to run while waiting for the result from another 3312 * thread */ 3313 QEventLoop loop; 3314 3304 3315 QString dir = QDir::convertSeparators (aDir); 3305 LoopObject loopObject ((QEvent::Type) GetExistDirectoryEvent::TypeId); 3316 LoopObject loopObject ((QEvent::Type) GetExistDirectoryEvent::TypeId, loop); 3317 3306 3318 Thread openDirThread (aParent, &loopObject, dir, aCaption); 3307 3319 openDirThread.start(); 3308 qApp->eventLoop()->enterLoop();3320 loop.exec(); 3309 3321 openDirThread.wait(); 3322 3310 3323 return loopObject.result(); 3311 3324 … … 3394 3407 QString title = mCaption.isNull() ? tr ("Select a file") : mCaption; 3395 3408 3396 QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow();3409 QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget(); 3397 3410 QString winFilters = winFilter (mFilters); 3398 3411 AssertCompile (sizeof (TCHAR) == sizeof (QChar)); … … 3445 3458 if (aSelectedFilter) 3446 3459 *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 3447 3467 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 3450 3474 Thread openDirThread (aParent, &loopObject, startWith, aFilters, aCaption); 3451 3475 openDirThread.start(); 3452 qApp->eventLoop()->enterLoop();3476 loop.exec(); 3453 3477 openDirThread.wait(); 3454 if (aParent) qt_leave_modal (aParent); 3478 3479 //#warning check me! 3480 if (aParent) 3481 aParent->setWindowModality (Qt::NonModal); 3482 3455 3483 return loopObject.result(); 3456 3484 … … 3823 3851 * the SetExtraData() call. */ 3824 3852 mVBox.SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID, 3825 QString ("%1").arg (static_cast<long> (mMainWindow->winId())));3853 QString ("%1").arg ((Q_ULLONG) mMainWindow->winId())); 3826 3854 3827 3855 if (mVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
r8981 r9495 134 134 if (mProgress.isOk()) 135 135 { 136 #warning port me136 //#warning port me 137 137 /* start a refresh timer */ 138 138 startTimer (aRefreshInterval); … … 179 179 if (mLoopLevel != -1) 180 180 { 181 #warning port me181 //#warning port me 182 182 // /* we've entered the loop in run() */ 183 183 // if (mLoopLevel + 1 == qApp->eventLoop()->loopLevel()) -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r9299 r9495 94 94 void gotLinkClicked (const QUrl &aURL) 95 95 { 96 #warning is this still necessary?96 //#warning is this still necessary? 97 97 QTextDocument* text = mDetailsText->document(); 98 98 emit linkClicked (aURL.toString()); … … 524 524 /* add actions to the toolbar */ 525 525 526 #warning port me526 //#warning port me 527 527 // setUsesTextLabel (true); 528 528 // setUsesBigPixmaps (true); … … 639 639 } 640 640 641 #warning port me641 //#warning port me 642 642 // clearWState (WState_Polished); 643 643 -
trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp
r9437 r9495 186 186 * causing tool-buttons and dropped menu displayed in 187 187 * different annoying color, so fixing palette button's color */ 188 #warning "port me: any longer required?"188 //#warning "port me: any longer required?" 189 189 QPalette pal = a.palette(); 190 190 pal.setColor (QPalette::Disabled, QColorGroup::Button, -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui
r9386 r9495 6 6 7 7 Copyright (C) 2006-2007 Sun Microsystems, Inc. 8 8 9 9 This file is part of VirtualBox Open Source Edition (OSE), as 10 10 available from http://www.virtualbox.org. This file is free software; … … 14 14 VirtualBox OSE distribution. VirtualBox OSE is distributed in the 15 15 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 17 17 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa 18 18 Clara, CA 95054 USA or visit http://www.sun.com if you need … … 1307 1307 <include location="local" impldecl="in implementation">VBoxGlobal.h</include> 1308 1308 <include location="local" impldecl="in implementation">VBoxProblemReporter.h</include> 1309 <include location="local" impldecl="in implementation">VBoxUSBFilterSettings.h</include>1310 1309 <include location="local" impldecl="in implementation">QILabel.h</include> 1311 1310 </includes> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui.h
r9386 r9495 248 248 const char *aSrc, const char *aCmnt) 249 249 { 250 #warning port me: check this250 //#warning port me: check this 251 251 QString msg = aTranslator.translate (aCtxt, aSrc, aCmnt); 252 252 // QString msg = aTranslator.findMessage (aCtxt, aSrc, aCmnt).translation(); … … 271 271 valid = true; 272 272 buttonOk->setEnabled (true); 273 #warning port me273 //#warning port me 274 274 // warningSpacer->changeSize (0, 0, QSizePolicy::Expanding); 275 275 warningLabel->setHidden (true); … … 304 304 whatsThisCandidate = NULL; 305 305 306 #warning port me306 //#warning port me 307 307 whatsThisLabel = new QILabel (this); 308 308 // VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); … … 349 349 "entry field and press a new Host Key. Note that alphanumeric, " 350 350 "cursor movement and editing keys cannot be used as a Host Key.")); 351 #warning port me351 //#warning port me 352 352 // layoutHostKey->addWidget (hkeHostKey); 353 353 txHostKey->setBuddy (hkeHostKey); … … 379 379 new QIListViewSelectionPreserver (this, lvUSBFilters); 380 380 wstUSBFilters = new Q3WidgetStack (grbUSBFilters, "wstUSBFilters"); 381 #warning port me381 //#warning port me 382 382 // grbUSBFiltersLayout->addWidget (wstUSBFilters); 383 383 /* create a default (disabled) filter settings widget at index 0 */ … … 740 740 { 741 741 USBListItem *uli = static_cast <USBListItem *> (item); 742 //#warning port me 743 /* 742 744 VBoxUSBFilterSettings *settings = 743 745 static_cast <VBoxUSBFilterSettings *> … … 756 758 host.InsertUSBDeviceFilter (host.GetUSBDeviceFilters().GetCount(), 757 759 insertedFilter); 760 */ 758 761 } 759 762 mUSBFilterListModified = false; … … 766 769 { 767 770 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)" 769 772 VBoxGlobal::loadLanguage (selItem->text (1)); 770 773 } … … 783 786 else 784 787 { 785 #warning port me788 //#warning port me 786 789 // widget = focusData()->focusWidget(); 787 790 } … … 789 792 while (widget && widget != this) 790 793 { 791 #warning port me794 //#warning port me 792 795 // text = Q3WhatsThis::textFor (widget); 793 796 if (!text.isEmpty()) … … 798 801 if (text.isEmpty() && !warningString.isEmpty()) 799 802 text = warningString; 800 #warning port me803 //#warning port me 801 804 // if (text.isEmpty()) 802 805 // text = Q3WhatsThis::textFor (this);
Note:
See TracChangeset
for help on using the changeset viewer.