| 1 |
/* |
| 2 |
* Copyright (C) 2013-2015, 2019 by the Konclude Developer Team. |
| 3 |
* |
| 4 |
* This file is part of the reasoning system Konclude. |
| 5 |
* For details and support, see <http://konclude.com/>. |
| 6 |
* |
| 7 |
* Konclude is free software: you can redistribute it and/or modify |
| 8 |
* it under the terms of version 3 of the GNU Lesser General Public |
| 9 |
* License (LGPLv3) as published by the Free Software Foundation. |
| 10 |
* |
| 11 |
* Konclude is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU (Lesser) General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU (Lesser) General Public |
| 17 |
* License along with Konclude. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
* |
| 19 |
*/ |
| 20 |
|
| 21 |
#include "CKoncludeInfo.h" |
| 22 |
#include "revision-git.h" |
| 23 |
|
| 24 |
|
| 25 |
namespace Konclude { |
| 26 |
|
| 27 |
|
| 28 |
CKoncludeInfo::CKoncludeInfo() { |
| 29 |
} |
| 30 |
|
| 31 |
|
| 32 |
QString CKoncludeInfo::getKoncludeName() { |
| 33 |
return KONCLUDE_NAME; |
| 34 |
} |
| 35 |
|
| 36 |
QString CKoncludeInfo::getKoncludeNameExtension() { |
| 37 |
return KONCLUDE_NAME_EXTENSION; |
| 38 |
} |
| 39 |
|
| 40 |
QString CKoncludeInfo::getKoncludeDescription() { |
| 41 |
return KONCLUDE_DESCRIPTION; |
| 42 |
} |
| 43 |
|
| 44 |
QString CKoncludeInfo::getKoncludeVersionString() { |
| 45 |
return QString(KONCLUDE_VERSION_GIT_TAG_NAME_STRING)+QString("-%1 - ").arg(KONCLUDE_VERSION_GIT_REVISION_NUMBER)+QString(KONCLUDE_VERSION_GIT_REVISION_HASH_STRING); |
| 46 |
} |
| 47 |
|
| 48 |
QString CKoncludeInfo::getKoncludeCompilationDateString() { |
| 49 |
return QString(__DATE__); |
| 50 |
} |
| 51 |
|
| 52 |
QString CKoncludeInfo::getKoncludeBitPlatformString() { |
| 53 |
return QString("%1-bit").arg(sizeof(void*)*8); |
| 54 |
} |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
int CKoncludeInfo::getKoncludeMajorVersionNumber() { |
| 59 |
int majorVersionNumber = KONCLUDE_VERSION_MAJOR; |
| 60 |
QStringList splittedList = QString(KONCLUDE_VERSION_GIT_TAG_NAME_STRING).split("."); |
| 61 |
if (splittedList.count() >= 3) { |
| 62 |
QString majorVersionString = splittedList.first(); |
| 63 |
bool successfulConverted = false; |
| 64 |
int majorVersionNumberConv = majorVersionString.toInt(&successfulConverted); |
| 65 |
if (successfulConverted) { |
| 66 |
majorVersionNumber = majorVersionNumberConv; |
| 67 |
} |
| 68 |
} |
| 69 |
return majorVersionNumber; |
| 70 |
} |
| 71 |
|
| 72 |
int CKoncludeInfo::getKoncludeMinorVersionNumber() { |
| 73 |
int minorVersionNumber = KONCLUDE_VERSION_MINOR; |
| 74 |
QStringList splittedList = QString(KONCLUDE_VERSION_GIT_TAG_NAME_STRING).split("."); |
| 75 |
if (splittedList.count() >= 3) { |
| 76 |
QString minorVersionString = splittedList.at(1); |
| 77 |
bool successfulConverted = false; |
| 78 |
int minorVersionNumberConv = minorVersionString.toInt(&successfulConverted); |
| 79 |
if (successfulConverted) { |
| 80 |
minorVersionNumber = minorVersionNumberConv; |
| 81 |
} |
| 82 |
} |
| 83 |
return minorVersionNumber; |
| 84 |
} |
| 85 |
|
| 86 |
int CKoncludeInfo::getKoncludeBuildVersionNumber() { |
| 87 |
int buildVersionNumber = KONCLUDE_VERSION_BUILD; |
| 88 |
QStringList splittedList = QString(KONCLUDE_VERSION_GIT_TAG_NAME_STRING).split("."); |
| 89 |
if (splittedList.count() >= 3) { |
| 90 |
QString buildVersionString = splittedList.at(2); |
| 91 |
bool successfulConverted = false; |
| 92 |
int buildVersionNumberConv = buildVersionString.toInt(&successfulConverted); |
| 93 |
if (successfulConverted) { |
| 94 |
buildVersionNumber = buildVersionNumberConv; |
| 95 |
} |
| 96 |
} |
| 97 |
return buildVersionNumber; |
| 98 |
} |
| 99 |
|
| 100 |
int CKoncludeInfo::getKoncludeRevisionVersionNumber() { |
| 101 |
int revisionVersionNumber = KONCLUDE_VERSION_GIT_REVISION_NUMBER; |
| 102 |
return revisionVersionNumber; |
| 103 |
} |
| 104 |
|
| 105 |
|
| 106 |
}; // end namespace Konclude |