VirtualBox

Changeset 43007 in vbox


Ignore:
Timestamp:
Aug 27, 2012 6:22:18 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80340
Message:

FE/Qt: 6234: Support for VM groups: Reload VM into chooser-view if some error appears during group-saving procedure.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r43006 r43007  
    994994}
    995995
     996void UIGChooserModel::sltReloadMachine(const QString &strId)
     997{
     998    /* Remove all the items first: */
     999    removeMachineItems(strId, mainRoot());
     1000
     1001    /* Check if such machine still present: */
     1002    CMachine machine = vboxGlobal().virtualBox().FindMachine(strId);
     1003    if (machine.isNull())
     1004        return;
     1005
     1006    /* Add machine into the tree: */
     1007    addMachineIntoTheTree(machine);
     1008
     1009    /* And update model: */
     1010    updateGroupTree();
     1011    updateNavigation();
     1012    updateLayout();
     1013
     1014    /* Notify listeners about selection change: */
     1015    emit sigSelectionChanged();
     1016}
     1017
    9961018void UIGChooserModel::sltEraseLookupTimer()
    9971019{
     
    14991521    UIGroupDefinitionSaveThread::prepare();
    15001522    emit sigGroupSavingStateChanged();
     1523    connect(UIGroupDefinitionSaveThread::instance(), SIGNAL(sigReload(QString)),
     1524            this, SLOT(sltReloadMachine(QString)));
    15011525    UIGroupDefinitionSaveThread::instance()->configure(this, m_groups, groups);
    15021526    UIGroupDefinitionSaveThread::instance()->start();
     
    20102034            break;
    20112035    }
     2036    emit sigReload(machine.GetId());
    20122037    m_condition.wakeAll();
    20132038}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r43005 r43007  
    214214    void sltGroupDefinitionsSaveComplete();
    215215    void sltGroupOrdersSaveComplete();
     216    void sltReloadMachine(const QString &strId);
    216217
    217218    /* Handler: Lookup stuff: */
     
    359360    void sigError(UIGroupsSavingError errorType, const CMachine &machine);
    360361
     362    /* Notifier: */
     363    void sigReload(QString strId);
     364
    361365    /* Notifier: Complete stuff: */
    362366    void sigComplete();
Note: See TracChangeset for help on using the changeset viewer.

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