VirtualBox

Changeset 72927 in vbox


Ignore:
Timestamp:
Jul 6, 2018 7:29:16 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: Avoid a relatively heavy medium database refresh after creating a floppy disk

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r72903 r72927  
    27222722QString VBoxGlobal::showCreateFloppyDiskDialog(QWidget *pParent, const QString &strMachineName, const QString &strMachineFolder)
    27232723{
    2724     QString strMediumID;
    27252724    UIFDCreationDialog *pDialog = new UIFDCreationDialog(pParent, strMachineName, strMachineFolder);
    27262725    if (pDialog->exec())
    27272726    {
    2728         strMediumID = pDialog->mediumID();
     2727        return pDialog->mediumID();
    27292728    }
    27302729    delete pDialog;
    2731     return strMediumID;
     2730    return QString();
    27322731}
    27332732
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp

    r72913 r72927  
    3131# include "UIFDCreationDialog.h"
    3232# include "UIFilePathSelector.h"
     33# include "UIMedium.h"
    3334# include "UIMessageCenter.h"
    3435# include "VBoxGlobal.h"
     
    213214    m_strMediumID = newMedium.GetId();
    214215
     216    /* Notify VBoxGlobal about the new medium: */
     217    vboxGlobal().createMedium(UIMedium(newMedium, UIMediumType_Floppy, KMediumState_Created));
     218
     219
    215220    /* After a successful creation and initilization of the floppy disk we call base class accept
    216221       effectively closing this dialog: */
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp

    r72903 r72927  
    484484    if (pDialog->exec())
    485485    {
    486         sltHandleRefresh();
     486        repopulateTreeWidget();
    487487    }
    488488    delete pDialog;
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