small cleanup for version
This commit is contained in:
parent
adb81b0fe9
commit
8a29bd339e
|
@ -5,7 +5,7 @@ include(GetGitRevisionDescription)
|
||||||
|
|
||||||
get_git_head_revision(GIT_REFSPEC SNORE_REVISION)
|
get_git_head_revision(GIT_REFSPEC SNORE_REVISION)
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/version.cpp" @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/version.cpp")
|
||||||
|
|
||||||
add_subdirectory(notification)
|
add_subdirectory(notification)
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
|
|
|
@ -1,29 +1,25 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#define SNORE_VERSION_MAJOR "@SNORE_VERSION_MAJOR@"
|
|
||||||
#define SNORE_VERSION_MINOR "@SNORE_VERSION_MINOR@"
|
|
||||||
#define SNORE_VERSION_SUFFIX "@SNORE_VERSION_SUFFIX@"
|
|
||||||
#define SNORE_REVISION "@SNORE_REVISION@"
|
|
||||||
|
|
||||||
namespace Snore{
|
namespace Snore{
|
||||||
|
|
||||||
const QString Version::version()
|
const QString Version::version()
|
||||||
{
|
{
|
||||||
return QString("%1.%2%3").arg(major(),minor(),suffix());
|
return QLatin1String("${SNORE_VERSION_MAJOR}.${SNORE_VERSION_MINOR}${SNORE_VERSION_SUFFIX}");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString Version::major(){
|
const QString Version::major(){
|
||||||
return QString(SNORE_VERSION_MAJOR);
|
return QLatin1String("${SNORE_VERSION_MAJOR}");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString Version::minor(){
|
const QString Version::minor(){
|
||||||
return QString(SNORE_VERSION_MINOR);
|
return QLatin1String("${SNORE_VERSION_MINOR}");
|
||||||
}
|
}
|
||||||
const QString Version::suffix(){
|
const QString Version::suffix(){
|
||||||
return QString(SNORE_VERSION_SUFFIX);
|
return QLatin1String("${SNORE_VERSION_SUFFIX}");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString Version::revision(){
|
const QString Version::revision(){
|
||||||
return QString(SNORE_REVISION);
|
return QLatin1String("${SNORE_REVISION}");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue