annotate src/UiGuiVersion.cpp @ 768:f3631db17328

Updated all date occurrences to the year 2011. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1045 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Thu, 21 Apr 2011 15:17:51 +0000
parents aae5a8d04f70
children fa7aa6f543f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
649
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
1 /***************************************************************************
768
f3631db17328 Updated all date occurrences to the year 2011.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 727
diff changeset
2 * Copyright (C) 2006-2011 by Thomas Schweitzer *
649
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
3 * thomas-schweitzer(at)arcor.de *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
4 * *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
6 * it under the terms of the GNU General Public License version 2.0 as *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
7 * published by the Free Software Foundation. *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
8 * *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful, *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
12 * GNU General Public License for more details. *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
13 * *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
15 * along with this program in the file LICENSE.GPL; if not, write to the *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
16 * Free Software Foundation, Inc., *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
18 ***************************************************************************/
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
19
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
20 #include "UiGuiVersion.h"
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
21
652
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
22 #include <QString>
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
23 #include <QStringList>
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
24 #include <QDate>
649
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
25
652
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
26 namespace UiGuiVersion {
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
27 /*!
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
28 \brief Returns the build date as a localized string, e.g. "9. Februar 2009". If
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
29 there was some kind of error, the returned string is empty.
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
30 */
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
31 QString getBuildDate() {
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
32 QStringList monthNames;
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
33 QString buildDateString = "";
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
34
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
35 monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dez";
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
36 QStringList buildDateStringList = QString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009"
714
3363b7bb0d41 Once more let Uncrustify reformat my code.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 652
diff changeset
37
652
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
38 if ( buildDateStringList.count() == 3 ) {
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
39 QDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt());
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
40 buildDateString = buildDate.toString("d. MMMM yyyy");
649
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
41 }
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
42
652
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
43 return buildDateString;
649
2272223c990b Prepared for use of extra version file and version info in the executable file for Windows.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
diff changeset
44 }
652
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
45
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
46
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
47 /*!
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
48 \brief Returns the revision number, that the current build is based on, as string. If
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
49 there was some kind of error, the returned string is empty.
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
50 */
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
51 QString getBuildRevision() {
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
52 QString buildRevision = "";
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
53 QStringList buildRevisionStringList = QString(PROGRAM_REVISION).simplified().split(' ');
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
54
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
55 if ( buildRevisionStringList.count() == 3 ) {
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
56 buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $"
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
57 }
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
58
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
59 return buildRevision;
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
60 }
d7b4ce40ceb9 From now on using an extra file and functions for gathering the version, build date and revision. This uncouples the connection between the MainWindow and AboutDialog and UpdateCheckDialog a bit by reducing the number of needed constructor parameters.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents: 649
diff changeset
61 } // namespace UiGuiVersion