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: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Bradley T. Hughes
2012-04-30 12:01:15 +02:00
parent d681bc10c9
commit fb9146a9c3
49 changed files with 74 additions and 76 deletions

View File

@@ -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();

View File

@@ -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

View File

@@ -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);

View File

@@ -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;
};