Support new keywords %MONTH% and %DAY% for C++ template file.

Merge-request: 199
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Francois Ferrand
2010-10-28 12:13:47 +02:00
committed by Oswald Buddenhagen
parent dbd3965241
commit 3b70e944a3
2 changed files with 10 additions and 0 deletions

View File

@@ -116,6 +116,14 @@ static bool keyWordReplacement(const QString &keyWord,
*value = QString::number(QDate::currentDate().year());
return true;
}
if (keyWord == QLatin1String("%MONTH%")) {
*value = QString::number(QDate::currentDate().month());
return true;
}
if (keyWord == QLatin1String("%DAY%")) {
*value = QString::number(QDate::currentDate().day());
return true;
}
if (keyWord == QLatin1String("%CLASS%")) {
*value = className;
return true;