VirtualBox

Changeset 71571 in vbox


Ignore:
Timestamp:
Mar 29, 2018 1:41:24 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Small cleanup for UIVirtualBoxEventHandler.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp

    r69500 r71571  
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121
    2222/* GUI includes: */
     23# include "VBoxGlobal.h"
     24# include "UIExtraDataManager.h"
     25# include "UIMainEventListener.h"
    2326# include "UIVirtualBoxEventHandler.h"
    24 # include "UIMainEventListener.h"
    25 # include "UIExtraDataManager.h"
    26 # include "VBoxGlobal.h"
    2727
    2828/* COM includes: */
     
    243243
    244244/* static */
    245 UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::m_spInstance = 0;
     245UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::s_pInstance = 0;
    246246
    247247/* static */
    248 UIVirtualBoxEventHandler* UIVirtualBoxEventHandler::instance()
    249 {
    250     if (!m_spInstance)
    251         m_spInstance = new UIVirtualBoxEventHandler;
    252     return m_spInstance;
     248UIVirtualBoxEventHandler *UIVirtualBoxEventHandler::instance()
     249{
     250    if (!s_pInstance)
     251        s_pInstance = new UIVirtualBoxEventHandler;
     252    return s_pInstance;
    253253}
    254254
     
    256256void UIVirtualBoxEventHandler::destroy()
    257257{
    258     if (m_spInstance)
     258    if (s_pInstance)
    259259    {
    260         delete m_spInstance;
    261         m_spInstance = 0;
     260        delete s_pInstance;
     261        s_pInstance = 0;
    262262    }
    263263}
     
    272272void UIVirtualBoxEventHandler::prepare()
    273273{
    274     /* Prepare: */
     274    /* Prepare connections: */
    275275    prepareConnections();
    276276}
     
    308308}
    309309
     310
    310311#include "UIVirtualBoxEventHandler.moc"
    311312
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h

    r69500 r71571  
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727/* Forward declarations: */
    2828class UIVirtualBoxEventHandlerProxy;
    29 
    3029
    3130/** Singleton QObject extension
     
    5958public:
    6059
    61     /** Returns singleton instance created by the factory. */
    62     static UIVirtualBoxEventHandler* instance();
    63     /** Destroys singleton instance created by the factory. */
     60    /** Returns singleton instance. */
     61    static UIVirtualBoxEventHandler *instance();
     62    /** Destroys singleton instance. */
    6463    static void destroy();
    6564
     
    6968    UIVirtualBoxEventHandler();
    7069
    71     /** @name Prepare cascade.
    72       * @{ */
    73         /** Prepares all. */
    74         void prepare();
    75         /** Prepares connections. */
    76         void prepareConnections();
    77     /** @} */
     70    /** Prepares all. */
     71    void prepare();
     72    /** Prepares connections. */
     73    void prepareConnections();
    7874
    7975private:
    8076
    81     /** Holds the singleton static VirtualBox event handler instance. */
    82     static UIVirtualBoxEventHandler *m_spInstance;
     77    /** Holds the singleton instance. */
     78    static UIVirtualBoxEventHandler *s_pInstance;
    8379
    8480    /** Holds the VirtualBox event proxy instance. */
     
    8682};
    8783
    88 /** Defines the globally known name for the VirtualBox event handler instance. */
     84/** Singleton VirtualBox Event Handler 'official' name. */
    8985#define gVBoxEvents UIVirtualBoxEventHandler::instance()
    9086
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette