VirtualBox

Changeset 55557 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 30, 2015 2:41:21 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7676: Disk Encryption (DE) support: UIMedium should cache the encryption password ID during the enumeration.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp

    r55545 r55557  
    9191    m_strHardDiskFormat = other.hardDiskFormat();
    9292    m_strStorageDetails = other.storageDetails();
     93    m_strEncryptionPasswordID = other.encryptionPasswordID();
    9394
    9495    m_strUsage = other.usage();
     
    155156    m_strHardDiskFormat = QString();
    156157    m_strStorageDetails = QString();
     158    m_strEncryptionPasswordID = QString();
    157159
    158160    /* Reset data parameters: */
     
    245247                }
    246248
    247                 /* Check whether this medium is encrypted: */
     249                /* Refresh encryption attributes: */
    248250                if (m_strRootId != m_strId)
     251                {
     252                    m_strEncryptionPasswordID = root().encryptionPasswordID();
    249253                    m_fEncrypted = root().isEncrypted();
     254                }
    250255                else
    251256                {
    252257                    QString strCipher;
    253258                    CMedium medium(m_medium);
    254                     medium.GetEncryptionSettings(strCipher);
    255                     m_fEncrypted = medium.isOk();
     259                    const QString strEncryptionPasswordID = medium.GetEncryptionSettings(strCipher);
     260                    if (medium.isOk())
     261                    {
     262                        m_strEncryptionPasswordID = strEncryptionPasswordID;
     263                        m_fEncrypted = true;
     264                    }
    256265                }
    257266            }
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h

    r55545 r55557  
    193193    /** Returns the hard drive medium storage details. */
    194194    QString storageDetails() const { return m_strStorageDetails; }
     195    /** Returns the hard drive medium encryption password ID. */
     196    QString encryptionPasswordID() const { return m_strEncryptionPasswordID; }
    195197
    196198    /** Returns the medium usage data.
     
    336338    /** Holds the hard drive medium storage details. */
    337339    QString m_strStorageDetails;
     340    /** Holds the hard drive medium encryption password ID. */
     341    QString m_strEncryptionPasswordID;
    338342
    339343    /** Holds the medium usage. */
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