Port baselineserver from QRegExp to QRegularExpression
Change-Id: I1e76345caa560c27ca75204e1b48a69ba2237ae4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
2a7c30e508
commit
5f5f010885
@ -38,7 +38,7 @@
|
||||
#include <QDir>
|
||||
#include <QTime>
|
||||
#include <QPointer>
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
|
||||
const QString PI_Project(QLS("Project"));
|
||||
const QString PI_TestCase(QLS("TestCase"));
|
||||
@ -87,7 +87,7 @@ PlatformInfo PlatformInfo::localHostInfo()
|
||||
PlatformInfo pi;
|
||||
pi.insert(PI_HostName, QHostInfo::localHostName());
|
||||
pi.insert(PI_QtVersion, QLS(qVersion()));
|
||||
pi.insert(PI_QMakeSpec, QString(QLS(QMAKESPEC)).remove(QRegExp(QLS("^.*mkspecs/"))));
|
||||
pi.insert(PI_QMakeSpec, QString(QLS(QMAKESPEC)).remove(QRegularExpression(QLS("^.*mkspecs/"))));
|
||||
#if QT_VERSION >= 0x050000
|
||||
pi.insert(PI_QtBuildMode, QLibraryInfo::isDebugBuild() ? QLS("QtDebug") : QLS("QtRelease"));
|
||||
#endif
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <QProcess>
|
||||
#include <QDirIterator>
|
||||
#include <QUrl>
|
||||
#include <QRegularExpression>
|
||||
|
||||
// extra fields, for use in image metadata storage
|
||||
const QString PI_ImageChecksum(QLS("ImageChecksum"));
|
||||
@ -532,7 +533,7 @@ PlatformInfo BaselineHandler::mapPlatformInfo(const PlatformInfo& orig) const
|
||||
host = orig.value(PI_HostAddress);
|
||||
} else {
|
||||
if (!orig.isAdHocRun()) { // i.e. CI system run, so remove index postfix typical of vm hostnames
|
||||
host.remove(QRegExp(QLS("\\d+$")));
|
||||
host.remove(QRegularExpression(QLS("\\d+$")));
|
||||
if (host.endsWith(QLC('-')))
|
||||
host.chop(1);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <QProcess>
|
||||
#include <QUrl>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QRegularExpression>
|
||||
#include <unistd.h>
|
||||
|
||||
Report::Report()
|
||||
@ -67,7 +68,7 @@ void Report::init(const BaselineHandler *h, const QString &r, const PlatformInfo
|
||||
plat = p;
|
||||
settings = s;
|
||||
rootDir = BaselineServer::storagePath() + QLC('/');
|
||||
baseDir = handler->pathForItem(ImageItem(), true, false).remove(QRegExp("/baselines/.*$"));
|
||||
baseDir = handler->pathForItem(ImageItem(), true, false).remove(QRegularExpression("/baselines/.*$"));
|
||||
QString dir = baseDir + (plat.isAdHocRun() ? QLS("/adhoc-reports") : QLS("/auto-reports"));
|
||||
QDir cwd;
|
||||
if (!cwd.exists(rootDir + dir))
|
||||
|
Loading…
Reference in New Issue
Block a user