Changeset 108079 in vbox
- Timestamp:
- Feb 5, 2025 4:08:19 PM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167373
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp
r108078 r108079 783 783 , m_fFirstSerializationDone(false) 784 784 , m_fSerializationIsInProgress(false) 785 , m_fSerializationClean( false)785 , m_fSerializationClean(true) 786 786 , m_fClosed(false) 787 787 , m_iPageId(MachineSettingsPageType_Invalid) … … 812 812 save(); 813 813 814 /* Close if there is no ongoing serialization 815 * and previous try was successful: */ 816 if ( !isSerializationInProgress() 817 && m_fSerializationClean) 818 sltClose(); 819 } 820 821 void UIAdvancedSettingsDialog::reject() 822 { 823 /* Close if there is no ongoing serialization: */ 824 if (!isSerializationInProgress()) 814 /* Close if last serialization haven't failed: */ 815 if (m_fSerializationClean) 825 816 sltClose(); 826 817 } … … 1312 1303 void UIAdvancedSettingsDialog::sltClose() 1313 1304 { 1314 /* Check whether serialization was clean (save) 1315 * or there are no unsaved settings to be lost (cancel): */ 1316 if ( m_fSerializationClean 1317 || !isSettingsChanged() 1305 /* Do not close if serialization happens atm: */ 1306 if (isSerializationInProgress()) 1307 return; 1308 1309 /* Make sure there are no unsaved settings to be lost 1310 * or user agreed to forget them after all: */ 1311 if ( !isSettingsChanged() 1318 1312 || msgCenter().confirmSettingsDiscarding(this)) 1319 1313 { … … 1576 1570 m_pButtonBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::Key_Return); 1577 1571 m_pButtonBox->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape); 1578 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIAdvancedSettingsDialog:: reject);1572 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIAdvancedSettingsDialog::sltClose); 1579 1573 connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIAdvancedSettingsDialog::accept); 1580 1574 connect(m_pButtonBox->button(QDialogButtonBox::Help), &QAbstractButton::pressed, -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.h
r106245 r108079 94 94 /** Hides the modal dialog and sets the result code to Accepted. */ 95 95 virtual void accept(); 96 /** Hides the modal dialog and sets the result code to Rejected. */97 virtual void reject();98 96 99 97 /** Handles category change to @a cId. */
Note:
See TracChangeset
for help on using the changeset viewer.