qt: use QRegularExpression instead of QRegExp for qt6 compatibility (#3536)

Co-authored-by: cold-brewed <cold-brewed@users.noreply.github.com>
This commit is contained in:
cold-brewed
2023-08-10 10:40:19 -04:00
committed by GitHub
parent 9f4ae7030e
commit 9474c02aec

View File

@@ -37,6 +37,7 @@
#include <QLocalSocket>
#include <QTimer>
#include <QProcess>
#include <QRegularExpression>
#include <QLibrary>
#include <QElapsedTimer>
@@ -712,7 +713,7 @@ plat_get_cpu_string(char *outbuf, uint8_t len) {
if (line.isNull()) {
break;
}
if(line.contains(QRegExp("model name.*:"))) {
if(QRegularExpression("model name.*:").match(line).hasMatch()) {
auto list = line.split(": ");
if(!list.last().isEmpty()) {
cpu_string = list.last();