Commit fb9146a9 authored by Bradley T. Hughes's avatar Bradley T. Hughes

Compile after qt5/qtbase commit 75a0c7f9

Commit 75a0c7f9b52cde47f20fdc1b89e1264d60350848 in qt5/qtbase changed
some QRegExp methods to be non-const (they were previously const). This
change makes Qt Creator compile again.

Change-Id: Ibc98c678126c3b3189df7fcc043463b940951445
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent d681bc10
......@@ -550,7 +550,7 @@ CPLUSPLUS_EXPORT QString simplifySTLType(const QString &typeIn)
simplifyStdString(QLatin1String("unsigned short"), QLatin1String("wstring"), &type);
}
// std::vector, std::deque, std::list
const QRegExp re1(QString::fromLatin1("(vector|list|deque)<%1, ?%2\\s*>").arg(inner, alloc));
QRegExp re1(QString::fromLatin1("(vector|list|deque)<%1, ?%2\\s*>").arg(inner, alloc));
Q_ASSERT(re1.isValid());
if (re1.indexIn(type) != -1)
type.replace(re1.cap(0), QString::fromLatin1("%1<%2>").arg(re1.cap(1), inner));
......
......@@ -1186,7 +1186,7 @@ void Check::addMessage(Type type, const SourceLocation &location, const QString
void Check::scanCommentsForAnnotations()
{
m_disabledMessageTypesByLine.clear();
const QRegExp disableCommentPattern(Message::suppressionPattern());
QRegExp disableCommentPattern(Message::suppressionPattern());
foreach (const SourceLocation &commentLoc, _doc->engine()->comments()) {
const QString &comment = _doc->source().mid(commentLoc.begin(), commentLoc.length);
......
......@@ -50,17 +50,16 @@ namespace Utils {
// Naming a file like a device name will break on Windows, even if it is
// "com1.txt". Since we are cross-platform, we generally disallow such file
// names.
static const QRegExp &windowsDeviceNoSubDirPattern()
static QRegExp &windowsDeviceNoSubDirPattern()
{
static const QRegExp rc(QLatin1String(WINDOWS_DEVICES),
Qt::CaseInsensitive);
static QRegExp rc(QLatin1String(WINDOWS_DEVICES), Qt::CaseInsensitive);
QTC_ASSERT(rc.isValid(), return rc);
return rc;
}
static const QRegExp &windowsDeviceSubDirPattern()
static QRegExp &windowsDeviceSubDirPattern()
{
static const QRegExp rc(QLatin1String(".*[/\\\\](" WINDOWS_DEVICES ")"), Qt::CaseInsensitive);
static QRegExp rc(QLatin1String(".*[/\\\\](" WINDOWS_DEVICES ")"), Qt::CaseInsensitive);
QTC_ASSERT(rc.isValid(), return rc);
return rc;
}
......
......@@ -223,7 +223,7 @@ void runFileSearchRegExp(QFutureInterface<FileSearchResultList> &future,
if (flags & QTextDocument::FindWholeWords)
searchTerm = QString::fromLatin1("\\b%1\\b").arg(searchTerm);
const Qt::CaseSensitivity caseSensitivity = (flags & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive;
const QRegExp expression(searchTerm, caseSensitivity);
QRegExp expression(searchTerm, caseSensitivity);
QFile file;
QString str;
......
......@@ -65,7 +65,7 @@ namespace {
QString cleanPackageName(QString packageName)
{
const QRegExp legalChars(QLatin1String("[a-zA-Z0-9_\\.]"));
QRegExp legalChars(QLatin1String("[a-zA-Z0-9_\\.]"));
for (int i = 0; i < packageName.length(); ++i)
if (!legalChars.exactMatch(packageName.mid(i, 1)))
......
......@@ -47,7 +47,7 @@ public:
private:
virtual QString changeNumber(const QString &block) const;
QRegExp m_changeset;
mutable QRegExp m_changeset;
};
} // namespace Internal
......
......@@ -79,8 +79,8 @@ BranchInfo BazaarClient::synchronousBranchQuery(const QString &repositoryRoot) c
QTextStream ts(&branchConfFile);
QString branchLocation;
QString isBranchBound;
const QRegExp branchLocationRx(QLatin1String("bound_location\\s*=\\s*(.+)$"));
const QRegExp isBranchBoundRx(QLatin1String("bound\\s*=\\s*(.+)$"));
QRegExp branchLocationRx(QLatin1String("bound_location\\s*=\\s*(.+)$"));
QRegExp isBranchBoundRx(QLatin1String("bound\\s*=\\s*(.+)$"));
while (!ts.atEnd() && (branchLocation.isEmpty() || isBranchBound.isEmpty())) {
const QString line = ts.readLine();
if (branchLocationRx.indexIn(line) != -1)
......
......@@ -70,7 +70,7 @@ public:
private:
enum State { Header, Comment, Other };
const QTextCharFormat m_commentFormat;
const QRegExp m_keywordPattern;
QRegExp m_keywordPattern;
const QChar m_hashChar;
};
......
......@@ -54,9 +54,9 @@ private:
virtual VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes, const QColor &bg) const;
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileSpec) const;
const QRegExp m_changesetId;
const QRegExp m_exactChangesetId;
const QRegExp m_diffFileId;
mutable QRegExp m_changesetId;
mutable QRegExp m_exactChangesetId;
mutable QRegExp m_diffFileId;
};
} // namespace Internal
......
......@@ -548,7 +548,7 @@ public:
void assignSuffixes(const QStringList &patterns);
void debug(QTextStream &str, int indent = 0) const;
const QRegExp suffixPattern;
QRegExp suffixPattern;
QString type;
QString comment;
......@@ -814,7 +814,8 @@ unsigned MimeType::matchesFileBySuffix(Internal::FileMatchContext &c) const
{
// check globs
foreach (const MimeGlobPattern &gp, m_d->globPatterns) {
if (gp.regExp().exactMatch(c.fileName()))
QRegExp regExp = gp.regExp();
if (regExp.exactMatch(c.fileName()))
return gp.weight();
}
return 0;
......
......@@ -234,7 +234,7 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
headerStr << headerLicense << "#ifndef " << guard
<< "\n#define " << guard << '\n';
const QRegExp qtClassExpr(QLatin1String("^Q[A-Z3].+"));
QRegExp qtClassExpr(QLatin1String("^Q[A-Z3].+"));
QTC_CHECK(qtClassExpr.isValid());
// Determine parent QObject type for Qt types. Provide base
// class in case the user did not specify one.
......
......@@ -68,7 +68,7 @@ QList<Locator::FilterEntry> CppCurrentDocumentFilter::matchesFor(QFutureInterfac
QList<Locator::FilterEntry> betterEntries;
QStringMatcher matcher(entry, Qt::CaseInsensitive);
const QChar asterisk = QLatin1Char('*');
const QRegExp regexp(asterisk + entry + asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
QRegExp regexp(asterisk + entry + asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
return goodEntries;
bool hasWildcard = (entry.contains(asterisk) || entry.contains('?'));
......
......@@ -86,7 +86,7 @@ QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locato
QList<Locator::FilterEntry> betterEntries;
const QChar asterisk = QLatin1Char('*');
QStringMatcher matcher(entry, Qt::CaseInsensitive);
const QRegExp regexp(asterisk + entry+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
QRegExp regexp(asterisk + entry+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
return goodEntries;
bool hasWildcard = (entry.contains(asterisk) || entry.contains('?'));
......
......@@ -56,8 +56,8 @@ private:
QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
QStringList annotationPreviousVersions(const QString &revision) const;
const QRegExp m_revisionAnnotationPattern;
const QRegExp m_revisionLogPattern;
mutable QRegExp m_revisionAnnotationPattern;
mutable QRegExp m_revisionLogPattern;
QString m_diffBaseDir;
};
......
......@@ -88,8 +88,8 @@ QList<CvsLogEntry> parseLogEntries(const QString &o,
const QString revisionPrefix = QLatin1String("revision ");
const QString statusPrefix = QLatin1String("date: ");
const QString commitId = QLatin1String("commitid: ");
const QRegExp statusPattern = QRegExp(QLatin1String("^date: ([\\d\\-]+) .*commitid: ([^;]+);$"));
const QRegExp revisionPattern = QRegExp(QLatin1String("^revision ([\\d\\.]+)$"));
QRegExp statusPattern = QRegExp(QLatin1String("^date: ([\\d\\-]+) .*commitid: ([^;]+);$"));
QRegExp revisionPattern = QRegExp(QLatin1String("^revision ([\\d\\.]+)$"));
const QChar slash = QLatin1Char('/');
Q_ASSERT(statusPattern.isValid() && revisionPattern.isValid());
const QString fileSeparator = QLatin1String("=============================================================================");
......
......@@ -1572,7 +1572,7 @@ void FakeVimPluginPrivate::handleExCommand(bool *handled, const ExCommand &cmd)
const Iterator end = exCommandMap().constEnd();
for (Iterator it = exCommandMap().constBegin(); it != end; ++it) {
const QString &id = it.key();
const QRegExp &re = it.value();
QRegExp re = it.value();
if (!re.pattern().isEmpty() && re.indexIn(cmd.cmd) != -1) {
triggerAction(Core::Id(id));
return;
......
......@@ -307,7 +307,7 @@ void GenericProject::refresh(RefreshOptions options)
*/
static void expandEnvironmentVariables(const QProcessEnvironment &env, QString &string)
{
const static QRegExp candidate(QLatin1String("\\$\\$\\((.+)\\)"));
static QRegExp candidate(QLatin1String("\\$\\$\\((.+)\\)"));
int index = candidate.indexIn(string);
while (index != -1) {
......
......@@ -64,7 +64,7 @@ struct Glob
enum Mode { EXACT, ENDSWITH, REGEXP };
Mode mode;
QString matchString;
QRegExp matchRegexp;
mutable QRegExp matchRegexp;
};
class SelectableFilesModel : public QAbstractItemModel
......
......@@ -2356,7 +2356,7 @@ unsigned GitClient::synchronousGitVersion(bool silent, QString *errorMessage) co
}
// cut 'git version 1.6.5.1.sha'
const QString output = commandOutputFromLocal8Bit(outputText);
const QRegExp versionPattern(QLatin1String("^[^\\d]+([\\d])\\.([\\d])\\.([\\d]).*$"));
QRegExp versionPattern(QLatin1String("^[^\\d]+([\\d])\\.([\\d])\\.([\\d]).*$"));
QTC_ASSERT(versionPattern.isValid(), return 0);
QTC_ASSERT(versionPattern.exactMatch(output), return 0);
const unsigned major = versionPattern.cap(1).toUInt();
......
......@@ -65,8 +65,8 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QStringList annotationPreviousVersions(const QString &revision) const;
const QRegExp m_changeNumberPattern8;
const QRegExp m_changeNumberPattern40;
mutable QRegExp m_changeNumberPattern8;
mutable QRegExp m_changeNumberPattern40;
};
} // namespace Git
......
......@@ -231,7 +231,7 @@ void GitoriousProjectWidget::setDescription(const QString &description,
if (url) {
// Should the text contain an URL, extract
// Do not fall for "(http://XX)", strip special characters
static const QRegExp urlRegExp(QLatin1String("(http://[\\w\\.-]+/[a-zA-Z0-9/\\-&]*)"));
static QRegExp urlRegExp(QLatin1String("(http://[\\w\\.-]+/[a-zA-Z0-9/\\-&]*)"));
QTC_CHECK(urlRegExp.isValid());
if (urlRegExp.indexIn(description) != -1) {
*url= urlRegExp.cap(1);
......
......@@ -69,7 +69,7 @@ public:
private:
enum State { Header, Comment, Other };
const QTextCharFormat m_commentFormat;
const QRegExp m_keywordPattern;
QRegExp m_keywordPattern;
const QChar m_hashChar;
};
......
......@@ -514,7 +514,7 @@ void HelpPlugin::resetFilter()
{
const QString &filterInternal = QString::fromLatin1("Qt Creator %1.%2.%3")
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR).arg(IDE_VERSION_RELEASE);
const QRegExp filterRegExp(QLatin1String("Qt Creator \\d*\\.\\d*\\.\\d*"));
QRegExp filterRegExp(QLatin1String("Qt Creator \\d*\\.\\d*\\.\\d*"));
QHelpEngineCore *engine = &LocalHelpManager::helpEngine();
const QStringList &filters = engine->customFilters();
......@@ -900,7 +900,7 @@ void HelpPlugin::activateContext()
"available.</center></body></html>").arg(m_idFromContext));
} else {
int version = 0;
const QRegExp exp("(\\d+)");
QRegExp exp("(\\d+)");
QUrl source = *links.begin();
const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt");
......
......@@ -53,7 +53,7 @@ QList<FilterEntry> BaseFileFilter::matchesFor(QFutureInterface<Locator::FilterEn
QString needle = trimWildcards(origEntry);
QStringMatcher matcher(needle, Qt::CaseInsensitive);
const QChar asterisk = QLatin1Char('*');
const QRegExp regexp(asterisk + needle+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
QRegExp regexp(asterisk + needle+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
return matches;
const bool hasWildcard = needle.contains(asterisk) || needle.contains(QLatin1Char('?'));
......
......@@ -60,7 +60,7 @@ QList<FilterEntry> OpenDocumentsFilter::matchesFor(QFutureInterface<Locator::Fil
QString pattern = QString(asterisk);
pattern += entry;
pattern += asterisk;
const QRegExp regexp(pattern, Qt::CaseInsensitive, QRegExp::Wildcard);
QRegExp regexp(pattern, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
return value;
foreach (const OpenEditorsModel::Entry &editorEntry, m_editors) {
......
......@@ -267,7 +267,7 @@ QString MaddeDeviceTester::processedQtLibsList()
patternString = QLatin1String("(libqt\\S+) ((\\d+)\\.(\\d+)\\.(\\d+))");
else
patternString = QLatin1String("(\\S+) (\\S*(\\d+)\\.(\\d+)\\.(\\d+)\\S*) \\S+ \\S+ \\S+");
const QRegExp packagePattern(patternString);
QRegExp packagePattern(patternString);
int index = packagePattern.indexIn(unfilteredLibs);
if (index == -1)
return tr("No Qt packages installed.");
......
......@@ -360,7 +360,7 @@ bool MaemoDebianPackageCreationStep::isMetaDataNewerThan(const QDateTime &packag
void MaemoDebianPackageCreationStep::checkProjectName()
{
const QRegExp legalName(QLatin1String("[0-9-+a-z\\.]+"));
QRegExp legalName(QLatin1String("[0-9-+a-z\\.]+"));
if (!legalName.exactMatch(project()->displayName())) {
emit addTask(Task(Task::Warning,
tr("Your project name contains characters not allowed in "
......
......@@ -898,8 +898,7 @@ QString AbstractDebBasedQt4MaemoTarget::defaultPackageFileName() const
QString packageName = project()->displayName().toLower();
// We also replace dots, because OVI store chokes on them.
const QRegExp legalLetter(QLatin1String("[a-z0-9+-]"), Qt::CaseSensitive,
QRegExp::WildcardUnix);
QRegExp legalLetter(QLatin1String("[a-z0-9+-]"), Qt::CaseSensitive, QRegExp::WildcardUnix);
for (int i = 0; i < packageName.length(); ++i) {
if (!legalLetter.exactMatch(packageName.mid(i, 1)))
......
......@@ -47,7 +47,7 @@ public:
private:
virtual QString changeNumber(const QString &block) const;
QRegExp changeset;
mutable QRegExp changeset;
};
} //namespace Internal
......
......@@ -69,7 +69,7 @@ public:
private:
enum State { Header, Comment, Other };
const QTextCharFormat m_commentFormat;
const QRegExp m_keywordPattern;
QRegExp m_keywordPattern;
const QChar m_hashChar;
};
......
......@@ -54,9 +54,9 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileSpec) const;
virtual QStringList annotationPreviousVersions(const QString &revision) const;
const QRegExp exactIdentifier12;
const QRegExp exactIdentifier40;
const QRegExp changesetIdentifier12;
mutable QRegExp exactIdentifier12;
mutable QRegExp exactIdentifier40;
mutable QRegExp changesetIdentifier12;
const QRegExp changesetIdentifier40;
const QRegExp diffIdentifier;
};
......
......@@ -58,7 +58,7 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QStringList annotationPreviousVersions(const QString &v) const;
const QRegExp m_changeNumberPattern;
mutable QRegExp m_changeNumberPattern;
PerforcePlugin *m_plugin;
};
......
......@@ -85,7 +85,7 @@ bool PerforceSubmitEditor::setFileContents(const QString &contents)
bool PerforceSubmitEditor::parseText(QString text)
{
const QRegExp formField(QLatin1String("^\\S+:"));
QRegExp formField(QLatin1String("^\\S+:"));
const QString newLine = QString(QLatin1Char('\n'));
int match;
......
......@@ -97,7 +97,7 @@ Utils::FileIterator *AllProjectsFind::filesForProjects(const QStringList &nameFi
QStringList filteredFiles;
if (!filterRegs.isEmpty()) {
foreach (const QString &file, projectFiles) {
foreach (const QRegExp &reg, filterRegs) {
foreach (QRegExp reg, filterRegs) {
if (reg.exactMatch(file) || reg.exactMatch(QFileInfo(file).fileName())) {
filteredFiles.append(file);
break;
......
......@@ -88,8 +88,8 @@ private:
mutable QRegExp m_ifPattern;
mutable QRegExp m_elsifPattern;
const QRegExp m_elsePattern;
const QRegExp m_endifPattern;
mutable QRegExp m_elsePattern;
mutable QRegExp m_endifPattern;
QStack<PreprocessStackEntry> m_sectionStack;
QScriptEngine m_scriptEngine;
......
......@@ -212,7 +212,7 @@ protected:
}
if (packageName.isEmpty() && _compound) {
// check the comments in _compound for annotations
const QRegExp uriAnnotation(QLatin1String("@uri\\s*([\\w\\.]*)"));
QRegExp uriAnnotation(QLatin1String("@uri\\s*([\\w\\.]*)"));
// scan every comment between the pipes in
// {|
......
......@@ -70,7 +70,7 @@ QList<Locator::FilterEntry> FunctionFilter::matchesFor(QFutureInterface<Locator:
QList<Locator::FilterEntry> betterEntries;
const QChar asterisk = QLatin1Char('*');
QStringMatcher matcher(entry, Qt::CaseInsensitive);
const QRegExp regexp(asterisk + entry+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
QRegExp regexp(asterisk + entry+ asterisk, Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
return goodEntries;
bool hasWildcard = (entry.contains(asterisk) || entry.contains('?'));
......
......@@ -272,7 +272,7 @@ bool FileFilterBaseItem::fileMatches(const QString &fileName) const
}
}
foreach (const QRegExp &filter, m_regExpList) {
foreach (QRegExp filter, m_regExpList) {
if (filter.exactMatch(fileName)) {
return true;
}
......
......@@ -62,7 +62,7 @@ public:
private:
void appendClass(const QString &);
const QRegExp m_validator;
QRegExp m_validator;
const QString m_newClassPlaceHolder;
};
......
......@@ -130,8 +130,7 @@ RvctToolChain::RvctVersion RvctToolChain::version(const Utils::FileName &rvctPat
}
QString versionLine = QString::fromLocal8Bit(armcc.readAllStandardOutput());
versionLine += QString::fromLocal8Bit(armcc.readAllStandardError());
const QRegExp versionRegExp(QLatin1String("^(\\d)(\\d)0*([1-9]\\d*)"),
Qt::CaseInsensitive);
QRegExp versionRegExp(QLatin1String("^(\\d)(\\d)0*([1-9]\\d*)"), Qt::CaseInsensitive);
Q_ASSERT(versionRegExp.isValid());
if (versionRegExp.indexIn(versionLine) != -1) {
......
......@@ -193,9 +193,9 @@ void QtOutputFormatter::appendLine(QTextCursor &cursor, LinkResult lr,
void QtOutputFormatter::handleLink(const QString &href)
{
if (!href.isEmpty()) {
const QRegExp qmlLineColumnLink(QLatin1String("^(file:///.+)" // file url
":(\\d+)" // line
":(\\d+)$")); // column
QRegExp qmlLineColumnLink(QLatin1String("^(file:///.+)" // file url
":(\\d+)" // line
":(\\d+)$")); // column
if (qmlLineColumnLink.indexIn(href) != -1) {
const QUrl fileUrl = QUrl(qmlLineColumnLink.cap(1));
......@@ -207,8 +207,8 @@ void QtOutputFormatter::handleLink(const QString &href)
return;
}
const QRegExp qmlLineLink(QLatin1String("^(file:///.+)" // file url
":(\\d+)$")); // line
QRegExp qmlLineLink(QLatin1String("^(file:///.+)" // file url
":(\\d+)$")); // line
if (qmlLineLink.indexIn(href) != -1) {
const QUrl fileUrl = QUrl(qmlLineLink.cap(1));
......
......@@ -75,11 +75,11 @@ private:
void appendLine(QTextCursor & cursor, LinkResult lr,
const QString &line, Utils::OutputFormat);
QRegExp m_qmlError;
QRegExp m_qtError;
QRegExp m_qtAssert;
QRegExp m_qtAssertX;
QRegExp m_qtTestFail;
mutable QRegExp m_qmlError;
mutable QRegExp m_qtError;
mutable QRegExp m_qtAssert;
mutable QRegExp m_qtAssertX;
mutable QRegExp m_qtTestFail;
QWeakPointer<ProjectExplorer::Project> m_project;
QString m_lastLine;
Utils::FileInProjectFinder m_projectFinder;
......
......@@ -56,8 +56,8 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QStringList annotationPreviousVersions(const QString &) const;
const QRegExp m_changeNumberPattern;
const QRegExp m_revisionNumberPattern;
mutable QRegExp m_changeNumberPattern;
mutable QRegExp m_revisionNumberPattern;
};
} // namespace Internal
......
......@@ -204,7 +204,7 @@ void BasicProposalItemListModel::filter(const QString &prefix)
first = false;
}
const QRegExp regExp(keyRegExp);
QRegExp regExp(keyRegExp);
m_currentItems.clear();
for (QList<BasicProposalItem *>::const_iterator it = m_originalItems.begin();
......
......@@ -199,7 +199,7 @@ void HighlighterSettings::assignDefaultDefinitionsPath()
bool HighlighterSettings::isIgnoredFilePattern(const QString &fileName) const
{
foreach (const QRegExp &regExp, m_ignoredFiles)
foreach (QRegExp regExp, m_ignoredFiles)
if (regExp.indexIn(fileName) != -1)
return true;
......
......@@ -135,8 +135,8 @@ void MemcheckEngine::receiveLogMessage(const QByteArray &b)
QString file;
int line = -1;
const QRegExp suppressionError(QLatin1String("in suppressions file \"([^\"]+)\" near line (\\d+)"),
Qt::CaseSensitive, QRegExp::RegExp2);
QRegExp suppressionError(QLatin1String("in suppressions file \"([^\"]+)\" near line (\\d+)"),
Qt::CaseSensitive, QRegExp::RegExp2);
if (suppressionError.indexIn(error) != -1) {
file = suppressionError.cap(1);
line = suppressionError.cap(2).toInt();
......
......@@ -95,7 +95,7 @@ public:
DiffFormats analyzeLine(const QString &block) const;
const QRegExp m_filePattern;
mutable QRegExp m_filePattern;
const QString m_locationIndicator;
const QChar m_diffInIndicator;
const QChar m_diffOutIndicator;
......
......@@ -466,7 +466,7 @@ bool UrlTextCursorHandler::findContentsUnderCursor(const QTextCursor &cursor)
if (cursorForUrl.hasSelection()) {
const QString line = cursorForUrl.selectedText();
const int cursorCol = cursor.columnNumber();
const QRegExp urlRx(m_urlPattern);
QRegExp urlRx(m_urlPattern);
int urlMatchIndex = -1;
do {
urlMatchIndex = urlRx.indexIn(line, urlMatchIndex + 1);
......
......@@ -2535,7 +2535,7 @@ ProStringList ProFileEvaluator::Private::evaluateExpandFunction(
}
r.detach(); // Keep m_tmp out of QRegExp's cache
const QRegExp regex(r, Qt::CaseSensitive, QRegExp::Wildcard);
QRegExp regex(r, Qt::CaseSensitive, QRegExp::Wildcard);
for (int d = 0; d < dirs.count(); d++) {
QString dir = dirs[d];
QDir qdir(pfx + dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment