Skip to content
Snippets Groups Projects
Commit 3b70e944 authored by Francois Ferrand's avatar Francois Ferrand Committed by Oswald Buddenhagen
Browse files

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


Merge-request: 199
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent dbd39652
No related branches found
No related tags found
No related merge requests found
...@@ -7324,6 +7324,8 @@ ...@@ -7324,6 +7324,8 @@
\list 1 \list 1
\o \c %YEAR%: Year \o \c %YEAR%: Year
\o \c %MONTH%: Month
\o \c %DAY%: Day of the month
\o \c %DATE%: Date \o \c %DATE%: Date
\o \c %USER%: User name \o \c %USER%: User name
\o \c %FILENAME%: File name \o \c %FILENAME%: File name
......
...@@ -116,6 +116,14 @@ static bool keyWordReplacement(const QString &keyWord, ...@@ -116,6 +116,14 @@ static bool keyWordReplacement(const QString &keyWord,
*value = QString::number(QDate::currentDate().year()); *value = QString::number(QDate::currentDate().year());
return true; 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%")) { if (keyWord == QLatin1String("%CLASS%")) {
*value = className; *value = className;
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment