Changeset 3909 in vbox
- Timestamp:
- Jul 27, 2007 5:09:06 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r3867 r3909 498 498 //////////////////////////////////////////////////////////////////////////////// 499 499 500 static bool vboxGlobal_inited = false;501 static bool vboxGlobal_cleanup = false;500 static bool sVBoxGlobalInited = false; 501 static bool sVBoxGlobalInCleanup = false; 502 502 503 503 /** @internal … … 510 510 static void vboxGlobalCleanup() 511 511 { 512 Assert (! vboxGlobal_cleanup);513 vboxGlobal_cleanup = true;512 Assert (!sVBoxGlobalInCleanup); 513 sVBoxGlobalInCleanup = true; 514 514 vboxGlobal().cleanup(); 515 515 } … … 626 626 static VBoxGlobal vboxGlobal_instance; 627 627 628 if (! vboxGlobal_inited)628 if (!sVBoxGlobalInited) 629 629 { 630 630 /* check that a QApplication instance is created */ 631 631 if (qApp) 632 632 { 633 vboxGlobal_inited = true;633 sVBoxGlobalInited = true; 634 634 vboxGlobal_instance.init(); 635 635 /* add our cleanup handler to the list of Qt post routines */ … … 1449 1449 1450 1450 /* ignore the request during application termination */ 1451 if ( vboxGlobal_cleanup)1451 if (sVBoxGlobalInCleanup) 1452 1452 return; 1453 1453 … … 1487 1487 VBoxMediaList::const_iterator it; 1488 1488 for (it = mList.begin(); 1489 it != mList.end() && ! vboxGlobal_cleanup;1489 it != mList.end() && !sVBoxGlobalInCleanup; 1490 1490 ++ it, ++ index) 1491 1491 { … … 1551 1551 1552 1552 /* post the last message to indicate the end of enumeration */ 1553 if (! vboxGlobal_cleanup)1553 if (!sVBoxGlobalInCleanup) 1554 1554 QApplication::postEvent (target, new VBoxEnumerateMediaEvent()); 1555 1555 … … 3404 3404 { 3405 3405 /* sanity check */ 3406 if (! vboxGlobal_cleanup)3406 if (!sVBoxGlobalInCleanup) 3407 3407 { 3408 3408 AssertMsgFailed (("Should never be called directly\n")); … … 3419 3419 if (media_enum_thread) 3420 3420 { 3421 /* vboxGlobal_cleanup is true here, so just wait for the thread */3421 /* sVBoxGlobalInCleanup is true here, so just wait for the thread */ 3422 3422 media_enum_thread->wait(); 3423 3423 delete media_enum_thread; … … 3436 3436 /* the last step to ensure we don't use COM any more */ 3437 3437 vbox.detach(); 3438 3439 /* There may be VBoxEnumerateMediaEvent instances still in the message 3440 * queue which reference COM objects. Remove them to release those objects 3441 * before uninitializing the COM subsystem. */ 3442 QApplication::removePostedEvents (this); 3438 3443 3439 3444 COMBase::cleanupCOM();
Note:
See TracChangeset
for help on using the changeset viewer.