Changeset 8915 in vbox
- Timestamp:
- May 19, 2008 12:11:49 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30970
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r8785 r8915 166 166 VBoxConsoleWnd &consoleWnd(); 167 167 168 /* main window handle storage */ 169 void setMainWindow (QWidget *aMainWindow) { mMainWindow = aMainWindow; } 170 QWidget *mainWindow() const { return mMainWindow; } 171 172 168 173 bool isVMConsoleProcess() const { return !vmUuid.isNull(); } 169 174 QUuid managedVMUuid() const { return vmUuid; } … … 623 628 VBoxSelectorWnd *mSelectorWnd; 624 629 VBoxConsoleWnd *mConsoleWnd; 630 QWidget* mMainWindow; 625 631 626 632 #ifdef VBOX_WITH_REGISTRATION -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBQuartz2D.cpp
r8155 r8915 157 157 Assert (mImage); 158 158 159 QWidget * pMain = qApp->mainWidget();160 Assert (VALID_PTR ( pMain));159 QWidget *main = vboxGlobal().mainWindow(); 160 Assert (VALID_PTR (main)); 161 161 QWidget* viewport = mView->viewport(); 162 162 Assert (VALID_PTR (viewport)); … … 171 171 Assert (VALID_PTR (ctx)); 172 172 /* We handle the seamless mode as a special case. */ 173 if (qobject_cast <VBoxConsoleWnd *> ( pMain)->isTrueSeamless())173 if (qobject_cast <VBoxConsoleWnd *> (main)->isTrueSeamless()) 174 174 { 175 175 /* Here we paint the windows without any wallpaper. -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r8895 r8915 222 222 { 223 223 if (sVal.isEmpty() || 224 sVal == QString ("%1").arg ( (long)qApp->mainWidget()->winId()))224 sVal == QString ("%1").arg (static_cast<long> (vboxGlobal().mainWindow()->winId()))) 225 225 *allowChange = TRUE; 226 226 else … … 272 272 QApplication::postEvent (&mGlobal, new VBoxCanShowRegDlgEvent (true)); 273 273 } 274 else if (sVal == QString ("%1").arg ( (long) qApp->mainWidget()->winId()))274 else if (sVal == QString ("%1").arg (static_cast<long> (vboxGlobal().mainWindow()->winId()))) 275 275 { 276 276 mIsRegDlgOwner = true; … … 3336 3336 QString result; 3337 3337 3338 QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget();3338 QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow(); 3339 3339 QString title = mCaption.isNull() ? tr ("Select a directory") : mCaption; 3340 3340 … … 3485 3485 QString title = mCaption.isNull() ? tr ("Select a file") : mCaption; 3486 3486 3487 QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget();3487 QWidget *topParent = mParent ? mParent->window() : vboxGlobal()->mainWindow(); 3488 3488 QString winFilters = winFilter (mFilters); 3489 3489 AssertCompile (sizeof (TCHAR) == sizeof (QChar)); … … 3912 3912 * the SetExtraData() call. */ 3913 3913 mVBox.SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID, 3914 QString ("%1").arg ( (long) qApp->mainWidget()->winId()));3914 QString ("%1").arg (static_cast<long> (mMainWindow->winId()))); 3915 3915 3916 3916 if (mVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox4/src/darwin/DarwinCursor.cpp
r8155 r8915 861 861 CursorTestWindow wnd; 862 862 863 app.setMainWidget(&wnd);864 863 //wnd.showMaximized(); 865 864 wnd.show(); -
trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp
r8155 r8915 255 255 if (vboxGlobal().isVMConsoleProcess()) 256 256 { 257 a.setMainWidget(&vboxGlobal().consoleWnd());257 vboxGlobal().setMainWindow (&vboxGlobal().consoleWnd()); 258 258 if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid())) 259 259 rc = a.exec(); … … 265 265 else 266 266 { 267 a.setMainWidget(&vboxGlobal().selectorWnd());267 vboxGlobal().setMainWindow (&vboxGlobal().selectorWnd()); 268 268 vboxGlobal().selectorWnd().show(); 269 269 #ifdef VBOX_WITH_REGISTRATION_REQUEST
Note:
See TracChangeset
for help on using the changeset viewer.