- Timestamp:
- Apr 3, 2023 3:38:36 PM (22 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r99263 r99265 290 290 } 291 291 292 bool UINotificationCenter::hasOperationsPending() const 293 { 294 return m_pEventLoop; 295 } 296 297 void UINotificationCenter::abortOperations() 298 { 299 m_pEventLoop->exit(); 300 emit sigOperationsAborted(); 301 } 302 292 303 void UINotificationCenter::retranslateUi() 293 304 { -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r99263 r99265 67 67 void sigClose(); 68 68 69 /** Notifies listener about all operations aborted. */ 70 void sigOperationsAborted(); 71 69 72 public: 70 73 … … 95 98 * @note It's a blocking call finished by sltHandleProgressFinished(). */ 96 99 bool handleNow(UINotificationProgress *pProgress); 100 /** Returns whether center has blocking operation. */ 101 bool hasOperationsPending() const; 102 /** Aborts blocking operations being performed. */ 103 void abortOperations(); 97 104 98 105 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r99205 r99265 289 289 pEvent->ignore(); 290 290 291 /* Let the notification-center abort blocking operations: */ 292 if (m_pNotificationCenter->hasOperationsPending()) 293 m_pNotificationCenter->abortOperations(); 294 else 291 295 /* Tell the listener to close us (once): */ 292 296 if (!m_fClosed) … … 589 593 /* Prepare local notification-center: */ 590 594 m_pNotificationCenter = new UINotificationCenter(this); 595 if (m_pNotificationCenter) 596 connect(m_pNotificationCenter, &UINotificationCenter::sigOperationsAborted, 597 this, &UINativeWizard::close, Qt::QueuedConnection); 591 598 } 592 599
Note:
See TracChangeset
for help on using the changeset viewer.