Changeset 90935 in vbox
- Timestamp:
- Aug 27, 2021 7:58:56 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146573
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.cpp
r82968 r90935 5 5 6 6 /* 7 * Copyright (C) 2012-202 0Oracle Corporation7 * Copyright (C) 2012-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 24 24 25 25 /* static */ 26 void UIConverter:: prepare()26 void UIConverter::create() 27 27 { 28 /* Make sure instance WAS NOT created yet: */ 29 if (s_pInstance) 30 return; 31 32 /* Prepare instance: */ 33 s_pInstance = new UIConverter; 28 AssertReturnVoid(!s_pInstance); 29 new UIConverter; 34 30 } 35 31 36 32 /* static */ 37 void UIConverter:: cleanup()33 void UIConverter::destroy() 38 34 { 39 /* Make sure instance WAS NOT destroyed yet: */ 40 if (!s_pInstance) 41 return; 42 43 /* Cleanup instance: */ 35 AssertPtrReturnVoid(s_pInstance); 44 36 delete s_pInstance; 45 s_pInstance = 0;46 37 } 47 -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverter.h
r82968 r90935 5 5 6 6 /* 7 * Copyright (C) 2012-202 0Oracle Corporation7 * Copyright (C) 2012-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 static UIConverter *instance() { return s_pInstance; } 35 35 36 /** Prepares everything. */37 static void prepare();38 /** Cleanups everything. */39 static void cleanup();36 /** Creates singleton instance. */ 37 static void create(); 38 /** Destroys singleton instance. */ 39 static void destroy(); 40 40 41 41 /** Converts QColor <= template class. */ … … 119 119 120 120 /** Constructs converter. */ 121 UIConverter() {} 121 UIConverter() { s_pInstance = this; } 122 /** Destructs converter. */ 123 virtual ~UIConverter() /* override final */ { s_pInstance = 0; } 122 124 123 125 /** Holds the static instance. */ … … 129 131 130 132 #endif /* !FEQT_INCLUDED_SRC_converter_UIConverter_h */ 131 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r90925 r90935 4134 4134 #endif /* VBOX_WS_MAC */ 4135 4135 4136 /* Prepare converter: */4137 UIConverter:: prepare();4136 /* Create converter: */ 4137 UIConverter::create(); 4138 4138 4139 4139 /* Create desktop-widget watchdog: */ … … 4705 4705 UIExtraDataManager::destroy(); 4706 4706 4707 /* Cleanupconverter: */4708 UIConverter:: cleanup();4707 /* Destroy converter: */ 4708 UIConverter::destroy(); 4709 4709 4710 4710 /* Cleanup thread-pools: */
Note:
See TracChangeset
for help on using the changeset viewer.