diff --git a/src/kileversion.cpp b/src/kileversion.cpp index db9fe86c..6ccb8ba3 100644 --- a/src/kileversion.cpp +++ b/src/kileversion.cpp @@ -1,43 +1,44 @@ /************************************************************************** * Copyright (C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net) * ***************************************************************************/ /************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "kileversion.h" #include int compareVersionStrings(const QString& s1, const QString& s2) { - QStringList l1 = s1.split('.'); - QStringList l2 = s2.split('.'); - while(l1.size() < 3) { - l1.push_back("0"); - } - while(l2.size() < 3) { - l2.push_back("0"); - } - QStringList::iterator i1 = l1.begin(); - QStringList::iterator i2 = l2.begin(); - for(unsigned int i = 0; i < 3; ++i) { - unsigned int c1 = (*i1).toUInt(); - unsigned int c2 = (*i2).toUInt(); - if(c1 < c2) { - return -1; - } - else if(c1 > c2) { - return 1; - } - ++i1; - ++i2; - } - return 0; + QStringList l1 = s1.split('.'); + QStringList l2 = s2.split('.'); + while(l1.size() < 3) { + l1.push_back("0"); + } + while(l2.size() < 3) { + l2.push_back("0"); + } + QStringList::iterator i1 = l1.begin(); + QStringList::iterator i2 = l2.begin(); + for(unsigned int i = 0; i < 3; ++i) { + unsigned int c1 = (*i1).toUInt(); + unsigned int c2 = (*i2).toUInt(); + if(c1 < c2) { + return -1; + } + else if(c1 > c2) { + return 1; + } + ++i1; + ++i2; + } + return 0; } +// kate: replace-tabs: on; indent-width 4; diff --git a/src/kileversion.h b/src/kileversion.h index 1d0d815c..830699f3 100644 --- a/src/kileversion.h +++ b/src/kileversion.h @@ -1,37 +1,39 @@ /**************************************************************************************** begin : Wednesday Jan 25 2006 copyright : (C) 2006 by Thomas Braun (thomas.braun@virtuell-zuhause.de) - 2011-2017 by Michel Ludwig (michel.ludwig@kdemail.net) + 2011-2018 by Michel Ludwig (michel.ludwig@kdemail.net) ****************************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ****************************************************************************/ #ifndef KILEVERSION_H #define KILEVERSION_H #include const QString kileVersion="3.0 alpha 1"; const QString kileFullVersion="2.9.92"; // only use numbers and '.' #define KILE_PROJECTFILE_VERSION 3 #define KILERC_VERSION 8 // the last-copyright-year is used in 'main.cpp' and 'CMakeLists.txt' -#define KILE_LAST_COPYRIGHT_YEAR 2017 +#define KILE_LAST_COPYRIGHT_YEAR 2018 /** * Compares two strings of the form "a.b(.c)" and "d.e(.f)" lexicographically, * where a, b, c, d, e and f are natural numbers. * @return 1 if s1 is bigger than s2, 0 if s1 == s2, -1 if s1 is smaller than s2 **/ int compareVersionStrings(const QString& s1, const QString& s2); #endif + +// kate: replace-tabs: on; indent-width 4;