Changeset 104586 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 13, 2024 12:12:44 PM (11 months ago)
- svn:sync-xref-src-repo-rev:
- 163127
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.cpp
r104393 r104586 1069 1069 { 1070 1070 /* Parse definition: */ 1071 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)1072 1071 const QStringList parts = strDefinition.split('/', Qt::SkipEmptyParts); 1073 #else1074 const QStringList parts = strDefinition.split('/', QString::SkipEmptyParts);1075 #endif1076 1072 /* Depending on parts amount: */ 1077 1073 switch (parts.size()) -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r104358 r104586 85 85 86 86 /* Split details into paragraphs: */ 87 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)88 87 QStringList paragraphs(strText.split("<!--EOP-->", Qt::SkipEmptyParts)); 89 #else90 QStringList paragraphs(strText.split("<!--EOP-->", QString::SkipEmptyParts));91 #endif92 88 /* Make sure details-text has at least one paragraph: */ 93 89 AssertReturnVoid(!paragraphs.isEmpty()); … … 98 94 { 99 95 /* Split each paragraph into pairs: */ 100 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)101 96 QStringList parts(strParagraph.split("<!--EOM-->", Qt::KeepEmptyParts)); 102 #else103 QStringList parts(strParagraph.split("<!--EOM-->", QString::KeepEmptyParts));104 #endif105 97 /* Make sure each paragraph consist of 2 parts: */ 106 98 AssertReturnVoid(parts.size() == 2); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r104585 r104586 2195 2195 /* Few old extra-data string-lists were separated with 'semicolon' symbol. 2196 2196 * All new separated by 'comma'. We have to take that into account. */ 2197 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)2198 2197 return strValue.split(QRegularExpression("[;,]"), Qt::SkipEmptyParts); 2199 #else2200 return strValue.split(QRegularExpression("[;,]"), QString::SkipEmptyParts);2201 #endif2202 2198 } 2203 2199 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPathOperations.cpp
r102378 r104586 144 144 /* static */ QStringList UIPathOperations::pathTrail(const QString &path) 145 145 { 146 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)147 146 return path.split(UIPathOperations::delimiter, Qt::SkipEmptyParts); 148 #else149 return path.split(UIPathOperations::delimiter, QString::SkipEmptyParts);150 #endif151 147 } 152 148 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r104393 r104586 643 643 return; 644 644 645 QString userHome = UIPathOperations::sanitize(m_comGuestSession.GetUserHome());645 const QString strUserHome = UIPathOperations::sanitize(m_comGuestSession.GetUserHome()); 646 646 if (!m_comGuestSession.isOk()) 647 647 { … … 649 649 return; 650 650 } 651 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 652 QStringList pathList = userHome.split(UIPathOperations::delimiter, Qt::SkipEmptyParts); 653 #else 654 QStringList pathList = userHome.split(UIPathOperations::delimiter, QString::SkipEmptyParts); 655 #endif 656 goIntoDirectory(UIPathOperations::pathTrail(userHome)); 651 goIntoDirectory(UIPathOperations::pathTrail(strUserHome)); 657 652 } 658 653 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r104393 r104586 885 885 QString strFileContent = stream.readAll(); 886 886 strFileContent.replace(' ', '\n'); 887 QStringList list;888 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)889 list = strFileContent.split("\n", Qt::SkipEmptyParts);890 #else891 list = strFileContent.split("\n", QString::SkipEmptyParts);892 #endif893 887 QMap<QString, QString> fileEntries; 894 888 QStringList removedEntries; 895 foreach (const QString &strPart, list) 896 { 897 QStringList fileEntry; 898 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 899 fileEntry = strPart.split("=", Qt::SkipEmptyParts); 900 #else 901 fileEntry = strPart.split("=", QString::SkipEmptyParts); 902 #endif 889 foreach (const QString &strPart, strFileContent.split("\n", Qt::SkipEmptyParts)) 890 { 891 const QStringList fileEntry = strPart.split("=", Qt::SkipEmptyParts); 903 892 /* We currently do not support different on-ISO names for different namespaces. */ 904 893 if (strPart.startsWith("/") && strPart.count('=') <= 1) -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp
r103793 r104586 94 94 95 95 /* Parse buffer contents to dictionary: */ 96 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)97 96 const QStringList dictionary(QString(receivedData).split("\n", Qt::SkipEmptyParts)); 98 #else99 const QStringList dictionary(QString(receivedData).split("\n", QString::SkipEmptyParts));100 #endif101 97 /* Make sure it's not empty: */ 102 98 if (dictionary.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp
r103793 r104586 93 93 94 94 /* Parse buffer contents to dictionary: */ 95 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)96 95 const QStringList dictionary(QString(receivedData).split("\n", Qt::SkipEmptyParts)); 97 #else98 const QStringList dictionary(QString(receivedData).split("\n", QString::SkipEmptyParts));99 #endif100 96 /* Make sure it's not empty: */ 101 97 if (dictionary.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.cpp
r103988 r104586 491 491 /* Parse header contents: */ 492 492 const QString strHeaders = QString(m_reply); 493 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 494 const QStringList headers = strHeaders.split("\n", Qt::SkipEmptyParts); 495 #else 496 const QStringList headers = strHeaders.split("\n", QString::SkipEmptyParts); 497 #endif 498 foreach (const QString &strHeader, headers) 493 foreach (const QString &strHeader, strHeaders.split("\n", Qt::SkipEmptyParts)) 499 494 { 500 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)501 495 const QStringList values = strHeader.split(": ", Qt::SkipEmptyParts); 502 #else503 const QStringList values = strHeader.split(": ", QString::SkipEmptyParts);504 #endif505 496 if (values.size() > 1) 506 497 m_headers[values.at(0)] = values.at(1); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp
r103793 r104586 117 117 if (strResponseData.indexOf(QRegularExpression("^\\d+\\.\\d+\\.\\d+(_[0-9A-Z]+)? \\S+$")) == 0) 118 118 { 119 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)120 119 const QStringList response = strResponseData.split(" ", Qt::SkipEmptyParts); 121 #else122 const QStringList response = strResponseData.split(" ", QString::SkipEmptyParts);123 #endif124 120 UINotificationMessage::showUpdateSuccess(response[0], response[1]); 125 121 } -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateDefs.cpp
r103793 r104586 93 93 m_fCheckEnabled = true; 94 94 95 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 95 /* Parse the data we have: */ 96 96 const QStringList parser = m_strData.split(", ", Qt::SkipEmptyParts); 97 #else98 const QStringList parser = m_strData.split(", ", QString::SkipEmptyParts);99 #endif100 97 101 98 /* Parse 'period' value: */ -
trunk/src/VBox/Frontends/VirtualBox/src/platform/nix/XKeyboard-new.cpp
r103538 r104586 208 208 if (remapScancodes != QString()) 209 209 { 210 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 211 QStringList tuples = remapScancodes.split(",", Qt::SkipEmptyParts); 212 #else 213 QStringList tuples = remapScancodes.split(",", QString::SkipEmptyParts); 214 #endif 210 const QStringList tuples = remapScancodes.split(",", Qt::SkipEmptyParts); 215 211 scancodes = scancodesTail = new int [tuples.size()+1][2]; 216 212 for (int i = 0; i < tuples.size(); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
r103496 r104586 249 249 case QMetaType::QVariantList: /* Used on OS X for representing URI lists. */ 250 250 { 251 QString strData = QString(reinterpret_cast<const char*>(vecData.constData())); 252 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 253 QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts); 254 #else 255 QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, QString::SkipEmptyParts); 256 #endif 251 const QString strData = QString(reinterpret_cast<const char*>(vecData.constData())); 257 252 258 253 QVariantList lstVariant; 259 254 260 Q_FOREACH(const QString& strCur, lstString)255 Q_FOREACH(const QString& strCur, strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts)) 261 256 { 262 257 QVariant vaURL = QVariant::fromValue(QUrl(strCur)); … … 272 267 case QMetaType::QStringList: 273 268 { 274 QString strData = QString(reinterpret_cast<const char*>(vecData.constData())); 275 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 276 QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts); 277 #else 278 QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, QString::SkipEmptyParts); 279 #endif 269 const QString strData = QString(reinterpret_cast<const char*>(vecData.constData())); 270 const QStringList lstString = strData.split(DND_PATH_SEPARATOR_STR, Qt::SkipEmptyParts); 280 271 281 272 LogFlowFunc(("\tStringList has %d entries\n", lstString.size())); -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r104585 r104586 2113 2113 /* Some captions are multi line using \n as separator: */ 2114 2114 QStringList strList; 2115 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)2116 2115 strList << strTopleftString.split("\n", Qt::SkipEmptyParts) 2117 2116 << strShiftAltGrCaption.split("\n", Qt::SkipEmptyParts); 2118 #else2119 strList << strTopleftString.split("\n", QString::SkipEmptyParts)2120 << strShiftAltGrCaption.split("\n", QString::SkipEmptyParts);2121 #endif2122 2117 foreach (const QString &strPart, strList) 2123 2118 iTopWidth = qMax(iTopWidth, fontMetrics.horizontalAdvance(strPart)); 2124 2119 strList.clear(); 2125 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)2126 2120 strList << strBottomleftString.split("\n", Qt::SkipEmptyParts) 2127 2121 << strAltGrCaption.split("\n", Qt::SkipEmptyParts); 2128 #else2129 strList << strBottomleftString.split("\n", QString::SkipEmptyParts)2130 << strAltGrCaption.split("\n", QString::SkipEmptyParts);2131 #endif2132 2122 2133 2123 int iBottomWidth = 0; … … 3463 3453 else if (m_xmlReader.name() == QLatin1String("scancodeprefix")) 3464 3454 { 3465 QString strCode = m_xmlReader.readElementText(); 3466 QStringList strList; 3467 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 3468 strList << strCode.split('-', Qt::SkipEmptyParts); 3469 #else 3470 strList << strCode.split('-', QString::SkipEmptyParts); 3471 #endif 3472 foreach (const QString &strPrefix, strList) 3455 const QString strCode = m_xmlReader.readElementText(); 3456 foreach (const QString &strPrefix, strCode.split('-', Qt::SkipEmptyParts)) 3473 3457 { 3474 3458 bool fOk = false; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
r104358 r104586 540 540 541 541 /* Split details into paragraphs: */ 542 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 543 QStringList aParagraphs(m_strDetails.split("<!--EOP-->", Qt::SkipEmptyParts)); 544 #else 545 QStringList aParagraphs(m_strDetails.split("<!--EOP-->", QString::SkipEmptyParts)); 546 #endif 542 const QStringList aParagraphs(m_strDetails.split("<!--EOP-->", Qt::SkipEmptyParts)); 547 543 /* Make sure details-text has at least one paragraph: */ 548 544 AssertReturnVoid(!aParagraphs.isEmpty()); … … 552 548 { 553 549 /* Split each paragraph into pairs: */ 554 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 555 QStringList aParts(strParagraph.split("<!--EOM-->", Qt::KeepEmptyParts)); 556 #else 557 QStringList aParts(strParagraph.split("<!--EOM-->", QString::KeepEmptyParts)); 558 #endif 550 const QStringList aParts(strParagraph.split("<!--EOM-->", Qt::KeepEmptyParts)); 559 551 /* Make sure each paragraph consist of 2 parts: */ 560 552 AssertReturnVoid(aParts.size() == 2);
Note:
See TracChangeset
for help on using the changeset viewer.