Changeset 55742 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 8, 2015 7:31:25 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100156
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r55655 r55742 63 63 , m_configurationAccessLevel(ConfigurationAccessLevel_Null) 64 64 , m_fPolished(false) 65 /* Loading/savingstuff: */65 /* Serialization stuff: */ 66 66 , m_pSerializeProcess(0) 67 , m_fLoaded(false) 68 , m_fSaved(false) 67 , m_fSerializationIsInProgress(false) 69 68 /* Status-bar stuff: */ 70 69 , m_pStatusBar(0) … … 220 219 } 221 220 222 /* Mark as loaded: */223 m_f Loaded = true;221 /* Mark serialization finished: */ 222 m_fSerializationIsInProgress = false; 224 223 } 225 224 … … 233 232 } 234 233 235 /* Mark as saved: */236 m_fS aved = true;234 /* Mark serialization finished: */ 235 m_fSerializationIsInProgress = false; 237 236 } 238 237 … … 257 256 void UISettingsDialog::loadData(QVariant &data) 258 257 { 259 /* Mark as not loaded: */260 m_f Loaded = false;258 /* Mark serialization started: */ 259 m_fSerializationIsInProgress = true; 261 260 262 261 /* Create settings loader: */ … … 283 282 void UISettingsDialog::saveData(QVariant &data) 284 283 { 285 /* Mark as not saved: */286 m_fS aved = false;284 /* Mark serialization started: */ 285 m_fSerializationIsInProgress = true; 287 286 288 287 /* Create the 'settings saver': */ … … 531 530 void UISettingsDialog::reject() 532 531 { 533 if ( m_fLoaded)532 if (!isSerializationInProgress()) 534 533 QIMainDialog::reject(); 535 534 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r55655 r55742 73 73 /** Returns the serialize process instance. */ 74 74 UISettingsSerializer* serializeProcess() const { return m_pSerializeProcess; } 75 /** Returns whether the serialization is in progress. */ 76 bool isSerializationInProgress() const { return m_fSerializationIsInProgress; } 75 77 76 78 /** Loads the @a data. */ … … 143 145 /** Holds the serialize process instance. */ 144 146 UISettingsSerializer *m_pSerializeProcess; 145 146 /* Loading/saving stuff: */ 147 bool m_fLoaded; 148 bool m_fSaved; 147 /** Holds whether the serialization is in progress. */ 148 bool m_fSerializationIsInProgress; 149 149 150 150 /* Status bar widget: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r55515 r55742 332 332 connect(&vboxGlobal(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltAllowResetFirstRunFlag())); 333 333 334 /* Make sure settings window will be updated on session/machine state/data changes: */ 335 connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)), 336 this, SLOT(sltSessionStateChanged(QString, KSessionState))); 337 connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)), 338 this, SLOT(sltMachineStateChanged(QString, KMachineState))); 339 connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)), 340 this, SLOT(sltMachineDataChanged(QString))); 341 334 342 /* Get corresponding machine (required to determine dialog type and page availability): */ 335 343 m_machine = vboxGlobal().virtualBox().FindMachine(m_strMachineId); … … 500 508 return; 501 509 502 /* Disconnect global VBox events from this dialog: */503 gVBoxEvents->disconnect(this);504 505 510 /* Prepare session: */ 506 511 m_session = configurationAccessLevel() == ConfigurationAccessLevel_Null ? CSession() : … … 528 533 if (!m_session.isNull()) 529 534 return; 530 531 /* Disconnect global VBox events from this dialog: */532 gVBoxEvents->disconnect(this);533 535 534 536 /* Prepare session: */ … … 735 737 m_console = CConsole(); 736 738 } 737 738 /* Make sure settings window will be updated on machine state/data changes: */739 connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QString, KSessionState)),740 this, SLOT(sltSessionStateChanged(QString, KSessionState)));741 connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QString, KMachineState)),742 this, SLOT(sltMachineStateChanged(QString, KMachineState)));743 connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)),744 this, SLOT(sltMachineDataChanged(QString)));745 739 } 746 740 … … 762 756 void UISettingsDialogMachine::sltSessionStateChanged(QString strMachineId, KSessionState sessionState) 763 757 { 758 /* Ignore if serialization is in progress: */ 759 if (isSerializationInProgress()) 760 return; 761 764 762 /* Ignore if thats NOT our VM: */ 765 763 if (strMachineId != m_strMachineId) … … 779 777 void UISettingsDialogMachine::sltMachineStateChanged(QString strMachineId, KMachineState machineState) 780 778 { 779 /* Ignore if serialization is in progress: */ 780 if (isSerializationInProgress()) 781 return; 782 781 783 /* Ignore if thats NOT our VM: */ 782 784 if (strMachineId != m_strMachineId) … … 796 798 void UISettingsDialogMachine::sltMachineDataChanged(QString strMachineId) 797 799 { 800 /* Ignore if serialization is in progress: */ 801 if (isSerializationInProgress()) 802 return; 803 798 804 /* Ignore if thats NOT our VM: */ 799 805 if (strMachineId != m_strMachineId)
Note:
See TracChangeset
for help on using the changeset viewer.