VirtualBox

Changeset 8865

Show
Ignore:
Timestamp:
05/15/08 17:18:40 (4 months ago)
Author:
vboxsync
Message:

FE/Qt4: Replaced deprecated topLevelWidget method by new window method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r8784 r8865  
    583583#else 
    584584        /* Return the ID of the top-level console window. */ 
    585         *winId = (ULONG64) mView->topLevelWidget()->winId(); 
     585        *winId = (ULONG64) mView->window()->winId(); 
    586586#endif 
    587587 
     
    916916        return; 
    917917 
    918     QWidget *tlw = topLevelWidget(); 
     918    QWidget *tlw = window(); 
    919919 
    920920    /* calculate client window offsets */ 
     
    933933    fr.setRight (fr.right() + s.width()); 
    934934    fr.setBottom (fr.bottom() + s.height()); 
     935    printf ("bla %d %d %d %d\n", fr.x(), fr.y(), fr.width(), fr.height()); 
    935936 
    936937    if (adjustPosition) 
     
    14771478                 *  make it get out of the dock when the user wishes to show a VM. 
    14781479                 */ 
    1479                 topLevelWidget()->show(); 
    1480                 topLevelWidget()->activateWindow(); 
     1480                window()->show(); 
     1481                window()->activateWindow(); 
    14811482                return true; 
    14821483            } 
     
    30023003        if (aCapture) 
    30033004                XGrabKey (QX11Info::display(), AnyKey, AnyModifier, 
    3004                   topLevelWidget()->winId(), False, 
     3005                  window()->winId(), False, 
    30053006                  GrabModeAsync, GrabModeAsync); 
    30063007        else 
    30073008                XUngrabKey (QX11Info::display(),  AnyKey, AnyModifier, 
    3008                     topLevelWidget()->winId()); 
     3009                    window()->winId()); 
    30093010#elif defined (Q_WS_MAC) 
    30103011    if (aCapture) 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDownloaderWgt.cpp

    r8155 r8865  
    265265                else 
    266266                { 
    267                     vboxProblem().message (mStatusBar->topLevelWidget(), 
     267                    vboxProblem().message (mStatusBar->window(), 
    268268                        VBoxProblemReporter::Error, 
    269269                        tr ("<p>Failed to save the downloaded file as " 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r8786 r8865  
    29442944    if (w) 
    29452945    { 
    2946         w = w->topLevelWidget(); 
     2946        w = w->window(); 
    29472947        deskGeo = QApplication::desktop()->availableGeometry (w); 
    29482948        parentGeo = w->frameGeometry(); 
     
    33363336            QString result; 
    33373337 
    3338             QWidget *topParent = mParent ? mParent->topLevelWidget() : qApp->mainWidget(); 
     3338            QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget(); 
    33393339            QString title = mCaption.isNull() ? tr ("Select a directory") : mCaption; 
    33403340 
     
    34853485            QString title = mCaption.isNull() ? tr ("Select a file") : mCaption; 
    34863486 
    3487             QWidget *topParent = mParent ? mParent->topLevelWidget() : qApp->mainWidget(); 
     3487            QWidget *topParent = mParent ? mParent->window() : qApp->mainWidget(); 
    34883488            QString winFilters = winFilter (mFilters); 
    34893489            AssertCompile (sizeof (TCHAR) == sizeof (QChar)); 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy