VirtualBox

Changeset 11666 in vbox


Ignore:
Timestamp:
Aug 26, 2008 3:10:34 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: Fix crash if vdm is started from the menu. Make the vdm initial centered to the parent.

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

Legend:

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

    r11344 r11666  
    4848
    4949    void setup (int aType, bool aDoSelect, const QUuid &aTargetVMId = QUuid(),
    50                 bool aRefresh = true, CMachine aMachine = 0,
     50                bool aRefresh = true, CMachine aMachine = CMachine(),
    5151                const QUuid &aHdId = QUuid(),
    5252                const QUuid &aCdId = QUuid(),
    5353                const QUuid &aFdId = QUuid());
    5454
    55     static void showModeless (bool aRefresh = true);
     55    static void showModeless (QWidget *aParent = NULL, bool aRefresh = true);
    5656
    5757    QUuid selectedUuid() const;
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp

    r11529 r11666  
    407407
    408408void VBoxDiskImageManagerDlg::setup (int aType, bool aDoSelect,
    409                                      const QUuid &aTargetVMId /* = 0 */,
     409                                     const QUuid &aTargetVMId /* = QUuid() */,
    410410                                     bool aRefresh /* = true */,
    411                                      CMachine aMachine /* = 0 */,
     411                                     CMachine aMachine /* = CMachine() */,
    412412                                     const QUuid &aHdId,
    413413                                     const QUuid &aCdId,
     
    490490
    491491/* static */
    492 void VBoxDiskImageManagerDlg::showModeless (bool aRefresh /* = true */)
     492void VBoxDiskImageManagerDlg::showModeless (QWidget *aParent /* = NULL */, bool aRefresh /* = true */)
    493493{
    494494    if (!mModelessDialog)
    495495    {
    496496        mModelessDialog =
    497             new VBoxDiskImageManagerDlg (0, Qt::Window);
     497            new VBoxDiskImageManagerDlg (aParent, Qt::Window);
    498498        mModelessDialog->setAttribute (Qt::WA_DeleteOnClose);
    499499        mModelessDialog->setup (VBoxDefs::HD | VBoxDefs::CD | VBoxDefs::FD,
    500                                 false, 0, aRefresh);
     500                                false, QUuid(), aRefresh);
    501501
    502502        /* listen to events that may change the media status and refresh
     
    14481448
    14491449    bool notInEnum      = !vboxGlobal().isMediaEnumerationStarted();
     1450    /* If we are currently enumerating the media go out of here. We are coming
     1451     * back here from the finished signal. */
     1452    if (!notInEnum)
     1453        return;
    14501454    bool modifyEnabled  = notInEnum &&
    14511455                          item &&  item->usage().isNull() &&
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r11613 r11666  
    745745void VBoxSelectorWnd::fileDiskMgr()
    746746{
    747     VBoxDiskImageManagerDlg::showModeless();
     747    VBoxDiskImageManagerDlg::showModeless (this);
    748748}
    749749
     
    14611461            /* Show the VDM dialog but don't refresh once more after a
    14621462             * just-finished refresh */
    1463             /* Todo: Changed this to true to temporary fix #3000 comment 4.
    1464              * We have to find the real trouble here. */
    1465 //            VBoxDiskImageManagerDlg::showModeless (false /* aRefresh */);
    1466             VBoxDiskImageManagerDlg::showModeless (true /* aRefresh */);
     1463            VBoxDiskImageManagerDlg::showModeless (this, false /* aRefresh */);
    14671464        }
    14681465    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette