Summary: | %date% and %time% not being parsed | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Pedro Algarvio <ufs> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.3.2 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch for #96612 |
Description
Pedro Algarvio
2005-01-09 02:00:28 UTC
Prior to this version, I had the ones provided by mandrake, I then compiled the new one over the old. Also, the code generation wizzard doesn't seem to work, but if i just tell umbrello to generate the code, it will Other code generators do not parse these variables either. Works for C++ though. Still this does not work in Umbrello 1.4.92. Java and C++ will parse %date% and %time% correctly, PHP and PHP5 does not. Any other variables work. Best regards Thomas I see its not parsing the %date% %time% in php. Also can the comments be wrapped to 70 characters? Created attachment 19707 [details]
patch for #96612
The modified file is codegenerationpolicy.cpp
The function getHeading now replaces the variables %date% and %time% by their
values.
There was a comment which said "the replace filepath, time parts are now in the
code document updateHeader method (which you may override as needed).."
But :
1) the function updateHeader was never called during the execution of the code
generators
2) this function is non virtual
Have a nice day
SVN commit 634255 by okellogg: getHeadingFile(): Attachment 19707 [details] from Antoine Dopffer adds substitution of %time% and %date% with the current time and date. BUG:96612 M +1 -0 ChangeLog M +1 -0 THANKS M +5 -1 umbrello/codegenerationpolicy.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #634254:634255 @@ -1,6 +1,7 @@ Version 1.5.7 * Bugs fixed from http://bugs.kde.org: +* %date% and %time% not being parsed (96612) * Relationships for entities do not live outside of an entity relationship diagram (125146) * Javascript Code Generation creates bad format methods (135540) * Crash when deleting the link between a package and a class (141602) --- branches/KDE/3.5/kdesdk/umbrello/THANKS #634254:634255 @@ -26,6 +26,7 @@ Albert Astals Cid <tsdgeos @terra.es> Richard Dale <duke @tipitina.demon.co.uk> Vincent Decorges <vincent.decorges @eivd.ch> +Antoine Dopffer <adopffer @nerdshack.com> Alan Ezust <alan.ezust @gmail.com> Jean-Remy Falleri <jr.falleri @gmail.com> Andi Fischer <andi.fischer @hispeed.ch> --- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerationpolicy.cpp #634254:634255 @@ -24,6 +24,7 @@ #include <qstringlist.h> #include <qregexp.h> #include <qtextstream.h> +#include <qdatetime.h> // kde includes #include <kconfig.h> @@ -551,7 +552,10 @@ //do variable substitution retstr.replace( QRegExp("%author%"),QString(getenv("USER"))); //get the user name from some where else retstr.replace( QRegExp("%headingpath%"),filename ); - //the replace filepath, time parts are now in the code document updateHeader method (which you may override as needed)... + retstr.replace( QRegExp("%time%"), QTime::currentTime().toString()); + retstr.replace( QRegExp("%date%"), QDate::currentDate().toString()); + // the replace filepath, time parts are also in the code document updateHeader method + // (which is not a virtual function)... return retstr; } Hi one question: In which version of Umbrello is this fix gone? In 1.5.6 this bug still exists. Is it only available for KDE 4? Best Regards Thomas > In which version of Umbrello is this fix gone? 1.5.7 was not yet released but you can grab the SVN wavefront, see http://uml.sourceforge.net/install.php#source-code I tested the svn version and it works. Thanks. Best Regards Thomas |