VirtualBox

Changeset 103481 in vbox


Ignore:
Timestamp:
Feb 20, 2024 4:37:38 PM (11 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:3409: A bit of fixes for details generator stuff which is used in Details and Snapshot panes.

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

Legend:

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

    r103085 r103481  
    717717}
    718718
    719 QString summarizeGenericProperties(const CNetworkAdapter &comAdapter)
    720 {
    721     QVector<QString> names;
    722     QVector<QString> props;
    723     props = comAdapter.GetProperties(QString(), names);
    724     QString strResult;
    725     for (int i = 0; i < names.size(); ++i)
    726     {
    727         strResult += names[i] + "=" + props[i];
    728         if (i < names.size() - 1)
    729             strResult += ", ";
    730     }
    731     return strResult;
    732 }
    733 
    734719UITextTable UIDetailsGenerator::generateMachineInformationNetwork(CMachine &comMachine,
    735720                                                                  const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions)
     
    15591544        strInfo += e_strTableRow2.arg(UICommon::tr("Processors", "details report"), QString::number(cCpuCount));
    15601545}
     1546
     1547QString UIDetailsGenerator::summarizeGenericProperties(const CNetworkAdapter &comAdapter)
     1548{
     1549    QVector<QString> names;
     1550    QVector<QString> props;
     1551    props = comAdapter.GetProperties(QString(), names);
     1552    QString strResult;
     1553    for (int i = 0; i < names.size(); ++i)
     1554    {
     1555        strResult += names[i] + "=" + props[i];
     1556        if (i < names.size() - 1)
     1557            strResult += ", ";
     1558    }
     1559    return strResult;
     1560}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.h

    r98490 r103481  
    4545class CGuest;
    4646class CMachine;
     47class CNetworkAdapter;
    4748
    4849/** Details generation namespace. */
     
    119120                                                        KParavirtProvider enmProvider);
    120121
     122    SHARED_LIBRARY_STUFF QString summarizeGenericProperties(const CNetworkAdapter &comAdapter);
     123
    121124    /** Holds the table row format 1. */
    122125    extern const QString e_strTableRow1;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.h

    r98103 r103481  
    392392    void run();
    393393
    394     /** Summarizes generic properties. */
    395     static QString summarizeGenericProperties(const CNetworkAdapter &adapter);
    396 
    397394    /** Holds the options. */
    398395    UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork m_fOptions;
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r102597 r103481  
    5151#include "UICursor.h"
    5252#include "UIDesktopWidgetWatchdog.h"
     53#include "UIDetailsGenerator.h"
    5354#include "UIIconPool.h"
    5455#include "UIGuestOSType.h"
     
    19921993                case KNetworkAttachmentType_Generic:
    19931994                {
    1994                     QString strGenericDriverProperties(summarizeGenericProperties(comAdapter));
     1995                    QString strGenericDriverProperties(UIDetailsGenerator::summarizeGenericProperties(comAdapter));
    19951996                    strInfo = strInfo.arg(  strGenericDriverProperties.isNull()
    19961997                                          ? strInfo.arg(QApplication::translate("UIDetails", "Generic Driver, '%1'", "details (network)")
     
    21062107}
    21072108
    2108 /* static */
    2109 QString UISnapshotDetailsWidget::summarizeGenericProperties(const CNetworkAdapter &comNetwork)
    2110 {
    2111     QVector<QString> names;
    2112     QVector<QString> props;
    2113     props = comNetwork.GetProperties(QString(), names);
    2114     QString strResult;
    2115     for (int i = 0; i < names.size(); ++i)
    2116     {
    2117         strResult += names[i] + "=" + props[i];
    2118         if (i < names.size() - 1)
    2119             strResult += ", ";
    2120     }
    2121     return strResult;
    2122 }
    2123 
    21242109#include "UISnapshotDetailsWidget.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.h

    r98103 r103481  
    211211    static QString empReport(const QString &strValue, bool fIgnore);
    212212
    213     /** Summarizes generic properties. */
    214     static QString summarizeGenericProperties(const CNetworkAdapter &adapter);
    215 
    216213    /** Holds the machine object to load data from. */
    217214    CMachine   m_comMachine;
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