Changeset 90881 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 25, 2021 1:28:50 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxTranslator.h
r90828 r90881 38 38 39 39 static VirtualBoxTranslator *instance(); 40 /* Returns instance if exists, returns NULL otherwise. */ 41 static VirtualBoxTranslator *tryInstance(); 40 42 void release(); 41 43 … … 90 92 const int aNum = -1); 91 93 92 /* Returns instance if exists, returns NULL otherwise. */93 static VirtualBoxTranslator *i_instance();94 94 }; 95 95 -
trunk/src/VBox/Main/src-all/VirtualBoxTranslator.cpp
r90828 r90881 143 143 144 144 /* static */ 145 VirtualBoxTranslator *VirtualBoxTranslator:: i_instance()145 VirtualBoxTranslator *VirtualBoxTranslator::tryInstance() 146 146 { 147 147 int rc = RTOnce(&g_Once, initLock, NULL); … … 322 322 const int aNum) 323 323 { 324 VirtualBoxTranslator *pCurrInstance = VirtualBoxTranslator:: i_instance();324 VirtualBoxTranslator *pCurrInstance = VirtualBoxTranslator::tryInstance(); 325 325 const char *pszTranslation = aSourceText; 326 326 if (pCurrInstance != NULL) … … 384 384 { 385 385 const char *pszSource = aTranslation; 386 VirtualBoxTranslator *pCurInstance = VirtualBoxTranslator:: i_instance(); /* paranoia */386 VirtualBoxTranslator *pCurInstance = VirtualBoxTranslator::tryInstance(); /* paranoia */ 387 387 if (pCurInstance != NULL) 388 388 { -
trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
r90879 r90881 84 84 case VBoxEventType_OnLanguageChanged: 85 85 { 86 VirtualBoxTranslator *pTranslator = VirtualBoxTranslator:: instance();86 VirtualBoxTranslator *pTranslator = VirtualBoxTranslator::tryInstance(); 87 87 if (pTranslator) 88 88 {
Note:
See TracChangeset
for help on using the changeset viewer.