VirtualBox

Changeset 66659 in vbox for trunk


Ignore:
Timestamp:
Apr 24, 2017 5:23:06 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6911: UIVMItem: Caching VM pixmap.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp

    r66657 r66659  
    155155QPixmap UIVMItem::osPixmap(QSize *pLogicalSize /* = 0 */) const
    156156{
    157     return m_fAccessible ? vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, pLogicalSize) :
    158                            vboxGlobal().vmGuestOSTypePixmapDefault("Other", pLogicalSize);
     157    if (pLogicalSize)
     158        *pLogicalSize = m_logicalPixmapSize;
     159    return m_pixmap;
    159160}
    160161
     
    236237        m_cSnaphot = m_machine.GetSnapshotCount();
    237238
     239        m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);
     240
    238241        if (   m_machineState == KMachineState_PoweredOff
    239242            || m_machineState == KMachineState_Saved
     
    283286        m_strOSTypeId = QString::null;
    284287        m_cSnaphot = 0;
     288
     289        m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize);
    285290
    286291        m_pid = (ULONG) ~0;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h

    r62493 r66659  
    2222#include <QDateTime>
    2323#include <QMimeData>
     24#include <QPixmap>
    2425
    2526/* GUI includes: */
     
    9798
    9899    QString m_strName;
     100    QPixmap m_pixmap;
     101    QSize m_logicalPixmapSize;
    99102    QString m_strSnapshotName;
    100103    QDateTime m_lastStateChange;
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