Changeset 33689 in vbox for trunk/src/VBox
- Timestamp:
- Nov 2, 2010 1:30:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r33666 r33689 23 23 #include <QMutex> 24 24 #include <QWaitCondition> 25 #include <QTimer> 25 26 26 27 /* Local includes */ … … 79 80 , m_data(data) 80 81 , m_fConditionDone(false) 82 , m_fAllowToDestroySerializer(false) 81 83 , m_iPageIdWeAreWaitingFor(-1) 82 84 , m_iIdOfHighPriorityPage(-1) … … 85 87 connect(this, SIGNAL(sigNotifyAboutPageProcessed(int)), this, SLOT(sltHandleProcessedPage(int)), Qt::QueuedConnection); 86 88 connect(this, SIGNAL(sigNotifyAboutPagesProcessed()), this, SLOT(sltHandleProcessedPages()), Qt::QueuedConnection); 87 connect(this, SIGNAL(finished()), this, SLOT( deleteLater()), Qt::QueuedConnection);89 connect(this, SIGNAL(finished()), this, SLOT(sltDestroySerializer()), Qt::QueuedConnection); 88 90 89 91 /* Set instance: */ … … 194 196 if (!m_fConditionDone) 195 197 m_fConditionDone = true; 198 } 199 200 /* Slot to destroy serializer: */ 201 void sltDestroySerializer() 202 { 203 /* If not yet all events were processed, 204 * we should postpone destruction for now: */ 205 if (!m_fAllowToDestroySerializer) 206 QTimer::singleShot(0, this, SLOT(sltDestroySerializer())); 207 else 208 deleteLater(); 196 209 } 197 210 … … 214 227 m_mutex.unlock(); 215 228 } 229 m_fAllowToDestroySerializer = true; 216 230 } 217 231 … … 261 275 UISettingsPageMap m_pages; 262 276 bool m_fConditionDone; 277 bool m_fAllowToDestroySerializer; 263 278 int m_iPageIdWeAreWaitingFor; 264 279 int m_iIdOfHighPriorityPage;
Note:
See TracChangeset
for help on using the changeset viewer.