- Timestamp:
- Dec 15, 2010 1:19:00 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
r33778 r35131 328 328 reject(); 329 329 return true; 330 } 331 default: 330 332 break; 331 }332 333 } 333 334 } -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
r28800 r35131 67 67 protected slots: 68 68 69 void accept(); 70 void reject(); 69 virtual void accept(); 70 virtual void reject(); 71 71 72 void done (QDialog::DialogCode aRescode); 72 73 73 void setResult (QDialog::DialogCode aRescode); 74 74 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r34004 r35131 22 22 #include <QStackedWidget> 23 23 #include <QTimer> 24 #include <QCloseEvent> 24 25 25 26 /* Local includes */ … … 49 50 /* Common variables: */ 50 51 , m_fPolished(false) 52 /* Loading stuff: */ 53 , m_fProcessed(false) 51 54 /* Error/Warning stuff: */ 52 55 , m_fValid(true) … … 188 191 } 189 192 193 void UISettingsDialog::sltMarkProcessed() 194 { 195 m_fProcessed = true; 196 } 197 190 198 void UISettingsDialog::retranslateUi() 191 199 { … … 410 418 pWhatsThisWidget->setToolTip(QString("<qt>%1</qt>").arg(strWhatsThisText)); 411 419 #endif 420 } 421 422 void UISettingsDialog::reject() 423 { 424 if (m_fProcessed) 425 QIMainDialog::reject(); 412 426 } 413 427 … … 509 523 } 510 524 525 void UISettingsDialog::closeEvent(QCloseEvent *pEvent) 526 { 527 m_fProcessed ? pEvent->accept() : pEvent->ignore(); 528 } 529 511 530 void UISettingsDialog::assignValidator(UISettingsPage *pPage) 512 531 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r34004 r35131 56 56 virtual void sltCategoryChanged(int cId); 57 57 58 /* Mark dialog as processed: */ 59 virtual void sltMarkProcessed(); 60 58 61 protected: 59 62 … … 91 94 void sltUpdateWhatsThis(bool fGotFocus = false); 92 95 96 /* Slot to handle reject: */ 97 void reject(); 98 93 99 private: 94 100 … … 96 102 bool eventFilter(QObject *pObject, QEvent *pEvent); 97 103 void showEvent(QShowEvent *pEvent); 104 void closeEvent(QCloseEvent *pEvent); 98 105 99 106 void assignValidator(UISettingsPage *pPage); … … 103 110 104 111 /* Error & Warning stuff: */ 112 bool m_fProcessed; 105 113 bool m_fValid; 106 114 bool m_fSilent; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r34740 r35131 394 394 * it will load global settings & delete itself in the appropriate time: */ 395 395 UISettingsSerializer *pGlobalSettingsLoader = new UISettingsSerializer(this, QVariant::fromValue(data), UISettingsSerializeDirection_Load); 396 connect(pGlobalSettingsLoader, SIGNAL(destroyed(QObject*)), this, SLOT(sltMarkProcessed())); 396 397 /* Set pages to be loaded: */ 397 398 pGlobalSettingsLoader->setPageList(m_pSelector->settingPages()); … … 692 693 * it will load machine settings & delete itself in the appropriate time: */ 693 694 UISettingsSerializer *pMachineSettingsLoader = new UISettingsSerializer(this, QVariant::fromValue(data), UISettingsSerializeDirection_Load); 695 connect(pMachineSettingsLoader, SIGNAL(destroyed(QObject*)), this, SLOT(sltMarkProcessed())); 694 696 connect(pMachineSettingsLoader, SIGNAL(sigNotifyAboutPagesProcessed()), this, SLOT(sltSetFirstRunFlag())); 695 697 /* Set pages to be loaded: */
Note:
See TracChangeset
for help on using the changeset viewer.