File indexing completed on 2024-05-12 16:39:37
0001 /* This file is part of the KDE project 0002 Copyright (C) 2003-2012 Jarosław Staniek <staniek@kde.org> 0003 0004 (version information based on KexiVersion.h) 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Library General Public License for more details. 0015 0016 You should have received a copy of the GNU Library General Public License 0017 along with this library; see the file COPYING.LIB. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 */ 0021 0022 #include "KexiVersion.h" 0023 0024 #include <QString> 0025 0026 #ifdef KEXI_STABLE 0027 # define KEXI_BASE_VERSION KEXI_VERSION_STRING " (" 0028 # define KEXI_VERSION_SEP "" 0029 #else 0030 # define KEXI_BASE_VERSION KEXI_VERSION_STRING " (" KEXI_VERSION_MAJOR_MINOR_RELEASE 0031 # define KEXI_VERSION_SEP ", " 0032 #endif 0033 0034 static const char FULL_VERSION[] 0035 #ifdef KEXI_GIT_SHA1_STRING 0036 # ifdef KEXI_GIT_BRANCH_STRING 0037 = KEXI_BASE_VERSION KEXI_VERSION_SEP "git " KEXI_GIT_SHA1_STRING " " KEXI_GIT_BRANCH_STRING ")"; 0038 # else 0039 = KEXI_BASE_VERSION KEXI_VERSION_SEP "git " KEXI_GIT_SHA1_STRING ")"; 0040 # endif 0041 #else 0042 = KEXI_BASE_VERSION ")"; 0043 #endif 0044 0045 KEXICORE_EXPORT unsigned int Kexi::version() 0046 { 0047 return KEXI_VERSION; 0048 } 0049 0050 KEXICORE_EXPORT unsigned int Kexi::versionMajor() 0051 { 0052 return KEXI_VERSION_MAJOR; 0053 } 0054 0055 KEXICORE_EXPORT unsigned int Kexi::versionMinor() 0056 { 0057 return KEXI_VERSION_MINOR; 0058 } 0059 0060 KEXICORE_EXPORT unsigned int Kexi::versionRelease() 0061 { 0062 return KEXI_VERSION_RELEASE; 0063 } 0064 0065 KEXICORE_EXPORT const char *Kexi::versionString() 0066 { 0067 return KEXI_VERSION_STRING; 0068 } 0069 0070 KEXICORE_EXPORT const char *Kexi::fullVersionString() 0071 { 0072 return FULL_VERSION; 0073 } 0074 0075 KEXICORE_EXPORT unsigned int Kexi::stableVersionMajor() 0076 { 0077 return KEXI_STABLE_VERSION_MAJOR; 0078 } 0079 0080 KEXICORE_EXPORT unsigned int Kexi::stableVersionMinor() 0081 { 0082 return KEXI_STABLE_VERSION_MINOR; 0083 } 0084 0085 KEXICORE_EXPORT unsigned int Kexi::stableVersionRelease() 0086 { 0087 return KEXI_STABLE_VERSION_RELEASE; 0088 } 0089 0090 KEXICORE_EXPORT QString Kexi::stableVersionString() 0091 { 0092 return QString::number(stableVersionMajor()) + '.' 0093 + QString::number(stableVersionMinor()) + '.' 0094 + QString::number(stableVersionRelease()); 0095 }