"Fossies" - the Fresh Open Source Software Archive

Member "texstudio-2.12.22/src/utilsVersion.h" (15 Jan 2020, 1538 Bytes) of package /linux/misc/texstudio-2.12.22.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "utilsVersion.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.12.20_vs_2.12.22.

    1 #ifndef UTILSVERSION_H
    2 #define UTILSVERSION_H
    3 
    4 #define TEXSTUDIO "TeXstudio"
    5 #define TXSVERSION "2.12.22"
    6 
    7 #define TXSVERSION_NUMERIC 0x021222
    8 
    9 #define IS_DEVELOPMENT_VERSION (TXSVERSION_NUMERIC & 0x000001)
   10 
   11 extern const char *TEXSTUDIO_GIT_REVISION;
   12 
   13 #ifdef QT_NO_DEBUG
   14 #define COMPILED_DEBUG_OR_RELEASE "R"
   15 #else
   16 #define COMPILED_DEBUG_OR_RELEASE "D"
   17 #endif
   18 
   19 #include "mostQtHeaders.h"
   20 
   21 int gitRevisionToInt(const char *);
   22 
   23 class Version
   24 {
   25 public:
   26     enum VersionCompareResult {Invalid = -2, Lower = -1, Same = 0, Higher = 1};
   27     static VersionCompareResult compareStringVersion(const QString &v1, const QString &v2);
   28     static VersionCompareResult compareIntVersion(const QList<int> &v1, const QList<int> &v2);
   29     static QList<int> parseVersionNumber(const QString &versionNumber);
   30     static bool versionNumberIsValid(const QString &versionNumber);
   31     static int parseGitRevisionNumber(const QString &revision);
   32 
   33     Version() : revision(0) {}
   34     Version(QString number, int rev = 0) : versionNumber(number), revision(rev) {}
   35     Version(QString number, QString tp,int rev = 0) : versionNumber(number), type(tp), revision(rev) {}
   36     static Version current();
   37 
   38     QString platform;       // "win" or "mac" or "linux"
   39     QString versionNumber;  // "2.10.2"
   40     QString type;           // "stable", "release candidate" or "development"
   41     int revision;           // 5310, now changed to revision after tag as deliverd by "git describe"
   42 
   43     bool operator > (const Version &other) const;
   44 
   45     bool isEmpty() const;
   46     bool isValid() const;
   47 
   48 };
   49 #endif // UTILSVERSION_H