VirtualBox

Changeset 88445 in vbox


Ignore:
Timestamp:
Apr 9, 2021 5:57:07 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9532: Fixing deprecated stuff: Replace QTextLayout::additionalFormat field setter/getter with format field stuff.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp

    r82968 r88445  
    6868}
    6969
    70 QList<QTextLayout::FormatRange> UIRichTextString::formatRanges(int iShift /* = 0 */) const
     70QVector<QTextLayout::FormatRange> UIRichTextString::formatRanges(int iShift /* = 0 */) const
    7171{
    7272    /* Prepare format range list: */
    73     QList<QTextLayout::FormatRange> ranges;
     73    QVector<QTextLayout::FormatRange> ranges;
    7474
    7575    /* Add own format range first: */
  • trunk/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.h

    r82968 r88445  
    6161    /** Returns the list of existing format ranges appropriate for QTextLayout.
    6262      * @param  iShift  Brings the shift of <i>this</i> rich text block accordig to it's root. */
    63     QList<QTextLayout::FormatRange> formatRanges(int iShift = 0) const;
     63    QVector<QTextLayout::FormatRange> formatRanges(int iShift = 0) const;
    6464
    6565    /** Defines the anchor to highlight in <i>this</i> rich text block and in it's children. */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp

    r83975 r88445  
    449449    /* Create layout; */
    450450    QTextLayout *pTextLayout = new QTextLayout(ms.toString(), font, pPaintDevice);
    451     pTextLayout->setAdditionalFormats(ms.formatRanges());
     451    pTextLayout->setFormats(ms.formatRanges());
    452452
    453453    /* Configure layout: */
     
    489489
    490490        /* Enumerate format ranges: */
    491         foreach (const QTextLayout::FormatRange &range, pTextLayout->additionalFormats())
     491        foreach (const QTextLayout::FormatRange &range, pTextLayout->formats())
    492492        {
    493493            /* Skip unrelated formats: */
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