mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 05:34:34 +00:00
added libVersion method
This commit is contained in:
parent
adc8c103b5
commit
eb82ca72e7
3
.gitignore
vendored
3
.gitignore
vendored
@ -46,3 +46,6 @@ CMakeLists.txt.user*
|
||||
CMakeFiles
|
||||
*_autogen
|
||||
cmake_install.cmake
|
||||
|
||||
#cmake
|
||||
notifyservice_global.h
|
||||
|
2
CMake
2
CMake
@ -1 +1 @@
|
||||
Subproject commit cd05493c3a43b04f26c3e3432df4283eb4509d8c
|
||||
Subproject commit 2acf202cf167a89cac108620f1a541525766dbb8
|
@ -47,7 +47,13 @@ set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/en.ts
|
||||
|
||||
prepareQM( ${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} "${LANGS}")
|
||||
|
||||
setVersion(1 0 1)
|
||||
|
||||
updateGitVars()
|
||||
setVersion(1 0 ${GIT_COMMIT_COUNT})
|
||||
|
||||
set(QML_NOTIFY_VERSION 1.0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH})
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/notifyservice_global.h.in ${CMAKE_CURRENT_SOURCE_DIR}/notifyservice_global.h @ONLY)
|
||||
|
||||
initAll()
|
||||
|
||||
|
@ -95,6 +95,10 @@ int NotificationService::setQuestion(const Listner& listner,
|
||||
return setQuestion(listner, NotificationData(title, text, img, code));
|
||||
}
|
||||
|
||||
QString NotificationService::libVersion() {
|
||||
return QML_NOTIFY_VERSION;
|
||||
}
|
||||
|
||||
NotificationService *NotificationService::getService() {
|
||||
static auto service = new NotificationService;
|
||||
return service;
|
||||
|
@ -101,6 +101,11 @@ public:
|
||||
const QString& img = "",
|
||||
int code = 0);
|
||||
|
||||
/**
|
||||
* @brief libVersion This method return string value of the version of this library.
|
||||
* @return string value of the version of this library.
|
||||
*/
|
||||
static QString libVersion();
|
||||
|
||||
/**
|
||||
* @brief getService This method return instance to notify service.
|
||||
|
@ -9,5 +9,6 @@
|
||||
# define NOTIFYSERVICESHARED_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#define QML_NOTIFY_VERSION "@QML_NOTIFY_VERSION@"
|
||||
|
||||
#endif // NOTIFYSERVICE_GLOBAL_H
|
Loading…
x
Reference in New Issue
Block a user