VirtualBox

Changeset 77409 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Feb 21, 2019 11:47:48 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128968
Message:

FE/Qt: Showing machine's name in debug console's title bar.

Location:
trunk/src/VBox/Debugger
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/VBoxDbgConsole.cpp

    r76553 r77409  
    2222#define LOG_GROUP LOG_GROUP_DBGG
    2323#include "VBoxDbgConsole.h"
     24#include "VBoxDbgGui.h"
    2425
    2526#include <QLabel>
     
    489490    m_fTerminate(false), m_fThreadTerminated(false)
    490491{
    491     setWindowTitle("VBoxDbg - Console");
    492 
     492    QString strMachineName;
     493    if (a_pDbgGui)
     494        strMachineName = a_pDbgGui->getMachineName();
     495
     496    if (strMachineName.isEmpty())
     497        setWindowTitle("VBoxDbg - Console");
     498    else
     499        setWindowTitle(QString("%1 - VBoxDbg - Console").arg(strMachineName));
    493500    /*
    494501     * Create the output text box.
  • trunk/src/VBox/Debugger/VBoxDbgGui.cpp

    r76553 r77409  
    257257}
    258258
     259QString
     260VBoxDbgGui::getMachineName() const
     261{
     262    QString strName;
     263    AssertReturn(m_pMachine, strName);
     264    BSTR bstr;
     265    HRESULT hrc = m_pMachine->COMGETTER(Name)(&bstr);
     266    if (SUCCEEDED(hrc))
     267    {
     268        strName = QString::fromUtf16(bstr);
     269    }
     270    SysFreeString(bstr);
     271    return strName;
     272}
    259273
    260274void
  • trunk/src/VBox/Debugger/VBoxDbgGui.h

    r76564 r77409  
    141141    }
    142142
     143    /**
     144     * @returns The name of the machine.
     145     */
     146    QString getMachineName() const;
    143147
    144148protected slots:
Note: See TracChangeset for help on using the changeset viewer.

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