forked from qt-creator/qt-creator
Help:iOS: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098 Change-Id: Ie63ac88e3afdc39db0d9ead4b058efbaec402001 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
#include <qplugin.h>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <QAction>
|
||||
#include <QComboBox>
|
||||
@@ -322,12 +322,12 @@ void HelpPluginPrivate::resetFilter()
|
||||
{
|
||||
const QString &filterInternal = QString::fromLatin1("Qt Creator %1.%2.%3")
|
||||
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR).arg(IDE_VERSION_RELEASE);
|
||||
QRegExp filterRegExp("Qt Creator \\d*\\.\\d*\\.\\d*");
|
||||
const QRegularExpression filterRegExp("^Qt Creator \\d*\\.\\d*\\.\\d*$");
|
||||
|
||||
QHelpEngineCore *engine = &LocalHelpManager::helpEngine();
|
||||
const QStringList &filters = engine->customFilters();
|
||||
foreach (const QString &filter, filters) {
|
||||
if (filterRegExp.exactMatch(filter) && filter != filterInternal)
|
||||
for (const QString &filter : filters) {
|
||||
if (filterRegExp.match(filter).hasMatch() && filter != filterInternal)
|
||||
engine->removeCustomFilter(filter);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QSettings>
|
||||
#include <QTcpServer>
|
||||
#include <QTime>
|
||||
@@ -275,11 +275,11 @@ void IosRunner::handleGotInferiorPid(IosToolHandler *handler, const QString &bun
|
||||
void IosRunner::handleAppOutput(IosToolHandler *handler, const QString &output)
|
||||
{
|
||||
Q_UNUSED(handler)
|
||||
QRegExp qmlPortRe("QML Debugger: Waiting for connection on port ([0-9]+)...");
|
||||
int index = qmlPortRe.indexIn(output);
|
||||
QRegularExpression qmlPortRe("QML Debugger: Waiting for connection on port ([0-9]+)...");
|
||||
const QRegularExpressionMatch match = qmlPortRe.match(output);
|
||||
QString res(output);
|
||||
if (index != -1 && m_qmlServerPort.isValid())
|
||||
res.replace(qmlPortRe.cap(1), QString::number(m_qmlServerPort.number()));
|
||||
if (match.hasMatch() && m_qmlServerPort.isValid())
|
||||
res.replace(match.captured(1), QString::number(m_qmlServerPort.number()));
|
||||
appendMessage(output, StdOutFormat);
|
||||
appOutput(res);
|
||||
}
|
||||
@@ -297,10 +297,10 @@ void IosRunner::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||
TaskHub::addTask(DeploymentTask(Task::Error, message));
|
||||
res.replace(lockedErr, message);
|
||||
}
|
||||
QRegExp qmlPortRe("QML Debugger: Waiting for connection on port ([0-9]+)...");
|
||||
int index = qmlPortRe.indexIn(msg);
|
||||
if (index != -1 && m_qmlServerPort.isValid())
|
||||
res.replace(qmlPortRe.cap(1), QString::number(m_qmlServerPort.number()));
|
||||
QRegularExpression qmlPortRe("QML Debugger: Waiting for connection on port ([0-9]+)...");
|
||||
const QRegularExpressionMatch match = qmlPortRe.match(msg);
|
||||
if (match.hasMatch() && m_qmlServerPort.isValid())
|
||||
res.replace(match.captured(1), QString::number(m_qmlServerPort.number()));
|
||||
|
||||
appendMessage(res, StdErrFormat);
|
||||
errorMsg(res);
|
||||
|
||||
Reference in New Issue
Block a user