forked from qt-creator/qt-creator
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:
committed by
Oswald Buddenhagen
parent
dbd3965241
commit
3b70e944a3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user