Changeset 83960 in vbox
- Timestamp:
- Apr 24, 2020 9:22:19 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137525
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r83951 r83960 547 547 updateActionsAppearance(); 548 548 549 /* Create and execute global settings window: */ 550 QPointer<UISettingsDialogGlobal> pDlg = new UISettingsDialogGlobal(this); 551 pDlg->execute(); 552 delete pDlg; 549 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 550 QWidget *pDialogParent = windowManager().realParentWindow(this); 551 UISafePointerSettingsDialogGlobal pDialog = new UISettingsDialogGlobal(pDialogParent); 552 windowManager().registerNewParent(pDialog, pDialogParent); 553 554 /* Execute dialog: */ 555 pDialog->execute(); 556 delete pDialog; 553 557 } 554 558 … … 570 574 571 575 /* Get first selected item: */ 572 UIVirtualMachineItem *pItem = currentItem s().value(0);576 UIVirtualMachineItem *pItem = currentItem(); 573 577 574 578 /* For global item or local machine: */ … … 598 602 const QUuid &uID /* = QString() */) 599 603 { 600 /* Get current item: */601 UIVirtualMachineItem *pItem = currentItem();602 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n"));603 604 604 /* Lock the action preventing cascade calls: */ 605 605 UIQObjectPropertySetter guardBlock(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), "opened", true); … … 607 607 this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest); 608 608 updateActionsAppearance(); 609 610 /* Get current item: */ 611 UIVirtualMachineItem *pItem = currentItem(); 612 AssertMsgReturnVoid(pItem, ("Current item should be selected!\n")); 609 613 610 614 /* Process href from VM details / description: */ … … 630 634 m_fFirstMediumEnumerationHandled = true; 631 635 632 /* Create and execute corresponding VM settings window: */ 633 QPointer<UISettingsDialogMachine> pDlg = new UISettingsDialogMachine(this, 634 uID.isNull() ? pItem->id() : uID, 635 strCategory, strControl); 636 pDlg->execute(); 637 delete pDlg; 636 /* Use the "safe way" to open stack of Mac OS X Sheets: */ 637 QWidget *pDialogParent = windowManager().realParentWindow(this); 638 UISafePointerSettingsDialogMachine pDialog = new UISettingsDialogMachine(pDialogParent, 639 uID.isNull() ? pItem->id() : uID, 640 strCategory, strControl); 641 windowManager().registerNewParent(pDialog, pDialogParent); 642 643 /* Execute dialog: */ 644 pDialog->execute(); 645 delete pDialog; 638 646 } 639 647 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
r83939 r83960 21 21 # pragma once 22 22 #endif 23 24 /* Qt includes: */ 25 #include <QPointer> 23 26 24 27 /* GUI includes: */ … … 74 77 QString m_strControl; 75 78 }; 79 80 /** Safe pointer to cloud machine settings dialog. */ 81 typedef QPointer<UISettingsDialogGlobal> UISafePointerSettingsDialogGlobal; 76 82 77 83 … … 167 173 }; 168 174 175 /** Safe pointer to cloud machine settings dialog. */ 176 typedef QPointer<UISettingsDialogMachine> UISafePointerSettingsDialogMachine; 177 169 178 170 179 #endif /* !FEQT_INCLUDED_SRC_settings_UISettingsDialogSpecific_h */
Note:
See TracChangeset
for help on using the changeset viewer.