diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-08-05 10:54:12 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-08-05 11:10:14 +0900 |
commit | 430373ae38565e0d7f62b8fca0cbad73de73ec7f (patch) | |
tree | 670a7322ddd2732c8824b1fb73090b937e2a1f82 /src/UiGuiVersion.cpp | |
parent | d833de5bbe40d780fe02dc95d1c981a4b1007108 (diff) | |
download | universal-indent-gui-tqt-430373ae38565e0d7f62b8fca0cbad73de73ec7f.tar.gz universal-indent-gui-tqt-430373ae38565e0d7f62b8fca0cbad73de73ec7f.zip |
Format code using uncrustify
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/UiGuiVersion.cpp')
-rw-r--r--[-rwxr-xr-x] | src/UiGuiVersion.cpp | 81 |
1 files changed, 45 insertions, 36 deletions
diff --git a/src/UiGuiVersion.cpp b/src/UiGuiVersion.cpp index 9564e4e..4246644 100755..100644 --- a/src/UiGuiVersion.cpp +++ b/src/UiGuiVersion.cpp @@ -23,39 +23,48 @@ #include <tntqstringlist.h> #include <tqdate.h> -namespace UiGuiVersion { -/*! - \brief Returns the build date as a localized string, e.g. "9. Februar 2009". If - there was some kind of error, the returned string is empty. - */ -TQString getBuildDate() { - TQStringList monthNames; - TQString buildDateString = ""; - - monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dez"; - TQStringList buildDateStringList = TQString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009" - - if ( buildDateStringList.count() == 3 ) { - TQDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt()); - buildDateString = buildDate.toString("d. MMMM yyyy"); - } - - return buildDateString; -} - - -/*! - \brief Returns the revision number, that the current build is based on, as string. If - there was some kind of error, the returned string is empty. - */ -TQString getBuildRevision() { - TQString buildRevision = ""; - TQStringList buildRevisionStringList = TQString(PROGRAM_REVISION).simplified().split(' '); - - if ( buildRevisionStringList.count() == 3 ) { - buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $" - } - - return buildRevision; -} -} // namespace UiGuiVersion +namespace UiGuiVersion +{ + /*! + \brief Returns the build date as a localized string, e.g. "9. Februar 2009". If + there was some kind of error, the returned string is empty. + */ + TQString getBuildDate() + { + TQStringList monthNames; + TQString buildDateString = ""; + + monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << + "Oct" << "Nov" << "Dez"; + TQStringList buildDateStringList = TQString(__DATE__).simplified().split(' '); // __DATE__ + // returns eg + // "Feb 4 2009" + + if (buildDateStringList.count() == 3) + { + TQDate buildDate(buildDateStringList.last().toInt(), + monthNames.indexOf(buildDateStringList.first()) + 1, + buildDateStringList.at(1).toInt()); + buildDateString = buildDate.toString("d. MMMM yyyy"); + } + + return buildDateString; + } + + /*! + \brief Returns the revision number, that the current build is based on, as string. If + there was some kind of error, the returned string is empty. + */ + TQString getBuildRevision() + { + TQString buildRevision = ""; + TQStringList buildRevisionStringList = TQString(PROGRAM_REVISION).simplified().split(' '); + + if (buildRevisionStringList.count() == 3) + { + buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $" + } + + return buildRevision; + } +} // namespace UiGuiVersion |