VirtualBox

Changeset 54644 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 5, 2015 11:21:53 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Re-applying stuff reverted in r98784.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp

    r54637 r54644  
    2121
    2222/* Qt includes: */
    23 # include <QObject>
     23# include <QSocketNotifier>
     24
     25/* GUI includes: */
     26# include "COMDefs.h"
    2427
    2528/* COM includes: */
    26 # include "COMDefs.h"
    27 # include "UIDefs.h"
    2829# include "CVirtualBoxErrorInfo.h"
    2930
    3031#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3132
    32 #include <QSocketNotifier>
     33/* VirtualBox interface declarations: */
     34#ifndef VBOX_WITH_XPCOM
     35# include "VirtualBox.h"
     36#else /* !VBOX_WITH_XPCOM */
     37# include "VirtualBox_XPCOM.h"
     38#endif /* VBOX_WITH_XPCOM */
     39
     40/* Other VBox includes: */
     41#include <iprt/log.h>
    3342
    3443#ifdef VBOX_WITH_XPCOM
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h

    r54637 r54644  
    9898#endif /* !defined(VBOX_WITH_XPCOM) */
    9999
    100 
    101 /* VirtualBox interfaces declarations */
    102 #if !defined(VBOX_WITH_XPCOM)
    103     #include <VirtualBox.h>
    104 #else /* !defined(VBOX_WITH_XPCOM) */
    105     #include <VirtualBox_XPCOM.h>
    106 #endif /* !defined(VBOX_WITH_XPCOM) */
    107 
    108100/////////////////////////////////////////////////////////////////////////////
    109101
     
    637629        clear();
    638630        mIface = that.mIface;
    639         this->addref(ptr());
     631        this->addref((IUnknown*)ptr());
    640632    }
    641633
     
    644636        clear();
    645637        setPtr(aIface);
    646         this->addref(aIface);
     638        this->addref((IUnknown*)aIface);
    647639    }
    648640
     
    697689        /* be aware of self assignment */
    698690        I* amIface = ptr();
    699         this->addref(aIface);
    700         this->release(amIface);
     691        this->addref((IUnknown*)aIface);
     692        this->release((IUnknown*)amIface);
    701693        if (aIface)
    702694        {
    703695            amIface = NULL;
    704696            B::mRC = aIface->QueryInterface(COM_IIDOF(I), (void **)&amIface);
    705             this->release(aIface);
     697            this->release((IUnknown*)aIface);
    706698            setPtr(amIface);
    707699        }
     
    720712#endif
    721713        /* be aware of self assignment */
    722         this->addref(aIface);
    723         this->release(ptr());
     714        this->addref((IUnknown*)aIface);
     715        this->release((IUnknown*)ptr());
    724716        setPtr(aIface);
    725717        B::mRC = S_OK;
     
    732724       Assert(!mDead);
    733725#endif
    734        this->release(ptr());
     726       this->release((IUnknown*)ptr());
    735727       setPtr(NULL);
    736728    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl

    r54637 r54644  
    239239    <xsl:text> * Generator : src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl&#x0A;</xsl:text>
    240240    <xsl:text> */&#x0A;&#x0A;</xsl:text>
     241    <xsl:text>/* VirtualBox interface declarations: */&#x0A;</xsl:text>
     242    <xsl:text>#ifndef VBOX_WITH_XPCOM&#x0A;</xsl:text>
     243    <xsl:text># include "VirtualBox.h"&#x0A;</xsl:text>
     244    <xsl:text>#else /* !VBOX_WITH_XPCOM */&#x0A;</xsl:text>
     245    <xsl:text># include "VirtualBox_XPCOM.h"&#x0A;</xsl:text>
     246    <xsl:text>#endif /* VBOX_WITH_XPCOM */&#x0A;&#x0A;</xsl:text>
    241247    <xsl:text>/* COM includes: */&#x0A;</xsl:text>
    242248    <xsl:text>#include "COMEnums.h"&#x0A;</xsl:text>
     
    295301    <xsl:text>&#x0A;</xsl:text>
    296302
    297     <!-- Interface declaration: -->
    298     <xsl:text>/* Interface declaration: */&#x0A;</xsl:text>
     303    <!-- Interface forward declaration: -->
     304    <xsl:text>/* Interface forward declaration: */&#x0A;</xsl:text>
     305    <xsl:text>struct I</xsl:text>
     306    <xsl:value-of select="substring(@name,2)"/>
     307    <xsl:text>;&#x0A;&#x0A;</xsl:text>
     308
     309    <!-- Interface wrapper declaration: -->
     310    <xsl:text>/* Interface wrapper declaration: */&#x0A;</xsl:text>
    299311    <xsl:text>class C</xsl:text>
    300312    <xsl:value-of select="substring(@name,2)"/>
     
    330342    <xsl:text>Q_DECLARE_METATYPE(</xsl:text>
    331343    <xsl:value-of select="concat('C',substring(@name,2))"/>
    332     <xsl:text>)&#x0A;&#x0A;</xsl:text>
     344    <xsl:text>);&#x0A;&#x0A;</xsl:text>
    333345
    334346    <!-- Declare safe-array -->
     
    466478  <xsl:text>    C</xsl:text>
    467479  <xsl:value-of select="substring(@name,2)"/>
    468   <xsl:text>() {}&#x0A;&#x0A;</xsl:text>
     480  <xsl:text>();&#x0A;</xsl:text>
     481  <!-- default destructor -->
     482  <xsl:text>    ~C</xsl:text>
     483  <xsl:value-of select="substring(@name,2)"/>
     484  <xsl:text>();&#x0A;&#x0A;</xsl:text>
    469485  <!-- constructor taking CWhatever -->
    470486  <xsl:text>    template&lt;class OI, class OB&gt; explicit C</xsl:text>
     
    486502  <xsl:text>(const C</xsl:text>
    487503  <xsl:value-of select="substring(@name,2)"/>
    488   <xsl:text> &amp; that) : Base(that) {}&#x0A;&#x0A;</xsl:text>
     504  <xsl:text> &amp; that);&#x0A;&#x0A;</xsl:text>
    489505  <!-- constructor taking a raw iface pointer -->
    490506  <xsl:text>    template&lt;class OI&gt; explicit C</xsl:text>
     
    496512  <xsl:text>(</xsl:text>
    497513  <xsl:value-of select="@name"/>
    498   <xsl:text> * aIface) : Base(aIface) {}&#x0A;&#x0A;</xsl:text>
     514  <xsl:text> * aIface);&#x0A;&#x0A;</xsl:text>
    499515  <!-- assignment taking CWhatever -->
    500516  <xsl:text>    template&lt;class OI, class OB&gt; C</xsl:text>
     
    517533  <xsl:text> &amp; operator=(const C</xsl:text>
    518534  <xsl:value-of select="substring(@name,2)"/>
    519 <xsl:text> &amp; that)
    520     {
    521         Base::operator=(that);
    522         return *this;
    523     }
    524 </xsl:text>
     535<xsl:text> &amp; that);&#x0A;</xsl:text>
    525536  <xsl:text>&#x0A;</xsl:text>
    526537  <!-- assignment taking a raw iface pointer -->
     
    539550  <xsl:text> &amp; operator=(</xsl:text>
    540551  <xsl:value-of select="@name"/>
    541 <xsl:text> * aIface)
    542     {
    543         Base::operator=(aIface);
    544         return *this;
    545     }
    546 </xsl:text>
     552<xsl:text> * aIface);&#x0A;</xsl:text>
    547553  <xsl:text>&#x0A;</xsl:text>
    548554
     
    655661</xsl:template>
    656662
     663<xsl:template name="defineConstructors">
     664
     665  <!-- default constructor -->
     666  <xsl:text>C</xsl:text>
     667  <xsl:value-of select="substring(@name,2)"/>
     668  <xsl:text>::C</xsl:text>
     669  <xsl:value-of select="substring(@name,2)"/>
     670  <xsl:text>() {}&#x0A;&#x0A;</xsl:text>
     671
     672  <!-- default destructor -->
     673  <xsl:text>C</xsl:text>
     674  <xsl:value-of select="substring(@name,2)"/>
     675  <xsl:text>::~C</xsl:text>
     676  <xsl:value-of select="substring(@name,2)"/>
     677  <xsl:text>() {}&#x0A;&#x0A;</xsl:text>
     678
     679  <!-- copy constructor -->
     680  <xsl:text>C</xsl:text>
     681  <xsl:value-of select="substring(@name,2)"/>
     682  <xsl:text>::C</xsl:text>
     683  <xsl:value-of select="substring(@name,2)"/>
     684  <xsl:text>(const C</xsl:text>
     685  <xsl:value-of select="substring(@name,2)"/>
     686  <xsl:text> &amp;that) : Base(that) {}&#x0A;&#x0A;</xsl:text>
     687
     688  <!-- copy constructor taking interface pointer -->
     689  <xsl:text>C</xsl:text>
     690  <xsl:value-of select="substring(@name,2)"/>
     691  <xsl:text>::C</xsl:text>
     692  <xsl:value-of select="substring(@name,2)"/>
     693  <xsl:text>(</xsl:text>
     694  <xsl:value-of select="@name"/>
     695  <xsl:text> *pIface) : Base(pIface) {}&#x0A;&#x0A;</xsl:text>
     696
     697  <!-- operator= -->
     698  <xsl:text>C</xsl:text>
     699  <xsl:value-of select="substring(@name,2)"/>
     700  <xsl:text>&amp; </xsl:text>
     701  <xsl:text>C</xsl:text>
     702  <xsl:value-of select="substring(@name,2)"/>
     703  <xsl:text>::operator=(const C</xsl:text>
     704  <xsl:value-of select="substring(@name,2)"/>
     705<xsl:text> &amp;that)
     706{
     707    Base::operator=(that);
     708    return *this;
     709}
     710</xsl:text>
     711  <xsl:text>&#x0A;</xsl:text>
     712
     713  <!-- operator= taking interface pointer -->
     714  <xsl:text>C</xsl:text>
     715  <xsl:value-of select="substring(@name,2)"/>
     716  <xsl:text>&amp; </xsl:text>
     717  <xsl:text>C</xsl:text>
     718  <xsl:value-of select="substring(@name,2)"/>
     719  <xsl:text>::operator=(</xsl:text>
     720  <xsl:value-of select="@name"/>
     721<xsl:text> *pIface)
     722{
     723    Base::operator=(pIface);
     724    return *this;
     725}
     726</xsl:text>
     727  <xsl:text>&#x0A;</xsl:text>
     728
     729</xsl:template>
     730
    657731<xsl:template name="defineAttributes">
    658732
     
    894968
    895969<xsl:template name="defineMembers">
     970  <xsl:call-template name="defineConstructors">
     971    <xsl:with-param name="iface" select="."/>
     972  </xsl:call-template>
    896973  <xsl:call-template name="defineAttributes">
    897974    <xsl:with-param name="iface" select="."/>
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r54637 r54644  
    134134
    135135#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     136
     137/* VirtualBox interface declarations: */
     138#ifndef VBOX_WITH_XPCOM
     139# include "VirtualBox.h"
     140#else /* !VBOX_WITH_XPCOM */
     141# include "VirtualBox_XPCOM.h"
     142#endif /* VBOX_WITH_XPCOM */
    136143
    137144#include <QLibraryInfo>
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r54637 r54644  
    4646#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4747
     48/* VirtualBox interface declarations: */
     49#ifndef VBOX_WITH_XPCOM
     50# include "VirtualBox.h"
     51#else /* !VBOX_WITH_XPCOM */
     52# include "VirtualBox_XPCOM.h"
     53#endif /* VBOX_WITH_XPCOM */
     54
    4855/* Other VBox includes: */
    4956#include <iprt/critsect.h>
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp

    r54637 r54644  
    4141#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4242
     43/* VirtualBox interface declarations: */
     44#ifndef VBOX_WITH_XPCOM
     45# include "VirtualBox.h"
     46#else /* !VBOX_WITH_XPCOM */
     47# include "VirtualBox_XPCOM.h"
     48#endif /* VBOX_WITH_XPCOM */
    4349
    4450UIGMachinePreview::UIGMachinePreview(QIGraphicsWidget *pParent)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r54637 r54644  
    4242# include "CUSBDeviceFilter.h"
    4343# include "CHostUSBDevice.h"
     44# include "CHostUSBDeviceFilter.h"
    4445# include "CExtPackManager.h"
    4546# include "CExtPack.h"
     
    4748#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4849
    49 #include "CHostUSBDeviceFilter.h"
     50/* VirtualBox interface declarations: */
     51#ifndef VBOX_WITH_XPCOM
     52# include "VirtualBox.h"
     53#else /* !VBOX_WITH_XPCOM */
     54# include "VirtualBox_XPCOM.h"
     55#endif /* VBOX_WITH_XPCOM */
    5056
    5157
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r54637 r54644  
    3939#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4040
     41/* VirtualBox interface declarations: */
     42#ifndef VBOX_WITH_XPCOM
     43# include "VirtualBox.h"
     44#else /* !VBOX_WITH_XPCOM */
     45# include "VirtualBox_XPCOM.h"
     46#endif /* VBOX_WITH_XPCOM */
    4147
    4248/* Namespaces: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp

    r54637 r54644  
    3939#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4040
     41/* VirtualBox interface declarations: */
     42#ifndef VBOX_WITH_XPCOM
     43# include "VirtualBox.h"
     44#else /* !VBOX_WITH_XPCOM */
     45# include "VirtualBox_XPCOM.h"
     46#endif /* VBOX_WITH_XPCOM */
    4147
    4248UIWizardNewVMPage3::UIWizardNewVMPage3()
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