From e68cbe6a7d61611dc048edd82cfba716b443a474 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 23 Apr 2012 17:47:03 +0200 Subject: Don't use the QRegExp methods that modify the object [Linguist] QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: I181d37fd98b00550dd98d418a33183a4bde0c532 Reviewed-by: Oswald Buddenhagen --- src/linguist/shared/xliff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/linguist/shared/xliff.cpp') diff --git a/src/linguist/shared/xliff.cpp b/src/linguist/shared/xliff.cpp index c20c0fb40..fdc96bf86 100644 --- a/src/linguist/shared/xliff.cpp +++ b/src/linguist/shared/xliff.cpp @@ -192,7 +192,7 @@ static QString protect(const QString &str, bool makePhs = true) static void writeExtras(QTextStream &ts, int indent, - const TranslatorMessage::ExtraData &extras, const QRegExp &drops) + const TranslatorMessage::ExtraData &extras, QRegExp drops) { for (Translator::ExtraData::ConstIterator it = extras.begin(); it != extras.end(); ++it) { if (!drops.exactMatch(it.key())) { -- cgit v1.2.3