VirtualBox

Changeset 86275 in vbox


Ignore:
Timestamp:
Sep 24, 2020 8:04:03 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: UIDetailsElement & UIDetailsGenerator: Rework cloud VM details element & generator to be able to use IStringFormValue::getClipboardString to acquire full value name for tool-tip and copy needs.

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

Legend:

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

    r86225 r86275  
    177177}
    178178
    179 QString UIDetailsGenerator::generateFormValueInformation(const CFormValue &comFormValue)
     179QString UIDetailsGenerator::generateFormValueInformation(const CFormValue &comFormValue, bool fFull /* = false */)
    180180{
    181181    /* Handle possible form value types: */
     
    194194        {
    195195            CStringFormValue comValue(comFormValue);
    196             strResult = comValue.GetString();
     196            const QString strValue = comValue.GetString();
     197            const QString strClipboardValue = comValue.GetClipboardString();
     198            strResult = fFull && !strClipboardValue.isEmpty() ? strClipboardValue : strValue;
    197199            break;
    198200        }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.h

    r86225 r86275  
    3939    SHARED_LIBRARY_STUFF UITextTable generateMachineInformationGeneral(CCloudMachine &comCloudMachine,
    4040                                                                       const UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral &fOptions);
    41     SHARED_LIBRARY_STUFF QString generateFormValueInformation(const CFormValue &comFormValue);
     41    SHARED_LIBRARY_STUFF QString generateFormValueInformation(const CFormValue &comFormValue, bool fFull = false);
    4242
    4343    SHARED_LIBRARY_STUFF UITextTable generateMachineInformationSystem(CMachine &comMachine,
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp

    r86226 r86275  
    14041404                continue;
    14051405
    1406             /* Acquire resulting value in full and compressed form: */
    1407             const QString strIteratedResultFull = UIDetailsGenerator::generateFormValueInformation(comIteratedValue);
    1408             const QString strIteratedResultShort =    strIteratedResultFull.size() > 10
    1409                                                    && strIteratedResultFull.startsWith("ocid1.")
    1410                                                  ? QString("...%1").arg(strIteratedResultFull.right(10))
    1411                                                  : strIteratedResultFull;
     1406            /* Acquire resulting value in short and full form: */
     1407            const QString strIteratedResultShort = UIDetailsGenerator::generateFormValueInformation(comIteratedValue);
     1408            const QString strIteratedResultFull = UIDetailsGenerator::generateFormValueInformation(comIteratedValue, true /* full */);
    14121409
    14131410            /* Add 'Copy' action: */
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