Changeset 93983 in vbox
- Timestamp:
- Feb 28, 2022 2:37:43 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/UIMonitorCommon.cpp
r93115 r93983 93 93 while (xmlReader.readNextStartElement()) 94 94 { 95 if (xmlReader.name() == "Counter")95 if (xmlReader.name() == QLatin1String("Counter")) 96 96 { 97 97 QXmlStreamAttributes attributes = xmlReader.attributes(); … … 99 99 xmlData.push_back(UIDebuggerMetricData(attributes.value("name"), iCounter)); 100 100 } 101 else if (xmlReader.name() == "U64")101 else if (xmlReader.name() == QLatin1String("U64")) 102 102 { 103 103 QXmlStreamAttributes attributes = xmlReader.attributes(); -
trunk/src/VBox/Frontends/VirtualBox/src/activity/UIMonitorCommon.h
r93115 r93983 27 27 UIDebuggerMetricData() 28 28 : m_counter(0){} 29 UIDebuggerMetricData(const QStringRef & strName, quint64 counter) 29 #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) 30 UIDebuggerMetricData(const QStringView &strName, quint64 counter) 31 #else 32 UIDebuggerMetricData(const QStringRef &strName, quint64 counter) 33 #endif 30 34 : m_strName(strName.toString()) 31 35 , m_counter(counter){} -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r93982 r93983 1279 1279 1280 1280 /* Get the name of the current element: */ 1281 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 1282 const QStringView strElementName = stream.name(); 1283 #else 1281 1284 const QStringRef strElementName = stream.name(); 1285 #endif 1282 1286 1283 1287 /* Search for the scope ID: */ 1284 1288 QUuid uLoadingID; 1285 if (strElementName == "Global")1289 if (strElementName == QLatin1String("Global")) 1286 1290 uLoadingID = UIExtraDataManager::GlobalID; 1287 else if (strElementName == "Machine")1291 else if (strElementName == QLatin1String("Machine")) 1288 1292 { 1289 1293 const QXmlStreamAttributes attributes = stream.attributes(); … … 1291 1295 { 1292 1296 const QString strUuid = attributes.value("uuid").toString(); 1293 const QUuid uLoadingID = strUuid;1297 const QUuid uLoadingID(strUuid); 1294 1298 if (uLoadingID.isNull()) 1295 1299 msgCenter().alert(this, MessageType_Warning, … … 1299 1303 } 1300 1304 /* Look particular extra-data entries: */ 1301 else if (strElementName == "ExtraDataItem")1305 else if (strElementName == QLatin1String("ExtraDataItem")) 1302 1306 { 1303 1307 const QXmlStreamAttributes attributes = stream.attributes(); -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r93982 r93983 3286 3286 m_xmlReader.setDevice(&xmlFile); 3287 3287 3288 if (!m_xmlReader.readNextStartElement() || m_xmlReader.name() != "physicallayout")3288 if (!m_xmlReader.readNextStartElement() || m_xmlReader.name() != QLatin1String("physicallayout")) 3289 3289 return false; 3290 3290 physicalLayout.setFileName(strFileName); … … 3298 3298 while (m_xmlReader.readNextStartElement()) 3299 3299 { 3300 if (m_xmlReader.name() == "row")3300 if (m_xmlReader.name() == QLatin1String("row")) 3301 3301 parseRow(iDefaultWidth, iDefaultHeight, rows); 3302 else if (m_xmlReader.name() == "name")3302 else if (m_xmlReader.name() == QLatin1String("name")) 3303 3303 physicalLayout.setName(m_xmlReader.readElementText()); 3304 else if (m_xmlReader.name() == "id")3304 else if (m_xmlReader.name() == QLatin1String("id")) 3305 3305 physicalLayout.setUid(m_xmlReader.readElementText()); 3306 3306 else … … 3328 3328 while (m_xmlReader.readNextStartElement()) 3329 3329 { 3330 if (m_xmlReader.name() == "key")3330 if (m_xmlReader.name() == QLatin1String("key")) 3331 3331 parseKey(row); 3332 else if (m_xmlReader.name() == "space")3332 else if (m_xmlReader.name() == QLatin1String("space")) 3333 3333 parseKeySpace(row); 3334 3334 else … … 3346 3346 while (m_xmlReader.readNextStartElement()) 3347 3347 { 3348 if (m_xmlReader.name() == "width")3348 if (m_xmlReader.name() == QLatin1String("width")) 3349 3349 key.setWidth(m_xmlReader.readElementText().toInt()); 3350 else if (m_xmlReader.name() == "height")3350 else if (m_xmlReader.name() == QLatin1String("height")) 3351 3351 key.setHeight(m_xmlReader.readElementText().toInt()); 3352 else if (m_xmlReader.name() == "scancode")3352 else if (m_xmlReader.name() == QLatin1String("scancode")) 3353 3353 { 3354 3354 QString strCode = m_xmlReader.readElementText(); … … 3356 3356 key.setScanCode(strCode.toInt(&fOk, 16)); 3357 3357 } 3358 else if (m_xmlReader.name() == "scancodeprefix")3358 else if (m_xmlReader.name() == QLatin1String("scancodeprefix")) 3359 3359 { 3360 3360 QString strCode = m_xmlReader.readElementText(); … … 3373 3373 } 3374 3374 } 3375 else if (m_xmlReader.name() == "usageid")3375 else if (m_xmlReader.name() == QLatin1String("usageid")) 3376 3376 { 3377 3377 QString strCode = m_xmlReader.readElementText(); … … 3379 3379 key.setUsageId(strCode.toInt(&fOk, 16)); 3380 3380 } 3381 else if (m_xmlReader.name() == "usagepage")3381 else if (m_xmlReader.name() == QLatin1String("usagepage")) 3382 3382 { 3383 3383 QString strCode = m_xmlReader.readElementText(); … … 3385 3385 key.setUsagePage(strCode.toInt(&fOk, 16)); 3386 3386 } 3387 else if (m_xmlReader.name() == "cutout")3387 else if (m_xmlReader.name() == QLatin1String("cutout")) 3388 3388 parseCutout(key); 3389 else if (m_xmlReader.name() == "position")3389 else if (m_xmlReader.name() == QLatin1String("position")) 3390 3390 key.setPosition(m_xmlReader.readElementText().toInt()); 3391 else if (m_xmlReader.name() == "type")3391 else if (m_xmlReader.name() == QLatin1String("type")) 3392 3392 { 3393 3393 QString strType = m_xmlReader.readElementText(); … … 3397 3397 key.setType(KeyType_Lock); 3398 3398 } 3399 else if (m_xmlReader.name() == "osmenukey")3399 else if (m_xmlReader.name() == QLatin1String("osmenukey")) 3400 3400 { 3401 3401 if (m_xmlReader.readElementText() == "true") 3402 3402 key.setIsOSMenuKey(true); 3403 3403 } 3404 else if (m_xmlReader.name() == "staticcaption")3404 else if (m_xmlReader.name() == QLatin1String("staticcaption")) 3405 3405 key.setStaticCaption(m_xmlReader.readElementText()); 3406 3406 else … … 3415 3415 while (m_xmlReader.readNextStartElement()) 3416 3416 { 3417 if (m_xmlReader.name() == "width")3417 if (m_xmlReader.name() == QLatin1String("width")) 3418 3418 iWidth = m_xmlReader.readElementText().toInt(); 3419 else if (m_xmlReader.name() == "height")3419 else if (m_xmlReader.name() == QLatin1String("height")) 3420 3420 iHeight = m_xmlReader.readElementText().toInt(); 3421 3421 else … … 3438 3438 while (m_xmlReader.readNextStartElement()) 3439 3439 { 3440 if (m_xmlReader.name() == "width")3440 if (m_xmlReader.name() == QLatin1String("width")) 3441 3441 iWidth = m_xmlReader.readElementText().toInt(); 3442 else if (m_xmlReader.name() == "height")3442 else if (m_xmlReader.name() == QLatin1String("height")) 3443 3443 iHeight = m_xmlReader.readElementText().toInt(); 3444 else if (m_xmlReader.name() == "corner")3444 else if (m_xmlReader.name() == QLatin1String("corner")) 3445 3445 { 3446 3446 QString strCorner = m_xmlReader.readElementText(); … … 3512 3512 3513 3513 /********************************************************************************************************************************* 3514 * UIKeyboardLayoutReader implementation. *3514 * UIKeyboardLayoutReader implementation. * 3515 3515 *********************************************************************************************************************************/ 3516 3516 … … 3529 3529 m_xmlReader.setDevice(&xmlFile); 3530 3530 3531 if (!m_xmlReader.readNextStartElement() || m_xmlReader.name() != "layout")3531 if (!m_xmlReader.readNextStartElement() || m_xmlReader.name() != QLatin1String("layout")) 3532 3532 return false; 3533 3533 3534 3534 while (m_xmlReader.readNextStartElement()) 3535 3535 { 3536 if (m_xmlReader.name() == "key")3536 if (m_xmlReader.name() == QLatin1String("key")) 3537 3537 parseKey(layout); 3538 else if (m_xmlReader.name() == "name")3538 else if (m_xmlReader.name() == QLatin1String("name")) 3539 3539 layout.setName(m_xmlReader.readElementText()); 3540 else if (m_xmlReader.name() == "nativename")3540 else if (m_xmlReader.name() == QLatin1String("nativename")) 3541 3541 layout.setNativeName(m_xmlReader.readElementText()); 3542 else if (m_xmlReader.name() == "physicallayoutid")3542 else if (m_xmlReader.name() == QLatin1String("physicallayoutid")) 3543 3543 layout.setPhysicalLayoutUuid(QUuid(m_xmlReader.readElementText())); 3544 else if (m_xmlReader.name() == "id")3544 else if (m_xmlReader.name() == QLatin1String("id")) 3545 3545 layout.setUid(QUuid(m_xmlReader.readElementText())); 3546 3546 else … … 3556 3556 while (m_xmlReader.readNextStartElement()) 3557 3557 { 3558 if (m_xmlReader.name() == "basecaption")3558 if (m_xmlReader.name() == QLatin1String("basecaption")) 3559 3559 { 3560 3560 keyCaptions.m_strBase = m_xmlReader.readElementText(); 3561 3561 keyCaptions.m_strBase.replace("\\n", "\n"); 3562 3562 } 3563 else if (m_xmlReader.name() == "shiftcaption")3563 else if (m_xmlReader.name() == QLatin1String("shiftcaption")) 3564 3564 { 3565 3565 keyCaptions.m_strShift = m_xmlReader.readElementText(); 3566 3566 keyCaptions.m_strShift.replace("\\n", "\n"); 3567 3567 } 3568 else if (m_xmlReader.name() == "altgrcaption")3568 else if (m_xmlReader.name() == QLatin1String("altgrcaption")) 3569 3569 { 3570 3570 keyCaptions.m_strAltGr = m_xmlReader.readElementText(); 3571 3571 keyCaptions.m_strAltGr.replace("\\n", "\n"); 3572 3572 } 3573 else if (m_xmlReader.name() == "shiftaltgrcaption")3573 else if (m_xmlReader.name() == QLatin1String("shiftaltgrcaption")) 3574 3574 { 3575 3575 keyCaptions.m_strShiftAltGr = m_xmlReader.readElementText(); 3576 3576 keyCaptions.m_strShiftAltGr.replace("\\n", "\n"); 3577 3577 } 3578 else if (m_xmlReader.name() == "position")3578 else if (m_xmlReader.name() == QLatin1String("position")) 3579 3579 iKeyPosition = m_xmlReader.readElementText().toInt(); 3580 3580 else … … 3586 3586 3587 3587 /********************************************************************************************************************************* 3588 * UISoftKeyboardStatusBarWidget implementation.*3588 * UISoftKeyboardStatusBarWidget implementation. * 3589 3589 *********************************************************************************************************************************/ 3590 3590
Note:
See TracChangeset
for help on using the changeset viewer.