1 | /* ============================================================ |
---|
2 | * |
---|
3 | * This file is a part of kipi-plugins project |
---|
4 | * http://www.kipi-plugins.org |
---|
5 | * |
---|
6 | * Date : 2006-14-09 |
---|
7 | * Description : Kipi-Plugins release ID header. |
---|
8 | * |
---|
9 | * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> |
---|
10 | * |
---|
11 | * This program is free software; you can redistribute it |
---|
12 | * and/or modify it under the terms of the GNU General |
---|
13 | * Public License as published by the Free Software Foundation; |
---|
14 | * either version 2, or (at your option) any later version. |
---|
15 | * |
---|
16 | * This program is distributed in the hope that it will be useful, |
---|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
19 | * GNU General Public License for more details. |
---|
20 | * |
---|
21 | * ============================================================ */ |
---|
22 | |
---|
23 | #ifndef KIPIPLUGINS_VERSION_H |
---|
24 | #define KIPIPLUGINS_VERSION_H |
---|
25 | |
---|
26 | // Qt includes. |
---|
27 | |
---|
28 | #include <QString> |
---|
29 | |
---|
30 | // KDE includes. |
---|
31 | |
---|
32 | #include <klocale.h> |
---|
33 | |
---|
34 | // Local includes. |
---|
35 | |
---|
36 | #include <svnversion.h> |
---|
37 | |
---|
38 | static const char kipiplugins_version[] = "1.0.0"; |
---|
39 | |
---|
40 | static inline const QString kipipluginsVersion() |
---|
41 | { |
---|
42 | // We only take the mixed revision |
---|
43 | QString svnVer = QString(SVNVERSION).section(":", 0, 0); |
---|
44 | |
---|
45 | QString kipipluginsVer = QString(kipiplugins_version); |
---|
46 | if (!svnVer.isEmpty() && !svnVer.startsWith("unknow") && !svnVer.startsWith("export")) |
---|
47 | kipipluginsVer = i18nc("%1 is kipi-plugins version, %2 is the svn revision", "%1 (rev.: %2)", kipiplugins_version, svnVer); |
---|
48 | |
---|
49 | return kipipluginsVer; |
---|
50 | } |
---|
51 | |
---|
52 | #endif // KIPIPLUGINS_VERSION_H |
---|