VirtualBox

Changeset 93982 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 28, 2022 2:15:03 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: QString::SkipEmptyParts -> Qt::SkipEmptyParts (5.14+), ditto for QString::KeepEmptyParts. bugref:9898

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp

    r93980 r93982  
    12911291    if (fGuestAdditionsStatus)
    12921292    {
     1293#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     1294        QStringList versionStrings = m_comGuest.GetAdditionsVersion().split('.', Qt::SkipEmptyParts);
     1295#else
    12931296        QStringList versionStrings = m_comGuest.GetAdditionsVersion().split('.', QString::SkipEmptyParts);
     1297#endif
    12941298        if (!versionStrings.isEmpty())
    12951299        {
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.cpp

    r93115 r93982  
    10581058{
    10591059    /* Parse definition: */
     1060#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     1061    const QStringList parts = strDefinition.split('/', Qt::SkipEmptyParts);
     1062#else
    10601063    const QStringList parts = strDefinition.split('/', QString::SkipEmptyParts);
     1064#endif
    10611065    /* Depending on parts amount: */
    10621066    switch (parts.size())
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r93115 r93982  
    7272
    7373    /* Split details into paragraphs: */
     74#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     75    QStringList paragraphs(strText.split("<!--EOP-->", Qt::SkipEmptyParts));
     76#else
    7477    QStringList paragraphs(strText.split("<!--EOP-->", QString::SkipEmptyParts));
     78#endif
    7579    /* Make sure details-text has at least one paragraph: */
    7680    AssertReturnVoid(!paragraphs.isEmpty());
     
    8185    {
    8286        /* Split each paragraph into pairs: */
     87#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     88        QStringList parts(strParagraph.split("<!--EOM-->", Qt::KeepEmptyParts));
     89#else
    8390        QStringList parts(strParagraph.split("<!--EOM-->", QString::KeepEmptyParts));
     91#endif
    8492        /* Make sure each paragraph consist of 2 parts: */
    8593        AssertReturnVoid(parts.size() == 2);
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r93408 r93982  
    21802180    /* Few old extra-data string-lists were separated with 'semicolon' symbol.
    21812181     * All new separated by 'comma'. We have to take that into account. */
     2182#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     2183    return strValue.split(QRegExp("[;,]"), Qt::SkipEmptyParts);
     2184#else
    21822185    return strValue.split(QRegExp("[;,]"), QString::SkipEmptyParts);
     2186#endif
    21832187}
    21842188
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPathOperations.cpp

    r93115 r93982  
    134134/* static */ QStringList UIPathOperations::pathTrail(const QString &path)
    135135{
     136#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     137    return path.split(UIPathOperations::delimiter, Qt::SkipEmptyParts);
     138#else
    136139    return path.split(UIPathOperations::delimiter, QString::SkipEmptyParts);
     140#endif
    137141}
    138142
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r93726 r93982  
    604604        return;
    605605    }
     606#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     607    QStringList pathList = userHome.split(UIPathOperations::delimiter, Qt::SkipEmptyParts);
     608#else
    606609    QStringList pathList = userHome.split(UIPathOperations::delimiter, QString::SkipEmptyParts);
     610#endif
    607611    goIntoDirectory(UIPathOperations::pathTrail(userHome));
    608612}
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp

    r93115 r93982  
    8383
    8484        /* Parse buffer contents to dictionary: */
     85#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     86        const QStringList dictionary(QString(receivedData).split("\n", Qt::SkipEmptyParts));
     87#else
    8588        const QStringList dictionary(QString(receivedData).split("\n", QString::SkipEmptyParts));
     89#endif
    8690        /* Make sure it's not empty: */
    8791        if (dictionary.isEmpty())
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp

    r93115 r93982  
    8282
    8383        /* Parse buffer contents to dictionary: */
     84#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     85        const QStringList dictionary(QString(receivedData).split("\n", Qt::SkipEmptyParts));
     86#else
    8487        const QStringList dictionary(QString(receivedData).split("\n", QString::SkipEmptyParts));
     88#endif
    8589        /* Make sure it's not empty: */
    8690        if (dictionary.isEmpty())
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.cpp

    r93115 r93982  
    483483            /* Parse header contents: */
    484484            const QString strHeaders = QString(m_reply);
     485#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     486            const QStringList headers = strHeaders.split("\n", Qt::SkipEmptyParts);
     487#else
    485488            const QStringList headers = strHeaders.split("\n", QString::SkipEmptyParts);
     489#endif
    486490            foreach (const QString &strHeader, headers)
    487491            {
     492#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     493                const QStringList values = strHeader.split(": ", Qt::SkipEmptyParts);
     494#else
    488495                const QStringList values = strHeader.split(": ", QString::SkipEmptyParts);
     496#endif
    489497                if (values.size() > 1)
    490498                    m_headers[values.at(0)] = values.at(1);
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp

    r93115 r93982  
    105105    if (strResponseData.indexOf(QRegExp("^\\d+\\.\\d+\\.\\d+(_[0-9A-Z]+)? \\S+$")) == 0)
    106106    {
     107#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     108        const QStringList response = strResponseData.split(" ", Qt::SkipEmptyParts);
     109#else
    107110        const QStringList response = strResponseData.split(" ", QString::SkipEmptyParts);
     111#endif
    108112        UINotificationMessage::showUpdateSuccess(response[0], response[1]);
    109113    }
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateDefs.cpp

    r93115 r93982  
    177177    else
    178178    {
     179#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     180        QStringList parser(m_strData.split(", ", Qt::SkipEmptyParts));
     181#else
    179182        QStringList parser(m_strData.split(", ", QString::SkipEmptyParts));
     183#endif
    180184
    181185        /* Parse 'period' value: */
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/XKeyboard-new.cpp

    r93115 r93982  
    204204    if (remapScancodes != QString())
    205205    {
     206#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     207        QStringList tuples = remapScancodes.split(",", Qt::SkipEmptyParts);
     208#else
    206209        QStringList tuples = remapScancodes.split(",", QString::SkipEmptyParts);
     210#endif
    207211        scancodes = scancodesTail = new int [tuples.size()+1][2];
    208212        for (int i = 0; i < tuples.size(); ++i)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp

    r93115 r93982  
    236236        {
    237237            QString strData = QString(reinterpret_cast<const char*>(vecData.constData()));
     238#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     239            QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts);
     240#else
    238241            QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, QString::SkipEmptyParts);
     242#endif
    239243
    240244            QVariantList lstVariant;
     
    255259        {
    256260            QString strData = QString(reinterpret_cast<const char*>(vecData.constData()));
     261#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     262            QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts);
     263#else
    257264            QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, QString::SkipEmptyParts);
     265#endif
    258266
    259267            LogFlowFunc(("\tStringList has %d entries\n", lstString.size()));
    260 # ifdef DEBUG
     268#ifdef DEBUG
    261269            Q_FOREACH(const QString& strCur, lstString)
    262270                LogFlowFunc(("\t\tString: %s\n", qPrintable(strCur)));
    263 # endif
     271#endif
    264272            vaData = QVariant::fromValue(lstString);
    265273            Assert(vaData.type() == QVariant::StringList);
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r93115 r93982  
    20642064             /* Some captions are multi line using \n as separator: */
    20652065             QStringList strList;
     2066#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     2067             strList << strTopleftString.split("\n", Qt::SkipEmptyParts)
     2068                     << strShiftAltGrCaption.split("\n", Qt::SkipEmptyParts);
     2069#else
    20662070             strList << strTopleftString.split("\n", QString::SkipEmptyParts)
    20672071                     << strShiftAltGrCaption.split("\n", QString::SkipEmptyParts);
     2072#endif
    20682073             foreach (const QString &strPart, strList)
    20692074                 iTopWidth = qMax(iTopWidth, fontMetrics.width(strPart));
    20702075             strList.clear();
     2076#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     2077             strList << strBottomleftString.split("\n", Qt::SkipEmptyParts)
     2078                     << strAltGrCaption.split("\n", Qt::SkipEmptyParts);
     2079#else
    20712080             strList << strBottomleftString.split("\n", QString::SkipEmptyParts)
    20722081                     << strAltGrCaption.split("\n", QString::SkipEmptyParts);
     2082#endif
    20732083
    20742084             int iBottomWidth = 0;
     
    33503360            QString strCode = m_xmlReader.readElementText();
    33513361            QStringList strList;
     3362#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     3363            strList << strCode.split('-', Qt::SkipEmptyParts);
     3364#else
    33523365            strList << strCode.split('-', QString::SkipEmptyParts);
     3366#endif
    33533367            foreach (const QString &strPrefix, strList)
    33543368            {
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp

    r93115 r93982  
    525525
    526526    /* Split details into paragraphs: */
     527#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     528    QStringList aParagraphs(m_strDetails.split("<!--EOP-->", Qt::SkipEmptyParts));
     529#else
    527530    QStringList aParagraphs(m_strDetails.split("<!--EOP-->", QString::SkipEmptyParts));
     531#endif
    528532    /* Make sure details-text has at least one paragraph: */
    529533    AssertReturnVoid(!aParagraphs.isEmpty());
     
    533537    {
    534538        /* Split each paragraph into pairs: */
     539#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     540        QStringList aParts(strParagraph.split("<!--EOM-->", Qt::KeepEmptyParts));
     541#else
    535542        QStringList aParts(strParagraph.split("<!--EOM-->", QString::KeepEmptyParts));
     543#endif
    536544        /* Make sure each paragraph consist of 2 parts: */
    537545        AssertReturnVoid(aParts.size() == 2);
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