forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.9' into 4.10
Change-Id: I6f1bc9381dc8c0ce8abc5a6c006087076d8fc1bc
This commit is contained in:
@@ -169,6 +169,7 @@ static bool keyWordReplacement(const QString &keyWord,
|
||||
const QChar ypsilon = QLatin1Char('y');
|
||||
if (format.count(ypsilon) == 2)
|
||||
format.insert(format.indexOf(ypsilon), QString(2, ypsilon));
|
||||
format.replace('/', "\\/");
|
||||
}
|
||||
*value = QString::fromLatin1("%{CurrentDate:") + format + QLatin1Char('}');
|
||||
return true;
|
||||
@@ -193,7 +194,6 @@ static void parseLicenseTemplatePlaceholders(QString *t)
|
||||
{
|
||||
int pos = 0;
|
||||
const QChar placeHolder = QLatin1Char('%');
|
||||
bool isCompatibilityStyle = false;
|
||||
do {
|
||||
const int placeHolderPos = t->indexOf(placeHolder, pos);
|
||||
if (placeHolderPos == -1)
|
||||
@@ -208,7 +208,6 @@ static void parseLicenseTemplatePlaceholders(QString *t)
|
||||
const QString keyWord = t->mid(placeHolderPos, endPlaceHolderPos + 1 - placeHolderPos);
|
||||
QString replacement;
|
||||
if (keyWordReplacement(keyWord, &replacement)) {
|
||||
isCompatibilityStyle = true;
|
||||
t->replace(placeHolderPos, keyWord.size(), replacement);
|
||||
pos = placeHolderPos + replacement.size();
|
||||
} else {
|
||||
@@ -218,8 +217,6 @@ static void parseLicenseTemplatePlaceholders(QString *t)
|
||||
}
|
||||
} while (pos < t->size());
|
||||
|
||||
if (isCompatibilityStyle)
|
||||
t->replace(QLatin1Char('\\'), QLatin1String("\\\\"));
|
||||
}
|
||||
|
||||
// Convenience that returns the formatted license template.
|
||||
|
||||
Reference in New Issue
Block a user