Changeset 93996 in vbox
- Timestamp:
- Feb 28, 2022 10:04:49 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/consolemanager/UICloudConsoleManager.cpp
r93990 r93996 23 23 #include <QLineEdit> 24 24 #include <QPushButton> 25 #include <QRegularExpression> 25 26 #include <QUuid> 26 27 #include <QVBoxLayout> … … 551 552 if (pDialog->exec() == QDialog::Accepted) 552 553 { 553 strId = QUuid::createUuid().toString().remove(QReg Exp("[{}]"));554 strId = QUuid::createUuid().toString().remove(QRegularExpression("[{}]")); 554 555 strApplicationName = pDialog->name(); 555 556 strApplicationPath = pDialog->path(); … … 629 630 if (pDialog->exec() == QDialog::Accepted) 630 631 { 631 strId = QUuid::createUuid().toString().remove(QReg Exp("[{}]"));632 strId = QUuid::createUuid().toString().remove(QRegularExpression("[{}]")); 632 633 strProfileName = pDialog->name(); 633 634 strProfileArgument = pDialog->argument(); -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r93988 r93996 19 19 #include <QApplication> 20 20 #include <QHash> 21 #include <QRegExp> 21 22 #include <QRegularExpression> 22 23 -
trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp
r93990 r93996 132 132 133 133 /* Version, Revision, Edition: */ 134 const QString strVersion(m_strVersion.section(QReg Exp("[-_]"), 0, 0));134 const QString strVersion(m_strVersion.section(QRegularExpression("[-_]"), 0, 0)); 135 135 // WORKAROUND: 136 136 // for http://qt.gitorious.org/qt/qt/commit/7fc63dd0ff368a637dcd17e692b9d6b26278b538 137 137 QString strAppend; 138 if (m_strVersion.contains(QReg Exp("[-_]")))139 strAppend = m_strVersion.section(QReg Exp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep);138 if (m_strVersion.contains(QRegularExpression("[-_]"))) 139 strAppend = m_strVersion.section(QRegularExpression("[-_]"), 1, -1, QString::SectionIncludeLeadingSep); 140 140 setText(ExtensionPackColumn_Version, QString("%1r%2%3").arg(strVersion).arg(m_uRevision).arg(strAppend)); 141 141 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp
r93115 r93996 40 40 41 41 /* static */ 42 const QReg Exp QILabel::s_regExpCopy = QRegExp("<[^>]*>");42 const QRegularExpression QILabel::s_regExpCopy = QRegularExpression("<[^>]*>"); 43 43 QRegExp QILabel::s_regExpElide = QRegExp("(<compact\\s+elipsis=\"(start|middle|end)\"?>([^<]*)</compact>)"); 44 44 … … 310 310 QFontMetrics fm = fontMetrics(); 311 311 /* Split up any multi-line text: */ 312 foreach (QString strLine, strText.split(QReg Exp("<br */?>")))312 foreach (QString strLine, strText.split(QRegularExpression("<br */?>"))) 313 313 { 314 314 /* Search for the compact tag: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.h
r93115 r93996 28 28 /* Qt includes: */ 29 29 #include <QLabel> 30 #include <QRegularExpression> 31 #include <QRegExp> 30 32 31 33 /* GUI includes: */ … … 128 130 129 131 /** Holds text-copy reg-exp. */ 130 static const QReg Exps_regExpCopy;132 static const QRegularExpression s_regExpCopy; 131 133 /** Holds text-elide reg-exp. */ 132 static QRegExp s_regExpElide;134 static QRegExp s_regExpElide; 133 135 }; 134 136 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r93982 r93996 23 23 #include <QMimeData> 24 24 #include <QPushButton> 25 #include <QRegExp> 26 #include <QRegularExpression> 25 27 #include <QStyle> 26 28 #include <QVBoxLayout> … … 164 166 strError += pair.first + pair.second + "<br>"; 165 167 strError += "</body></html>"; 166 strError.remove(QReg Exp("</+qt>"));167 strError = strError.replace(QReg Exp(" "), " ");168 strError.remove(QRegularExpression("</+qt>")); 169 strError = strError.replace(QRegularExpression(" "), " "); 168 170 /* Create a new mime data object holding both the html and the plain text version. */ 169 171 QMimeData *pMimeData = new QMimeData(); 170 172 pMimeData->setHtml(strError); 171 173 /* Replace all the html entities. */ 172 strError = strError.replace(QReg Exp("<br>|</tr>"), "\n");173 strError = strError.replace(QReg Exp("</p>"), "\n\n");174 strError = strError.remove(QReg Exp("<[^>]*>"));174 strError = strError.replace(QRegularExpression("<br>|</tr>"), "\n"); 175 strError = strError.replace(QRegularExpression("</p>"), "\n\n"); 176 strError = strError.remove(QRegularExpression("<[^>]*>")); 175 177 pMimeData->setText(strError); 176 178 /* Add the mime data to the global clipboard. */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r93990 r93996 20 20 #include <QMetaEnum> 21 21 #include <QMutex> 22 #include <QRegExp> 22 23 #include <QRegularExpression> 24 #include <QRegularExpressionValidator> 23 25 #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI 24 26 # include <QComboBox> … … 1019 1021 } 1020 1022 /* Create key-editor validator: */ 1021 QObjectValidator *pKeyValidator = new QObjectValidator(new QRegExpValidator(QRegExp("[\\s\\S]+"), this)); 1023 QObjectValidator *pKeyValidator 1024 = new QObjectValidator(new QRegularExpressionValidator(QRegularExpression("[\\s\\S]+"), this)); 1022 1025 AssertPtrReturnVoid(pKeyValidator); 1023 1026 { … … 1053 1056 } 1054 1057 /* Create value-editor validator: */ 1055 QObjectValidator *pValueValidator = new QObjectValidator(new QRegExpValidator(QRegExp("[\\s\\S]+"), this)); 1058 QObjectValidator *pValueValidator 1059 = new QObjectValidator(new QRegularExpressionValidator(QRegularExpression("[\\s\\S]+"), this)); 1056 1060 AssertPtrReturnVoid(pValueValidator); 1057 1061 { … … 2185 2189 * All new separated by 'comma'. We have to take that into account. */ 2186 2190 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 2187 return strValue.split(QReg Exp("[;,]"), Qt::SkipEmptyParts);2191 return strValue.split(QRegularExpression("[;,]"), Qt::SkipEmptyParts); 2188 2192 #else 2189 return strValue.split(QReg Exp("[;,]"), QString::SkipEmptyParts);2193 return strValue.split(QRegularExpression("[;,]"), QString::SkipEmptyParts); 2190 2194 #endif 2191 2195 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r93115 r93996 671 671 /* Gather adapter information: */ 672 672 const KNetworkAttachmentType enmAttachmentType = comAdapter.GetAttachmentType(); 673 const QString strAttachmentTemplate = gpConverter->toString(comAdapter.GetAdapterType()).replace(QRegExp("\\s\\(.+\\)"), " (<a href=#%1,%2;%3;%4>%5</a>)"); 673 const QString strAttachmentTemplate = gpConverter->toString(comAdapter.GetAdapterType()).replace(QRegularExpression("\\s\\(.+\\)"), 674 " (<a href=#%1,%2;%3;%4>%5</a>)"); 674 675 QString strAttachmentType; 675 676 switch (enmAttachmentType) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UITranslator.cpp
r93115 r93996 23 23 # include <QLibraryInfo> 24 24 #endif 25 #include <QRegularExpression> 26 #include <QRegExp> 25 27 26 28 /* GUI includes: */ … … 582 584 } 583 585 586 /* Regular expressions used by both highlight and emphasize. They use the 587 same prefix and suffix expression. Unfortunately, QRegularExpression isn't 588 thread safe, so we only store the string contstants here. */ 589 /** @todo qt6: Both these had bogus suffix sets '[:.-!);]', I've changed them to '[-:.!);]', hope that's correct. */ 590 static char const g_szRxSingleQuotes[] = "((?:^|\\s)[(]?)" 591 "'([^']*)'" 592 "(?=[-:.!);]?(?:\\s|$))"; 593 static const char g_szRxUuid[] = "((?:^|\\s)[(]?)" 594 "(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})" 595 "(?=[-:.!);]?(?:\\s|$))"; 596 584 597 /* static */ 585 598 QString UITranslator::highlight(QString strText, bool fToolTip /* = false */) … … 615 628 616 629 /* Mark strings in single quotes with color: */ 617 QRegExp rx = QRegExp("((?:^|\\s)[(]?)'([^']*)'(?=[:.-!);]?(?:\\s|$))"); 618 rx.setMinimal(true); 619 strText.replace(rx, QString("\\1%1<nobr>'\\2'</nobr>%2").arg(strFont).arg(endFont)); 630 strText.replace(QRegularExpression(g_szRxSingleQuotes), QString("\\1%1<nobr>'\\2'</nobr>%2").arg(strFont).arg(endFont)); 620 631 621 632 /* Mark UUIDs with color: */ 622 strText.replace(QRegExp( 623 "((?:^|\\s)[(]?)" 624 "(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})" 625 "(?=[:.-!);]?(?:\\s|$))"), 626 QString("\\1%1<nobr>\\2</nobr>%2").arg(uuidFont).arg(endFont)); 633 strText.replace(QRegularExpression(g_szRxUuid), QString("\\1%1<nobr>\\2</nobr>%2").arg(uuidFont).arg(endFont)); 627 634 628 635 /* Split to paragraphs at \n chars: */ … … 660 667 661 668 /* Mark strings in single quotes with bold style: */ 662 QRegExp rx = QRegExp("((?:^|\\s)[(]?)'([^']*)'(?=[:.-!);]?(?:\\s|$))"); 663 rx.setMinimal(true); 664 strText.replace(rx, QString("\\1%1<nobr>'\\2'</nobr>%2").arg(strEmphStart).arg(strEmphEnd)); 669 strText.replace(QRegularExpression(g_szRxSingleQuotes), QString("\\1%1<nobr>'\\2'</nobr>%2").arg(strEmphStart).arg(strEmphEnd)); 665 670 666 671 /* Mark UUIDs with italic style: */ 667 strText.replace(QRegExp( 668 "((?:^|\\s)[(]?)" 669 "(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})" 670 "(?=[:.-!);]?(?:\\s|$))"), 671 QString("\\1%1<nobr>\\2</nobr>%2").arg(uuidEmphStart).arg(uuidEmphEnd)); 672 strText.replace(QRegularExpression(g_szRxUuid), QString("\\1%1<nobr>\\2</nobr>%2").arg(uuidEmphStart).arg(uuidEmphEnd)); 672 673 673 674 /* Split to paragraphs at \n chars: */ -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
r93990 r93996 27 27 #include <QLineEdit> 28 28 #include <QPlainTextEdit> 29 #include <QRegularExpression> 29 30 #include <QTextCursor> 30 31 #include <QRadioButton> … … 346 347 iterator != m_filterTermSet.end(); ++iterator) 347 348 { 349 /* Disregard empty and invalid filter terms: */ 348 350 const QString& filterTerm = *iterator; 349 const QRegExp rxFilterExp(filterTerm, Qt::CaseInsensitive); 350 /* Disregard empty and invalid filter terms: */ 351 if (rxFilterExp.isEmpty() || !rxFilterExp.isValid()) 351 if (filterTerm.isEmpty()) 352 continue; 353 const QRegularExpression rxFilterExp(filterTerm, QRegularExpression::CaseInsensitiveOption); 354 if (!rxFilterExp.isValid()) 352 355 continue; 353 356 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r93990 r93996 17 17 18 18 /* Qt includes: */ 19 #include <QRegExp> 20 #include <QRegularExpression> 19 21 #include <QThread> 20 22 … … 542 544 QString UIChooserAbstractModel::toOldStyleUuid(const QUuid &uId) 543 545 { 544 return uId.toString().remove(QReg Exp("[{}]"));546 return uId.toString().remove(QRegularExpression("[{}]")); 545 547 } 546 548 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r93115 r93996 24 24 #include <QLineEdit> 25 25 #include <QPainter> 26 #include <QRegularExpression> 26 27 #include <QStyleOptionGraphicsItem> 27 28 #include <QWindow> … … 983 984 /* We should replace forbidden symbols 984 985 * with ... well, probably underscores: */ 985 strNewName.replace(QReg Exp("[\\\\/:*?\"<>]"), "_");986 strNewName.replace(QRegularExpression("[\\\\/:*?\"<>]"), "_"); 986 987 987 988 /* Set new name, save settings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp
r93115 r93996 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 /* Qt includes: */ 19 #include <qglobal.h> 20 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 21 # include <QRegularExpression> 22 #else 23 # include <QRegExp> 24 #endif 17 25 18 26 /* GUI includes: */ … … 223 231 else 224 232 { 233 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) /* fromWildcard is 6.0+ */ 234 QRegularExpression searchRegEx = QRegularExpression::fromWildcard(strSearchTerm, Qt::CaseInsensitive); 235 #else 225 236 QRegExp searchRegEx(strSearchTerm, Qt::CaseInsensitive, QRegExp::WildcardUnix); 237 #endif 226 238 if (name().contains(searchRegEx)) 227 239 matchedItems << this; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r93115 r93996 23 23 #include <QPropertyAnimation> 24 24 #include <QScrollBar> 25 #include <QRegExp>26 25 #include <QTimer> 27 26 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp
r93982 r93996 19 19 #include <QDir> 20 20 #include <QFile> 21 #include <QRegularExpression> 21 22 #include <QVariant> 22 23 … … 95 96 foreach (const QString &strRecord, dictionary) 96 97 { 97 QReg Expseparator(" \\*| ");98 QRegularExpression separator(" \\*| "); 98 99 const QString strFileName = strRecord.section(separator, 1); 99 100 const QString strDownloadedSumm = strRecord.section(separator, 0, 0); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp
r93982 r93996 19 19 #include <QDir> 20 20 #include <QFile> 21 #include <QRegularExpression> 21 22 #include <QVariant> 22 23 … … 143 144 * of tries to let user choose the place to save file to. */ 144 145 QString strNetTarget = target(); 145 strNetTarget.remove(QReg Exp("\\.tmp$"));146 strNetTarget.remove(QRegularExpression("\\.tmp$")); 146 147 setTarget(strNetTarget); 147 148 while (true) -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.cpp
r93982 r93996 20 20 #include <QFile> 21 21 #include <QThread> 22 #include <QRegExp>23 22 #include <QVector> 24 23 #include <QVariant> -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp
r93982 r93996 17 17 18 18 /* Qt includes: */ 19 #include <QRegularExpression> 19 20 #include <QUrlQuery> 20 21 … … 103 104 #endif 104 105 /* Newer version of necessary package found: */ 105 if (strResponseData.indexOf(QReg Exp("^\\d+\\.\\d+\\.\\d+(_[0-9A-Z]+)? \\S+$")) == 0)106 if (strResponseData.indexOf(QRegularExpression("^\\d+\\.\\d+\\.\\d+(_[0-9A-Z]+)? \\S+$")) == 0) 106 107 { 107 108 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetCloudNetwork.cpp
r93328 r93996 23 23 #include <QPushButton> 24 24 #include <QRadioButton> 25 #include <QRegExpValidator>26 25 #include <QStyleOption> 27 26 #include <QVBoxLayout> -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetHostNetwork.cpp
r93115 r93996 21 21 #include <QPushButton> 22 22 #include <QRadioButton> 23 #include <QRegExpValidator>24 23 #include <QStyleOption> 25 24 #include <QVBoxLayout> -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp
r93871 r93996 20 20 #include <QMenuBar> 21 21 #include <QPushButton> 22 #include <QRegExp> 22 23 #include <QVBoxLayout> 23 24 -
trunk/src/VBox/Frontends/VirtualBox/src/objects/UIRichTextString.cpp
r93115 r93996 19 19 #include <QApplication> 20 20 #include <QPalette> 21 #include <QRegExp> 21 22 22 23 /* GUI includes: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r93890 r93996 22 22 #include <QImageWriter> 23 23 #include <QPainter> 24 #include <QRegExp> 24 25 #include <QTimer> 25 26 #ifdef VBOX_WS_MAC … … 1987 1988 const QString &s = formats.at(i) + " (*." + formats.at(i).toLower() + ")"; 1988 1989 /* Check there isn't an entry already (even if it just uses another capitalization) */ 1989 if (filters.indexOf(QReg Exp(QRegExp::escape(s), Qt::CaseInsensitive)) == -1)1990 if (filters.indexOf(QRegularExpression(QRegularExpression::escape(s), QRegularExpression::CaseInsensitiveOption)) == -1) 1990 1991 filters << s; 1991 1992 } 1992 1993 /* Try to select some common defaults: */ 1993 1994 QString strFilter; 1994 int i = filters.indexOf(QReg Exp(".*png.*", Qt::CaseInsensitive));1995 int i = filters.indexOf(QRegularExpression(".*png.*", QRegularExpression::CaseInsensitiveOption)); 1995 1996 if (i == -1) 1996 1997 { 1997 i = filters.indexOf(QReg Exp(".*jpe+g.*", Qt::CaseInsensitive));1998 i = filters.indexOf(QRegularExpression(".*jpe+g.*", QRegularExpression::CaseInsensitiveOption)); 1998 1999 if (i == -1) 1999 i = filters.indexOf(QReg Exp(".*bmp.*", Qt::CaseInsensitive));2000 i = filters.indexOf(QRegularExpression(".*bmp.*", QRegularExpression::CaseInsensitiveOption)); 2000 2001 } 2001 2002 if (i != -1) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp
r93990 r93996 19 19 #include <QGridLayout> 20 20 #include <QLabel> 21 #include <QRegularExpression> 21 22 #include <QScrollBar> 22 23 … … 404 405 UIBootItemData data; 405 406 data.m_fEnabled = strArgument.startsWith('+'); 406 strArgument.remove(QReg Exp("[+-]"));407 strArgument.remove(QRegularExpression("[+-]")); 407 408 data.m_enmType = static_cast<KDeviceType>(strArgument.toInt()); 408 409 list << data; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UILanguageSettingsEditor.cpp
r93938 r93996 20 20 #include <QHeaderView> 21 21 #include <QPainter> 22 #include <QRegExp> 22 23 #include <QTranslator> 23 24 #include <QVBoxLayout> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r93822 r93996 20 20 #include <QGridLayout> 21 21 #include <QLabel> 22 #include <QRegularExpressionValidator> 22 23 #include <QVBoxLayout> 23 24 … … 267 268 if (!m_pNameLineEdit) 268 269 return; 269 m_pNameLineEdit->setValidator(new QReg ExpValidator(QRegExp(strValidator), this));270 m_pNameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression(strValidator), this)); 270 271 } 271 272 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
r93818 r93996 21 21 #include <QLabel> 22 22 #include <QRadioButton> 23 #include <QReg ExpValidator>23 #include <QRegularExpressionValidator> 24 24 25 25 /* GUI includes: */ … … 305 305 if (m_pLabelHost) 306 306 m_pLabelHost->setBuddy(m_pEditorHost); 307 m_pEditorHost->setValidator(new QReg ExpValidator(QRegExp("\\S+"), m_pEditorHost));307 m_pEditorHost->setValidator(new QRegularExpressionValidator(QRegularExpression("\\S+"), m_pEditorHost)); 308 308 309 309 pLayoutSettings->addWidget(m_pEditorHost); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r93829 r93996 23 23 #include <QLabel> 24 24 #include <QLineEdit> 25 #include <QRegularExpressionValidator> 25 26 #include <QSpinBox> 26 27 #include <QStackedLayout> … … 1278 1279 if (m_pLabelRemoteDisplayPort) 1279 1280 m_pLabelRemoteDisplayPort->setBuddy(m_pEditorRemoteDisplayPort); 1280 m_pEditorRemoteDisplayPort->setValidator(new QReg ExpValidator(1281 QReg Exp("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this));1281 m_pEditorRemoteDisplayPort->setValidator(new QRegularExpressionValidator( 1282 QRegularExpression("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this)); 1282 1283 1283 1284 pLayoutRemoteDisplaySettings->addWidget(m_pEditorRemoteDisplayPort, 0, 1); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r93829 r93996 21 21 #include <QGridLayout> 22 22 #include <QLabel> 23 #include <QRegExp> 24 #include <QRegularExpressionValidator> 23 25 #include <QPushButton> 24 26 #include <QTextEdit> … … 935 937 m_pLabelMAC->setBuddy(m_pEditorMAC); 936 938 m_pEditorMAC->setAllowToCopyContentsWhenDisabled(true); 937 m_pEditorMAC->setValidator(new QReg ExpValidator(QRegExp("[0-9A-Fa-f]{12}"), this));939 m_pEditorMAC->setValidator(new QRegularExpressionValidator(QRegularExpression("[0-9A-Fa-f]{12}"), this)); 938 940 m_pEditorMAC->setMinimumWidthByText(QString().fill('0', 12)); 939 941 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r93990 r93996 19 19 #include <QHeaderView> 20 20 #include <QMenu> 21 #include <QRegExp> 21 22 #include <QTimer> 22 23 #include <QVBoxLayout> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r93829 r93996 23 23 #include <QLabel> 24 24 #include <QLineEdit> 25 #include <QRegularExpressionValidator> 25 26 26 27 /* GUI includes: */ … … 484 485 if (m_pLabelPath) 485 486 m_pLabelPath->setBuddy(m_pEditorPath); 486 m_pEditorPath->setValidator(new QReg ExpValidator(QRegExp(".+"), this));487 m_pEditorPath->setValidator(new QRegularExpressionValidator(QRegularExpression(".+"), this)); 487 488 pLayoutPortSettings->addWidget(m_pEditorPath, 3, 1, 1, 6); 488 489 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r93990 r93996 24 24 #include <QMenu> 25 25 #include <QRadioButton> 26 #include <QRegExp> 26 27 #include <QSpacerItem> 27 28 #include <QToolTip> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp
r93829 r93996 21 21 #include <QLabel> 22 22 #include <QLineEdit> 23 #include <QRegularExpressionValidator> 23 24 24 25 /* GUI includes: */ … … 129 130 if (m_pLabelName) 130 131 m_pLabelName->setBuddy(m_pEditorName); 131 m_pEditorName->setValidator(new QReg ExpValidator(QRegExp(".+"), this));132 m_pEditorName->setValidator(new QRegularExpressionValidator(QRegularExpression(".+"), this)); 132 133 133 134 pLayoutMain->addWidget(m_pEditorName, 0, 1); … … 147 148 if (m_pLabelVendorID) 148 149 m_pLabelVendorID->setBuddy(m_pEditorVendorID); 149 m_pEditorVendorID->setValidator(new QReg ExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));150 m_pEditorVendorID->setValidator(new QRegularExpressionValidator(QRegularExpression("[0-9a-fA-F]{0,4}"), this)); 150 151 151 152 pLayoutMain->addWidget(m_pEditorVendorID, 1, 1); … … 165 166 if (m_pLabelProductID) 166 167 m_pLabelProductID->setBuddy(m_pEditorProductID); 167 m_pEditorProductID->setValidator(new QReg ExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));168 m_pEditorProductID->setValidator(new QRegularExpressionValidator(QRegularExpression("[0-9a-fA-F]{0,4}"), this)); 168 169 169 170 pLayoutMain->addWidget(m_pEditorProductID, 2, 1); … … 183 184 if (m_pLabelRevision) 184 185 m_pLabelRevision->setBuddy(m_pEditorRevision); 185 m_pEditorRevision->setValidator(new QReg ExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this));186 m_pEditorRevision->setValidator(new QRegularExpressionValidator(QRegularExpression("[0-9a-fA-F]{0,4}"), this)); 186 187 187 188 pLayoutMain->addWidget(m_pEditorRevision, 3, 1); … … 249 250 if (m_pLabelPort) 250 251 m_pLabelPort->setBuddy(m_pEditorPort); 251 m_pEditorPort->setValidator(new QReg ExpValidator(QRegExp("[0-9]*"), this));252 m_pEditorPort->setValidator(new QRegularExpressionValidator(QRegularExpression("[0-9]*"), this)); 252 253 253 254 pLayoutMain->addWidget(m_pEditorPort, 7, 1); -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r93990 r93996 25 25 #include <QPainter> 26 26 #include <QPushButton> 27 #include <QRegularExpression> 27 28 #include <QScrollArea> 28 29 #include <QTabWidget> … … 1854 1855 { 1855 1856 /* Use adapter type string as template: */ 1856 QString strInfo = gpConverter->toString(comAdapter.GetAdapterType()).replace(QReg Exp("\\s\\(.+\\)"), " (%1)");1857 QString strInfo = gpConverter->toString(comAdapter.GetAdapterType()).replace(QRegularExpression("\\s\\(.+\\)"), " (%1)"); 1857 1858 /* Don't use the adapter type string for types that have an additional 1858 1859 * symbolic network/interface name field, use this name instead: */ … … 1970 1971 QString UISnapshotDetailsWidget::wipeHtmlStuff(const QString &strString) 1971 1972 { 1972 return QString(strString).remove(QReg Exp("<i>|</i>|<b>|</b>"));1973 return QString(strString).remove(QRegularExpression("<i>|</i>|<b>|</b>")); 1973 1974 } 1974 1975 -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp
r93115 r93996 25 25 #include <QPointer> 26 26 #include <QReadWriteLock> 27 #include <QRegExp> 27 28 #include <QScrollBar> 28 29 #include <QTimer> -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r93990 r93996 23 23 #include <QLabel> 24 24 #include <QLineEdit> 25 #include <QRegExp> 25 26 #include <QSpinBox> 26 27 #include <QTextEdit> -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp
r93115 r93996 247 247 return; 248 248 249 path.remove (QRegExp("[\\\\/]$"));249 path.remove(QRegularExpression("[\\\\/]$")); 250 250 setPath (path); 251 251 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r93115 r93996 27 27 # include <QListView> 28 28 #endif 29 #include <QRegExp> 29 30 30 31 /* GUI includes: */ … … 455 456 456 457 /* Wipe out excessive slashes: */ 457 strSelPath.remove(QReg Exp("[\\\\/]$"));458 strSelPath.remove(QRegularExpression("[\\\\/]$")); 458 459 459 460 /* Apply chosen path: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.cpp
r93115 r93996 19 19 #include <QGridLayout> 20 20 #include <QLabel> 21 #include <QReg ExpValidator>21 #include <QRegularExpressionValidator> 22 22 #include <QSlider> 23 23 … … 189 189 m_pEditor->setFixedWidthByText("88888.88 MB"); 190 190 m_pEditor->setAlignment(Qt::AlignRight); 191 m_pEditor->setValidator(new QReg ExpValidator(QRegExp(UITranslator::sizeRegexp()), this));191 m_pEditor->setValidator(new QRegularExpressionValidator(QRegularExpression(UITranslator::sizeRegexp()), this)); 192 192 connect(m_pEditor, &QILineEdit::textChanged, 193 193 this, &UIMediumSizeEditor::sltSizeEditorTextChanged); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r93990 r93996 24 24 #include <QLineEdit> 25 25 #include <QMenu> 26 #include <QRegExp> 26 27 #include <QSpinBox> 27 28 #include <QStyledItemDelegate> … … 68 69 setFrame(false); 69 70 setAlignment(Qt::AlignLeft | Qt::AlignVCenter); 70 setValidator(new QReg ExpValidator(QRegExp("[^,:]*"), this));71 setValidator(new QRegularExpressionValidator(QRegularExpression("[^,:]*"), this)); 71 72 } 72 73 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsTextPane.cpp
r93990 r93996 23 23 #include <QFontMetrics> 24 24 #include <QGraphicsSceneHoverEvent> 25 #include <QRegularExpression> 25 26 26 27 /* GUI includes: */ … … 153 154 { 154 155 /* Parse the 1st one to sub-lines: */ 155 QStringList subLines = strLeftLine.split(QReg Exp("\\n"));156 QStringList subLines = strLeftLine.split(QRegularExpression("\\n")); 156 157 foreach (const QString &strSubLine, subLines) 157 158 m_text << UITextTableLine(strSubLine, QString(), parentWidget()); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r93643 r93996 19 19 #include <QCheckBox> 20 20 #include <QDir> 21 #include <QRegularExpression> 21 22 #include <QVBoxLayout> 22 23 … … 33 34 #include "CUnattended.h" 34 35 35 36 36 /* Defines some patterns to guess the right OS type. Should be in sync with 37 37 * VirtualBox-settings-common.xsd in Main. The list is sorted by priority. The … … 39 39 struct osTypePattern 40 40 { 41 QReg Exppattern;41 QRegularExpression pattern; 42 42 const char *pcstId; 43 43 }; … … 46 46 { 47 47 /* DOS: */ 48 { QReg Exp("DOS", Qt::CaseInsensitive), "DOS" },48 { QRegularExpression("DOS", QRegularExpression::CaseInsensitiveOption), "DOS" }, 49 49 50 50 /* Windows: */ 51 { QReg Exp( "Wi.*98", Qt::CaseInsensitive), "Windows98" },52 { QReg Exp( "Wi.*95", Qt::CaseInsensitive), "Windows95" },53 { QReg Exp( "Wi.*Me", Qt::CaseInsensitive), "WindowsMe" },54 { QReg Exp( "(Wi.*NT)|(NT[-._v]*4)", Qt::CaseInsensitive), "WindowsNT4" },55 { QReg Exp( "NT[-._v]*3[.,]*[51x]", Qt::CaseInsensitive), "WindowsNT3x" },51 { QRegularExpression( "Wi.*98", QRegularExpression::CaseInsensitiveOption), "Windows98" }, 52 { QRegularExpression( "Wi.*95", QRegularExpression::CaseInsensitiveOption), "Windows95" }, 53 { QRegularExpression( "Wi.*Me", QRegularExpression::CaseInsensitiveOption), "WindowsMe" }, 54 { QRegularExpression( "(Wi.*NT)|(NT[-._v]*4)", QRegularExpression::CaseInsensitiveOption), "WindowsNT4" }, 55 { QRegularExpression( "NT[-._v]*3[.,]*[51x]", QRegularExpression::CaseInsensitiveOption), "WindowsNT3x" }, 56 56 /* Note: Do not automatically set WindowsXP_64 on 64-bit hosts, as Windows XP 64-bit 57 57 * is extremely rare -- most users never heard of it even. So always default to 32-bit. */ 58 { QReg Exp("((Wi.*XP)|(XP)).*", Qt::CaseInsensitive), "WindowsXP" },59 { QReg Exp("((Wi.*2003)|(W2K3)|(Win2K3)).*64", Qt::CaseInsensitive), "Windows2003_64" },60 { QReg Exp("((Wi.*2003)|(W2K3)|(Win2K3)).*32", Qt::CaseInsensitive), "Windows2003" },61 { QReg Exp("((Wi.*Vis)|(Vista)).*64", Qt::CaseInsensitive), "WindowsVista_64" },62 { QReg Exp("((Wi.*Vis)|(Vista)).*32", Qt::CaseInsensitive), "WindowsVista" },63 { QReg Exp( "(Wi.*2016)|(W2K16)|(Win2K16)", Qt::CaseInsensitive), "Windows2016_64" },64 { QReg Exp( "(Wi.*2012)|(W2K12)|(Win2K12)", Qt::CaseInsensitive), "Windows2012_64" },65 { QReg Exp("((Wi.*2008)|(W2K8)|(Win2k8)).*64", Qt::CaseInsensitive), "Windows2008_64" },66 { QReg Exp("((Wi.*2008)|(W2K8)|(Win2K8)).*32", Qt::CaseInsensitive), "Windows2008" },67 { QReg Exp( "(Wi.*2000)|(W2K)|(Win2K)", Qt::CaseInsensitive), "Windows2000" },68 { QReg Exp( "(Wi.*7.*64)|(W7.*64)", Qt::CaseInsensitive), "Windows7_64" },69 { QReg Exp( "(Wi.*7.*32)|(W7.*32)", Qt::CaseInsensitive), "Windows7" },70 { QReg Exp( "(Wi.*8.*1.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows81_64" },71 { QReg Exp( "(Wi.*8.*1.*32)|(W8.*32)", Qt::CaseInsensitive), "Windows81" },72 { QReg Exp( "(Wi.*8.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows8_64" },73 { QReg Exp( "(Wi.*8.*32)|(W8.*32)", Qt::CaseInsensitive), "Windows8" },74 { QReg Exp( "(Wi.*10.*64)|(W10.*64)", Qt::CaseInsensitive), "Windows10_64" },75 { QReg Exp( "(Wi.*10.*32)|(W10.*32)", Qt::CaseInsensitive), "Windows10" },76 { QReg Exp( "(Wi.*11)|(W11)", Qt::CaseInsensitive), "Windows11_64" },77 { QReg Exp( "Wi.*3.*1", Qt::CaseInsensitive), "Windows31" },58 { QRegularExpression("((Wi.*XP)|(XP)).*", QRegularExpression::CaseInsensitiveOption), "WindowsXP" }, 59 { QRegularExpression("((Wi.*2003)|(W2K3)|(Win2K3)).*64", QRegularExpression::CaseInsensitiveOption), "Windows2003_64" }, 60 { QRegularExpression("((Wi.*2003)|(W2K3)|(Win2K3)).*32", QRegularExpression::CaseInsensitiveOption), "Windows2003" }, 61 { QRegularExpression("((Wi.*Vis)|(Vista)).*64", QRegularExpression::CaseInsensitiveOption), "WindowsVista_64" }, 62 { QRegularExpression("((Wi.*Vis)|(Vista)).*32", QRegularExpression::CaseInsensitiveOption), "WindowsVista" }, 63 { QRegularExpression( "(Wi.*2016)|(W2K16)|(Win2K16)", QRegularExpression::CaseInsensitiveOption), "Windows2016_64" }, 64 { QRegularExpression( "(Wi.*2012)|(W2K12)|(Win2K12)", QRegularExpression::CaseInsensitiveOption), "Windows2012_64" }, 65 { QRegularExpression("((Wi.*2008)|(W2K8)|(Win2k8)).*64", QRegularExpression::CaseInsensitiveOption), "Windows2008_64" }, 66 { QRegularExpression("((Wi.*2008)|(W2K8)|(Win2K8)).*32", QRegularExpression::CaseInsensitiveOption), "Windows2008" }, 67 { QRegularExpression( "(Wi.*2000)|(W2K)|(Win2K)", QRegularExpression::CaseInsensitiveOption), "Windows2000" }, 68 { QRegularExpression( "(Wi.*7.*64)|(W7.*64)", QRegularExpression::CaseInsensitiveOption), "Windows7_64" }, 69 { QRegularExpression( "(Wi.*7.*32)|(W7.*32)", QRegularExpression::CaseInsensitiveOption), "Windows7" }, 70 { QRegularExpression( "(Wi.*8.*1.*64)|(W8.*64)", QRegularExpression::CaseInsensitiveOption), "Windows81_64" }, 71 { QRegularExpression( "(Wi.*8.*1.*32)|(W8.*32)", QRegularExpression::CaseInsensitiveOption), "Windows81" }, 72 { QRegularExpression( "(Wi.*8.*64)|(W8.*64)", QRegularExpression::CaseInsensitiveOption), "Windows8_64" }, 73 { QRegularExpression( "(Wi.*8.*32)|(W8.*32)", QRegularExpression::CaseInsensitiveOption), "Windows8" }, 74 { QRegularExpression( "(Wi.*10.*64)|(W10.*64)", QRegularExpression::CaseInsensitiveOption), "Windows10_64" }, 75 { QRegularExpression( "(Wi.*10.*32)|(W10.*32)", QRegularExpression::CaseInsensitiveOption), "Windows10" }, 76 { QRegularExpression( "(Wi.*11)|(W11)", QRegularExpression::CaseInsensitiveOption), "Windows11_64" }, 77 { QRegularExpression( "Wi.*3.*1", QRegularExpression::CaseInsensitiveOption), "Windows31" }, 78 78 /* Set Windows 10 as default for "Windows". */ 79 { QReg Exp( "Wi.*64", Qt::CaseInsensitive), "Windows10_64" },80 { QReg Exp( "Wi.*32", Qt::CaseInsensitive), "Windows10" },79 { QRegularExpression( "Wi.*64", QRegularExpression::CaseInsensitiveOption), "Windows10_64" }, 80 { QRegularExpression( "Wi.*32", QRegularExpression::CaseInsensitiveOption), "Windows10" }, 81 81 /* ReactOS wants to be considered as Windows 2003 */ 82 { QReg Exp( "Reac.*", Qt::CaseInsensitive), "Windows2003" },82 { QRegularExpression( "Reac.*", QRegularExpression::CaseInsensitiveOption), "Windows2003" }, 83 83 84 84 /* Solaris: */ 85 { QReg Exp("Sol.*11", Qt::CaseInsensitive), "Solaris11_64" },86 { QReg Exp("((Op.*Sol)|(os20[01][0-9])|(Sol.*10)|(India)|(Neva)).*64", Qt::CaseInsensitive), "OpenSolaris_64" },87 { QReg Exp("((Op.*Sol)|(os20[01][0-9])|(Sol.*10)|(India)|(Neva)).*32", Qt::CaseInsensitive), "OpenSolaris" },88 { QReg Exp("Sol.*64", Qt::CaseInsensitive), "Solaris_64" },89 { QReg Exp("Sol.*32", Qt::CaseInsensitive), "Solaris" },85 { QRegularExpression("Sol.*11", QRegularExpression::CaseInsensitiveOption), "Solaris11_64" }, 86 { QRegularExpression("((Op.*Sol)|(os20[01][0-9])|(Sol.*10)|(India)|(Neva)).*64", QRegularExpression::CaseInsensitiveOption), "OpenSolaris_64" }, 87 { QRegularExpression("((Op.*Sol)|(os20[01][0-9])|(Sol.*10)|(India)|(Neva)).*32", QRegularExpression::CaseInsensitiveOption), "OpenSolaris" }, 88 { QRegularExpression("Sol.*64", QRegularExpression::CaseInsensitiveOption), "Solaris_64" }, 89 { QRegularExpression("Sol.*32", QRegularExpression::CaseInsensitiveOption), "Solaris" }, 90 90 91 91 /* OS/2: */ 92 { QReg Exp("OS[/|!-]{,1}2.*W.*4.?5", Qt::CaseInsensitive), "OS2Warp45" },93 { QReg Exp("OS[/|!-]{,1}2.*W.*4", Qt::CaseInsensitive), "OS2Warp4" },94 { QReg Exp("OS[/|!-]{,1}2.*W", Qt::CaseInsensitive), "OS2Warp3" },95 { QReg Exp("OS[/|!-]{,1}2.*e", Qt::CaseInsensitive), "OS2eCS" },96 { QReg Exp("OS[/|!-]{,1}2.*Ar.*", Qt::CaseInsensitive), "OS2ArcaOS" },97 { QReg Exp("OS[/|!-]{,1}2", Qt::CaseInsensitive), "OS2" },98 { QReg Exp("(eComS.*|eCS.*)", Qt::CaseInsensitive), "OS2eCS" },99 { QReg Exp("Arca.*", Qt::CaseInsensitive), "OS2ArcaOS" },92 { QRegularExpression("OS[/|!-]{,1}2.*W.*4.?5", QRegularExpression::CaseInsensitiveOption), "OS2Warp45" }, 93 { QRegularExpression("OS[/|!-]{,1}2.*W.*4", QRegularExpression::CaseInsensitiveOption), "OS2Warp4" }, 94 { QRegularExpression("OS[/|!-]{,1}2.*W", QRegularExpression::CaseInsensitiveOption), "OS2Warp3" }, 95 { QRegularExpression("OS[/|!-]{,1}2.*e", QRegularExpression::CaseInsensitiveOption), "OS2eCS" }, 96 { QRegularExpression("OS[/|!-]{,1}2.*Ar.*", QRegularExpression::CaseInsensitiveOption), "OS2ArcaOS" }, 97 { QRegularExpression("OS[/|!-]{,1}2", QRegularExpression::CaseInsensitiveOption), "OS2" }, 98 { QRegularExpression("(eComS.*|eCS.*)", QRegularExpression::CaseInsensitiveOption), "OS2eCS" }, 99 { QRegularExpression("Arca.*", QRegularExpression::CaseInsensitiveOption), "OS2ArcaOS" }, 100 100 101 101 /* Other: Must come before Ubuntu/Maverick and before Linux??? */ 102 { QReg Exp("QN", Qt::CaseInsensitive), "QNX" },102 { QRegularExpression("QN", QRegularExpression::CaseInsensitiveOption), "QNX" }, 103 103 104 104 /* Mac OS X: Must come before Ubuntu/Maverick and before Linux: */ 105 { QReg Exp("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).64", Qt::CaseInsensitive), "MacOS_64" },106 { QReg Exp("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).32", Qt::CaseInsensitive), "MacOS" },107 { QReg Exp("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*64", Qt::CaseInsensitive), "MacOS_64" },108 { QReg Exp("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*32", Qt::CaseInsensitive), "MacOS" },109 { QReg Exp("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*64", Qt::CaseInsensitive), "MacOS106_64" },110 { QReg Exp("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*32", Qt::CaseInsensitive), "MacOS106" },111 { QReg Exp( "(mac.*10[.,]{0,1}7)|(os.*x.*10[.,]{0,1}7)|(mac.*ML)|(os.*x.*ML)|(Mount)", Qt::CaseInsensitive), "MacOS108_64" },112 { QReg Exp( "(mac.*10[.,]{0,1}8)|(os.*x.*10[.,]{0,1}8)|(Lion)", Qt::CaseInsensitive), "MacOS107_64" },113 { QReg Exp( "(mac.*10[.,]{0,1}9)|(os.*x.*10[.,]{0,1}9)|(mac.*mav)|(os.*x.*mav)|(Mavericks)", Qt::CaseInsensitive), "MacOS109_64" },114 { QReg Exp( "(mac.*yos)|(os.*x.*yos)|(Yosemite)", Qt::CaseInsensitive), "MacOS1010_64" },115 { QReg Exp( "(mac.*cap)|(os.*x.*capit)|(Capitan)", Qt::CaseInsensitive), "MacOS1011_64" },116 { QReg Exp( "(mac.*hig)|(os.*x.*high.*sierr)|(High Sierra)", Qt::CaseInsensitive), "MacOS1013_64" },117 { QReg Exp( "(mac.*sie)|(os.*x.*sierr)|(Sierra)", Qt::CaseInsensitive), "MacOS1012_64" },118 { QReg Exp("((Mac)|(Tig)|(Leop)|(Yose)|(os[ ]*x)).*64", Qt::CaseInsensitive), "MacOS_64" },119 { QReg Exp("((Mac)|(Tig)|(Leop)|(Yose)|(os[ ]*x)).*32", Qt::CaseInsensitive), "MacOS" },105 { QRegularExpression("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).64", QRegularExpression::CaseInsensitiveOption), "MacOS_64" }, 106 { QRegularExpression("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).32", QRegularExpression::CaseInsensitiveOption), "MacOS" }, 107 { QRegularExpression("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*64", QRegularExpression::CaseInsensitiveOption), "MacOS_64" }, 108 { QRegularExpression("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*32", QRegularExpression::CaseInsensitiveOption), "MacOS" }, 109 { QRegularExpression("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*64", QRegularExpression::CaseInsensitiveOption), "MacOS106_64" }, 110 { QRegularExpression("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*32", QRegularExpression::CaseInsensitiveOption), "MacOS106" }, 111 { QRegularExpression( "(mac.*10[.,]{0,1}7)|(os.*x.*10[.,]{0,1}7)|(mac.*ML)|(os.*x.*ML)|(Mount)", QRegularExpression::CaseInsensitiveOption), "MacOS108_64" }, 112 { QRegularExpression( "(mac.*10[.,]{0,1}8)|(os.*x.*10[.,]{0,1}8)|(Lion)", QRegularExpression::CaseInsensitiveOption), "MacOS107_64" }, 113 { QRegularExpression( "(mac.*10[.,]{0,1}9)|(os.*x.*10[.,]{0,1}9)|(mac.*mav)|(os.*x.*mav)|(Mavericks)", QRegularExpression::CaseInsensitiveOption), "MacOS109_64" }, 114 { QRegularExpression( "(mac.*yos)|(os.*x.*yos)|(Yosemite)", QRegularExpression::CaseInsensitiveOption), "MacOS1010_64" }, 115 { QRegularExpression( "(mac.*cap)|(os.*x.*capit)|(Capitan)", QRegularExpression::CaseInsensitiveOption), "MacOS1011_64" }, 116 { QRegularExpression( "(mac.*hig)|(os.*x.*high.*sierr)|(High Sierra)", QRegularExpression::CaseInsensitiveOption), "MacOS1013_64" }, 117 { QRegularExpression( "(mac.*sie)|(os.*x.*sierr)|(Sierra)", QRegularExpression::CaseInsensitiveOption), "MacOS1012_64" }, 118 { QRegularExpression("((Mac)|(Tig)|(Leop)|(Yose)|(os[ ]*x)).*64", QRegularExpression::CaseInsensitiveOption), "MacOS_64" }, 119 { QRegularExpression("((Mac)|(Tig)|(Leop)|(Yose)|(os[ ]*x)).*32", QRegularExpression::CaseInsensitiveOption), "MacOS" }, 120 120 121 121 /* Code names for Linux distributions: */ 122 { QReg Exp("((bianca)|(cassandra)|(celena)|(daryna)|(elyssa)|(felicia)|(gloria)|(helena)|(isadora)|(julia)|(katya)|(lisa)|(maya)|(nadia)|(olivia)|(petra)|(qiana)|(rebecca)|(rafaela)|(rosa)).*64", Qt::CaseInsensitive), "Ubuntu_64" },123 { QReg Exp("((bianca)|(cassandra)|(celena)|(daryna)|(elyssa)|(felicia)|(gloria)|(helena)|(isadora)|(julia)|(katya)|(lisa)|(maya)|(nadia)|(olivia)|(petra)|(qiana)|(rebecca)|(rafaela)|(rosa)).*32", Qt::CaseInsensitive), "Ubuntu" },124 { QReg Exp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)|(saucy)|(trusty)|(utopic)|(vivid)|(wily)|(xenial)|(yakkety)|(zesty)).*64", Qt::CaseInsensitive), "Ubuntu_64" },125 { QReg Exp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)|(saucy)|(trusty)|(utopic)|(vivid)|(wily)|(xenial)|(yakkety)|(zesty)).*32", Qt::CaseInsensitive), "Ubuntu" },126 { QReg Exp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(stretch)|(buster)|(sid)).*64", Qt::CaseInsensitive), "Debian_64" },127 { QReg Exp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(stretch)|(buster)|(sid)).*32", Qt::CaseInsensitive), "Debian" },128 { QReg Exp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*64", Qt::CaseInsensitive), "Fedora_64" },129 { QReg Exp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*32", Qt::CaseInsensitive), "Fedora" },122 { QRegularExpression("((bianca)|(cassandra)|(celena)|(daryna)|(elyssa)|(felicia)|(gloria)|(helena)|(isadora)|(julia)|(katya)|(lisa)|(maya)|(nadia)|(olivia)|(petra)|(qiana)|(rebecca)|(rafaela)|(rosa)).*64", QRegularExpression::CaseInsensitiveOption), "Ubuntu_64" }, 123 { QRegularExpression("((bianca)|(cassandra)|(celena)|(daryna)|(elyssa)|(felicia)|(gloria)|(helena)|(isadora)|(julia)|(katya)|(lisa)|(maya)|(nadia)|(olivia)|(petra)|(qiana)|(rebecca)|(rafaela)|(rosa)).*32", QRegularExpression::CaseInsensitiveOption), "Ubuntu" }, 124 { QRegularExpression("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)|(saucy)|(trusty)|(utopic)|(vivid)|(wily)|(xenial)|(yakkety)|(zesty)).*64", QRegularExpression::CaseInsensitiveOption), "Ubuntu_64" }, 125 { QRegularExpression("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)|(saucy)|(trusty)|(utopic)|(vivid)|(wily)|(xenial)|(yakkety)|(zesty)).*32", QRegularExpression::CaseInsensitiveOption), "Ubuntu" }, 126 { QRegularExpression("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(stretch)|(buster)|(sid)).*64", QRegularExpression::CaseInsensitiveOption), "Debian_64" }, 127 { QRegularExpression("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(stretch)|(buster)|(sid)).*32", QRegularExpression::CaseInsensitiveOption), "Debian" }, 128 { QRegularExpression("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*64", QRegularExpression::CaseInsensitiveOption), "Fedora_64" }, 129 { QRegularExpression("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*32", QRegularExpression::CaseInsensitiveOption), "Fedora" }, 130 130 131 131 /* Regular names of Linux distributions: */ 132 { QReg Exp("Arc.*64", Qt::CaseInsensitive), "ArchLinux_64" },133 { QReg Exp("Arc.*32", Qt::CaseInsensitive), "ArchLinux" },134 { QReg Exp("Deb.*64", Qt::CaseInsensitive), "Debian_64" },135 { QReg Exp("Deb.*32", Qt::CaseInsensitive), "Debian" },136 { QReg Exp("((SU)|(Nov)|(SLE)).*64", Qt::CaseInsensitive), "OpenSUSE_64" },137 { QReg Exp("((SU)|(Nov)|(SLE)).*32", Qt::CaseInsensitive), "OpenSUSE" },138 { QReg Exp("Fe.*64", Qt::CaseInsensitive), "Fedora_64" },139 { QReg Exp("Fe.*32", Qt::CaseInsensitive), "Fedora" },140 { QReg Exp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" },141 { QReg Exp("((Gen)|(Sab)).*32", Qt::CaseInsensitive), "Gentoo" },142 { QReg Exp("((Man)|(Mag)).*64", Qt::CaseInsensitive), "Mandriva_64" },143 { QReg Exp("((Man)|(Mag)).*32", Qt::CaseInsensitive), "Mandriva" },144 { QReg Exp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" },145 { QReg Exp("((Red)|(rhel)|(cen)).*32", Qt::CaseInsensitive), "RedHat" },146 { QReg Exp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" },147 { QReg Exp("Tur.*32", Qt::CaseInsensitive), "Turbolinux" },148 { QReg Exp("((Ub)|(Mint)).*64", Qt::CaseInsensitive), "Ubuntu_64" },149 { QReg Exp("((Ub)|(Mint)).*32", Qt::CaseInsensitive), "Ubuntu" },150 { QReg Exp("Xa.*64", Qt::CaseInsensitive), "Xandros_64" },151 { QReg Exp("Xa.*32", Qt::CaseInsensitive), "Xandros" },152 { QReg Exp("((Or)|(oel)|(ol)).*64", Qt::CaseInsensitive), "Oracle_64" },153 { QReg Exp("((Or)|(oel)|(ol)).*32", Qt::CaseInsensitive), "Oracle" },154 { QReg Exp("Knoppix", Qt::CaseInsensitive), "Linux26" },155 { QReg Exp("Dsl", Qt::CaseInsensitive), "Linux24" },156 { QReg Exp("((Lin)|(lnx)).*2.?2", Qt::CaseInsensitive), "Linux22" },157 { QReg Exp("((Lin)|(lnx)).*2.?4.*64", Qt::CaseInsensitive), "Linux24_64" },158 { QReg Exp("((Lin)|(lnx)).*2.?4.*32", Qt::CaseInsensitive), "Linux24" },159 { QReg Exp("((((Lin)|(lnx)).*2.?6)|(LFS)).*64", Qt::CaseInsensitive), "Linux26_64" },160 { QReg Exp("((((Lin)|(lnx)).*2.?6)|(LFS)).*32", Qt::CaseInsensitive), "Linux26" },161 { QReg Exp("((Lin)|(lnx)).*64", Qt::CaseInsensitive), "Linux26_64" },162 { QReg Exp("((Lin)|(lnx)).*32", Qt::CaseInsensitive), "Linux26" },132 { QRegularExpression("Arc.*64", QRegularExpression::CaseInsensitiveOption), "ArchLinux_64" }, 133 { QRegularExpression("Arc.*32", QRegularExpression::CaseInsensitiveOption), "ArchLinux" }, 134 { QRegularExpression("Deb.*64", QRegularExpression::CaseInsensitiveOption), "Debian_64" }, 135 { QRegularExpression("Deb.*32", QRegularExpression::CaseInsensitiveOption), "Debian" }, 136 { QRegularExpression("((SU)|(Nov)|(SLE)).*64", QRegularExpression::CaseInsensitiveOption), "OpenSUSE_64" }, 137 { QRegularExpression("((SU)|(Nov)|(SLE)).*32", QRegularExpression::CaseInsensitiveOption), "OpenSUSE" }, 138 { QRegularExpression("Fe.*64", QRegularExpression::CaseInsensitiveOption), "Fedora_64" }, 139 { QRegularExpression("Fe.*32", QRegularExpression::CaseInsensitiveOption), "Fedora" }, 140 { QRegularExpression("((Gen)|(Sab)).*64", QRegularExpression::CaseInsensitiveOption), "Gentoo_64" }, 141 { QRegularExpression("((Gen)|(Sab)).*32", QRegularExpression::CaseInsensitiveOption), "Gentoo" }, 142 { QRegularExpression("((Man)|(Mag)).*64", QRegularExpression::CaseInsensitiveOption), "Mandriva_64" }, 143 { QRegularExpression("((Man)|(Mag)).*32", QRegularExpression::CaseInsensitiveOption), "Mandriva" }, 144 { QRegularExpression("((Red)|(rhel)|(cen)).*64", QRegularExpression::CaseInsensitiveOption), "RedHat_64" }, 145 { QRegularExpression("((Red)|(rhel)|(cen)).*32", QRegularExpression::CaseInsensitiveOption), "RedHat" }, 146 { QRegularExpression("Tur.*64", QRegularExpression::CaseInsensitiveOption), "Turbolinux_64" }, 147 { QRegularExpression("Tur.*32", QRegularExpression::CaseInsensitiveOption), "Turbolinux" }, 148 { QRegularExpression("((Ub)|(Mint)).*64", QRegularExpression::CaseInsensitiveOption), "Ubuntu_64" }, 149 { QRegularExpression("((Ub)|(Mint)).*32", QRegularExpression::CaseInsensitiveOption), "Ubuntu" }, 150 { QRegularExpression("Xa.*64", QRegularExpression::CaseInsensitiveOption), "Xandros_64" }, 151 { QRegularExpression("Xa.*32", QRegularExpression::CaseInsensitiveOption), "Xandros" }, 152 { QRegularExpression("((Or)|(oel)|(ol)).*64", QRegularExpression::CaseInsensitiveOption), "Oracle_64" }, 153 { QRegularExpression("((Or)|(oel)|(ol)).*32", QRegularExpression::CaseInsensitiveOption), "Oracle" }, 154 { QRegularExpression("Knoppix", QRegularExpression::CaseInsensitiveOption), "Linux26" }, 155 { QRegularExpression("Dsl", QRegularExpression::CaseInsensitiveOption), "Linux24" }, 156 { QRegularExpression("((Lin)|(lnx)).*2.?2", QRegularExpression::CaseInsensitiveOption), "Linux22" }, 157 { QRegularExpression("((Lin)|(lnx)).*2.?4.*64", QRegularExpression::CaseInsensitiveOption), "Linux24_64" }, 158 { QRegularExpression("((Lin)|(lnx)).*2.?4.*32", QRegularExpression::CaseInsensitiveOption), "Linux24" }, 159 { QRegularExpression("((((Lin)|(lnx)).*2.?6)|(LFS)).*64", QRegularExpression::CaseInsensitiveOption), "Linux26_64" }, 160 { QRegularExpression("((((Lin)|(lnx)).*2.?6)|(LFS)).*32", QRegularExpression::CaseInsensitiveOption), "Linux26" }, 161 { QRegularExpression("((Lin)|(lnx)).*64", QRegularExpression::CaseInsensitiveOption), "Linux26_64" }, 162 { QRegularExpression("((Lin)|(lnx)).*32", QRegularExpression::CaseInsensitiveOption), "Linux26" }, 163 163 164 164 /* Other: */ 165 { QReg Exp("L4", Qt::CaseInsensitive), "L4" },166 { QReg Exp("((Fr.*B)|(fbsd)).*64", Qt::CaseInsensitive), "FreeBSD_64" },167 { QReg Exp("((Fr.*B)|(fbsd)).*32", Qt::CaseInsensitive), "FreeBSD" },168 { QReg Exp("Op.*B.*64", Qt::CaseInsensitive), "OpenBSD_64" },169 { QReg Exp("Op.*B.*32", Qt::CaseInsensitive), "OpenBSD" },170 { QReg Exp("Ne.*B.*64", Qt::CaseInsensitive), "NetBSD_64" },171 { QReg Exp("Ne.*B.*32", Qt::CaseInsensitive), "NetBSD" },172 { QReg Exp("Net", Qt::CaseInsensitive), "Netware" },173 { QReg Exp("Rocki", Qt::CaseInsensitive), "JRockitVE" },174 { QReg Exp("bs[23]{0,1}-", Qt::CaseInsensitive), "VBoxBS_64" }, /* bootsector tests */175 { QReg Exp("Ot", Qt::CaseInsensitive), "Other" },165 { QRegularExpression("L4", QRegularExpression::CaseInsensitiveOption), "L4" }, 166 { QRegularExpression("((Fr.*B)|(fbsd)).*64", QRegularExpression::CaseInsensitiveOption), "FreeBSD_64" }, 167 { QRegularExpression("((Fr.*B)|(fbsd)).*32", QRegularExpression::CaseInsensitiveOption), "FreeBSD" }, 168 { QRegularExpression("Op.*B.*64", QRegularExpression::CaseInsensitiveOption), "OpenBSD_64" }, 169 { QRegularExpression("Op.*B.*32", QRegularExpression::CaseInsensitiveOption), "OpenBSD" }, 170 { QRegularExpression("Ne.*B.*64", QRegularExpression::CaseInsensitiveOption), "NetBSD_64" }, 171 { QRegularExpression("Ne.*B.*32", QRegularExpression::CaseInsensitiveOption), "NetBSD" }, 172 { QRegularExpression("Net", QRegularExpression::CaseInsensitiveOption), "Netware" }, 173 { QRegularExpression("Rocki", QRegularExpression::CaseInsensitiveOption), "JRockitVE" }, 174 { QRegularExpression("bs[23]{0,1}-", QRegularExpression::CaseInsensitiveOption), "VBoxBS_64" }, /* bootsector tests */ 175 { QRegularExpression("Ot", QRegularExpression::CaseInsensitiveOption), "Other" }, 176 176 }; 177 177
Note:
See TracChangeset
for help on using the changeset viewer.