VirtualBox

Changeset 28389 in vbox


Ignore:
Timestamp:
Apr 15, 2010 8:13:32 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60150
Message:

FE/Qt4: new core: fix debugger GUI

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r28384 r28389  
    347347    , m_fIsWindowsCreated(false)
    348348    , m_fIsPreventAutoClose(false)
     349#ifdef VBOX_WITH_DEBUGGER_GUI
     350    , m_pDbgGui(0)
     351    , m_pDbgGuiVT(0)
     352#endif /* VBOX_WITH_DEBUGGER_GUI */
    349353#ifdef Q_WS_MAC
    350354    , m_fIsDockIconEnabled(true)
     
    358362UIMachineLogic::~UIMachineLogic()
    359363{
    360 #ifdef VBOX_WITH_DEBUGGER_GUI // TODO: Should we close debugger now?
     364#ifdef VBOX_WITH_DEBUGGER_GUI
    361365    /* Close debugger: */
    362     //dbgDestroy();
    363 #endif
     366    dbgDestroy();
     367#endif /* VBOX_WITH_DEBUGGER_GUI */
    364368}
    365369
     
    14591463{
    14601464    if (dbgCreated())
    1461         m_dbgGuiVT->pfnShowStatistics(m_dbgGui);
     1465        m_pDbgGuiVT->pfnShowStatistics(m_pDbgGui);
    14621466}
    14631467
     
    14651469{
    14661470    if (dbgCreated())
    1467         m_dbgGuiVT->pfnShowCommandLine(m_dbgGui);
     1471        m_pDbgGuiVT->pfnShowCommandLine(m_pDbgGui);
    14681472}
    14691473
     
    15491553bool UIMachineLogic::dbgCreated()
    15501554{
    1551     if (m_dbgGui)
     1555    if (m_pDbgGui)
    15521556        return true;
    15531557
     
    15611565    {
    15621566        ISession *pISession = session().raw();
    1563         rc = pfnGuiCreate(pISession, &m_dbgGui, &m_dbgGuiVT);
     1567        rc = pfnGuiCreate(pISession, &m_pDbgGui, &m_pDbgGuiVT);
    15641568        if (RT_SUCCESS(rc))
    15651569        {
    1566             if (DBGGUIVT_ARE_VERSIONS_COMPATIBLE(m_dbgGuiVT->u32Version, DBGGUIVT_VERSION) ||
    1567                 m_dbgGuiVT->u32EndVersion == m_dbgGuiVT->u32Version)
     1570            if (DBGGUIVT_ARE_VERSIONS_COMPATIBLE(m_pDbgGuiVT->u32Version, DBGGUIVT_VERSION) ||
     1571                m_pDbgGuiVT->u32EndVersion == m_pDbgGuiVT->u32Version)
    15681572            {
    1569                 m_dbgGuiVT->pfnSetParent(m_dbgGui, (QWidget*)defaultMachineWindow());
    1570                 m_dbgGuiVT->pfnSetMenu(m_dbgGui, (QMenu*)actionsPool()->action(UIActionIndex_Menu_Debug));
     1573                m_pDbgGuiVT->pfnSetParent(m_pDbgGui, defaultMachineWindow()->machineWindow());
     1574                m_pDbgGuiVT->pfnSetMenu(m_pDbgGui, actionsPool()->action(UIActionIndex_Menu_Debug));
    15711575                dbgAdjustRelativePos();
    15721576                return true;
     
    15741578
    15751579            LogRel(("DBGGuiCreate failed, incompatible versions (loaded %#x/%#x, expected %#x)\n",
    1576                     m_dbgGuiVT->u32Version, m_dbgGuiVT->u32EndVersion, DBGGUIVT_VERSION));
     1580                    m_pDbgGuiVT->u32Version, m_pDbgGuiVT->u32EndVersion, DBGGUIVT_VERSION));
    15771581        }
    15781582        else
     
    15821586        LogRel(("RTLdrGetSymbol(,\"DBGGuiCreate\",) -> %Rrc\n", rc));
    15831587
    1584     m_dbgGui = 0;
    1585     m_dbgGuiVT = 0;
     1588    m_pDbgGui = 0;
     1589    m_pDbgGuiVT = 0;
    15861590    return false;
    15871591}
     
    15891593void UIMachineLogic::dbgDestroy()
    15901594{
    1591     if (m_dbgGui)
    1592     {
    1593         m_dbgGuiVT->pfnDestroy(m_dbgGui);
    1594         m_dbgGui = 0;
    1595         m_dbgGuiVT = 0;
     1595    if (m_pDbgGui)
     1596    {
     1597        m_pDbgGuiVT->pfnDestroy(m_pDbgGui);
     1598        m_pDbgGui = 0;
     1599        m_pDbgGuiVT = 0;
    15961600    }
    15971601}
     
    15991603void UIMachineLogic::dbgAdjustRelativePos()
    16001604{
    1601     if (m_dbgGui)
     1605    if (m_pDbgGui)
    16021606    {
    16031607        QRect rct = defaultMachineWindow()->machineWindow()->frameGeometry();
    1604         m_dbgGuiVT->pfnAdjustRelativePos(m_dbgGui, rct.x(), rct.y(), rct.width(), rct.height());
     1608        m_pDbgGuiVT->pfnAdjustRelativePos(m_pDbgGui, rct.x(), rct.y(), rct.width(), rct.height());
    16051609    }
    16061610}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r28342 r28389  
    207207    void dbgDestroy();
    208208    void dbgAdjustRelativePos();
    209     /* The handle to the debugger gui: */
    210     PDBGGUI m_dbgGui;
     209    /* The handle to the debugger GUI: */
     210    PDBGGUI m_pDbgGui;
    211211    /* The virtual method table for the debugger GUI: */
    212     PCDBGGUIVT m_dbgGuiVT;
     212    PCDBGGUIVT m_pDbgGuiVT;
    213213#endif
    214214
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r27873 r28389  
    441441}
    442442
     443#ifdef VBOX_WITH_DEBUGGER_GUI
     444void UIMachineWindow::updateDbgWindows()
     445{
     446    /* The debugger windows are bind to the main VM window. */
     447    if (m_uScreenId == 0)
     448        machineLogic()->dbgAdjustRelativePos();
     449}
     450#endif /* VBOX_WITH_DEBUGGER_GUI */
     451
    443452void UIMachineWindow::sltMachineStateChanged()
    444453{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r27678 r28389  
    9090    /* Update routines: */
    9191    virtual void updateAppearanceOf(int iElement);
     92#ifdef VBOX_WITH_DEBUGGER_GUI
     93    virtual void updateDbgWindows();
     94#endif /* VBOX_WITH_DEBUGGER_GUI */
    9295
    9396    /* Protected slots: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r28239 r28389  
    281281                m_normalGeometry.setSize(pResizeEvent->size());
    282282#ifdef VBOX_WITH_DEBUGGER_GUI
    283                 // TODO: Update debugger window size!
    284                 //dbgAdjustRelativePos();
     283                /* Update debugger window position */
     284                updateDbgWindows();
    285285#endif
    286286            }
     
    293293                m_normalGeometry.moveTo(geometry().x(), geometry().y());
    294294#ifdef VBOX_WITH_DEBUGGER_GUI
    295                 // TODO: Update debugger window position!
    296                 //dbgAdjustRelativePos();
     295                /* Update debugger window position */
     296                updateDbgWindows();
    297297#endif
    298298            }
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