VirtualBox

Changeset 100737 in vbox


Ignore:
Timestamp:
Jul 30, 2023 9:48:13 AM (16 months ago)
Author:
vboxsync
Message:

API/FE/Qt: bugref:10466. bugref:10465. Adding a new event to signal successful uninstallation of extension pack. And GUI side of the code to handl this event.

Location:
trunk/src/VBox
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp

    r100730 r100737  
    390390    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigExtensionPackInstalled,
    391391            this, &UIExtensionPackManagerWidget::sltHandleExtensionPackInstalled);
     392    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigExtensionPackUninstalled,
     393            this, &UIExtensionPackManagerWidget::sltHandleExtensionPackUninstalled);
    392394
    393395    /* Prepare stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r100730 r100737  
    5252#include "CExtraDataChangedEvent.h"
    5353#include "CExtPackInstalledEvent.h"
     54#include "CExtPackUninstalledEvent.h"
    5455#include "CGuestMonitorChangedEvent.h"
    5556#include "CGuestProcessIOEvent.h"
     
    631632            CExtPackInstalledEvent comEventSpecific(pEvent);
    632633            emit sigExtensionPackInstalled(comEventSpecific.GetName());
    633         };
     634            break;
     635        }
     636        case KVBoxEventType_OnExtPackUninstalled:
     637        {
     638            CExtPackInstalledEvent comEventSpecific(pEvent);
     639            emit sigExtensionPackUninstalled(comEventSpecific.GetName());
     640            break;
     641        }
    634642        default: break;
    635643    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r100730 r100737  
    125125        /** Notifies about ext.pack installation @a strname is the name of the installed ext. pack. */
    126126        void sigExtensionPackInstalled(const QString &strName);
     127        /** Notifies about ext.pack uninstallation @a strname is the name of the installed ext. pack. */
     128        void sigExtensionPackUninstalled(const QString &strName);
    127129    /** @} */
    128130
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp

    r100730 r100737  
    9393     *  @param  strName      Passes extension pack name. */
    9494    void sigExtensionPackInstalled(const QString &strName);
     95    /** Notifies extension pack. unnstall.
     96     *  @param  strName      Passes extension pack name. */
     97    void sigExtensionPackUninstalled(const QString &strName);
    9598
    9699public:
     
    262265            this, SIGNAL(sigExtensionPackInstalled(QString)),
    263266            Qt::DirectConnection);
     267    connect(m_pQtListener->getWrapped(), SIGNAL(sigExtensionPackUninstalled(QString)),
     268            this, SIGNAL(sigExtensionPackUninstalled(QString)),
     269            Qt::DirectConnection);
    264270}
    265271
     
    386392            this, SIGNAL(sigExtensionPackInstalled(QString)),
    387393            Qt::QueuedConnection);
     394    connect(m_pProxy, SIGNAL(sigExtensionPackUninstalled(QString)),
     395            this, SIGNAL(sigExtensionPackUninstalled(QString)),
     396            Qt::QueuedConnection);
    388397}
    389398
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h

    r100730 r100737  
    101101     *  @param  strName      Passes extension pack name. */
    102102    void sigExtensionPackInstalled(const QString &strName);
     103    /** Notifies extension pack. uninstall.
     104     *  @param  strName      Passes extension pack name. */
     105    void sigExtensionPackUninstalled(const QString &strName);
    103106
    104107public:
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r100730 r100737  
    2692226922      </desc>
    2692326923    </const>
     26924    <const name="OnExtPackUninstalled" value="124">
     26925      <desc>
     26926        See <link to="IExtPackUninstalledEvent">IExtPackUninstalledEvent</link>.
     26927      </desc>
     26928    </const>
    2692426929    <!-- End event marker -->
    26925     <const name="End" value="124">
     26930    <const name="End" value="125">
    2692626931      <desc>
    2692726932        Must be last event, used for iterations and structures relying on numerical event values.
     
    2728627291      </desc>
    2728727292    </attribute>
    27288 
     27293  </interface>
     27294
     27295  <interface
     27296    name="IExtPackUninstalledEvent" extends="IEvent"
     27297    uuid="31aab263-95ef-48a4-9ce7-eaf0d3ae150f"
     27298    wsmap="managed" autogen="VBoxEvent" id="OnExtPackUninstalled"
     27299    >
     27300    <desc>Extension pack uninstalled event.</desc>
     27301    <attribute name="name" readonly="yes" type="wstring">
     27302      <desc>
     27303        Name of the extension pack.
     27304      </desc>
     27305    </attribute>
    2728927306  </interface>
    2729027307
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r100730 r100737  
    229229#ifdef VBOX_WITH_EXTPACK
    230230    void i_onExtPackInstalled(const Utf8Str &aExtPackName);
     231    void i_onExtPackUninstalled(const Utf8Str &aExtPackName);
    231232#endif
    232233
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r100729 r100737  
    32873287                                {
    32883288                                    if (!pExtPack)
     3289                                    {
    32893290                                        LogRel(("ExtPackManager: Successfully uninstalled extension pack '%s'.\n", a_pstrName->c_str()));
     3291                                        m->pVirtualBox->i_onExtPackInstalled(*a_pstrName);
     3292                                    }
    32903293                                    else
    32913294                                        hrc = setError(E_FAIL,
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r100730 r100737  
    37963796    ::FireExtPackInstalledEvent(m->pEventSource, aExtPackName);
    37973797}
     3798
     3799void VirtualBox::i_onExtPackUninstalled(const Utf8Str &aExtPackName)
     3800{
     3801    ::FireExtPackUninstalledEvent(m->pEventSource, aExtPackName);
     3802}
    37983803#endif
    37993804
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