diff --git a/CMakeLists.txt b/CMakeLists.txt index f3db5cf..050eefa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.20) project(FramelessHelper - VERSION 2.3.5.0 + VERSION 2.3.5 DESCRIPTION "Cross-platform window customization framework for Qt Widgets and Qt Quick." HOMEPAGE_URL "https://github.com/wangwenx190/framelesshelper/" ) diff --git a/FramelessHelperConfig.cmake.in b/FramelessHelperConfig.cmake.in index dc650f6..80b681e 100644 --- a/FramelessHelperConfig.cmake.in +++ b/FramelessHelperConfig.cmake.in @@ -46,5 +46,5 @@ if(NOT DEFINED @PROJECT_NAME@_FOUND) set(@PROJECT_NAME@_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@") set(@PROJECT_NAME@_VERSION_MINOR "@PROJECT_VERSION_MINOR@") set(@PROJECT_NAME@_VERSION_PATCH "@PROJECT_VERSION_PATCH@") - set(@PROJECT_NAME@_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@") + #set(@PROJECT_NAME@_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@") endif() diff --git a/include/FramelessHelper/Core/framelesshelpercore_global.h b/include/FramelessHelper/Core/framelesshelpercore_global.h index eabb33c..6a3eb9a 100644 --- a/include/FramelessHelper/Core/framelesshelpercore_global.h +++ b/include/FramelessHelper/Core/framelesshelpercore_global.h @@ -179,23 +179,22 @@ QT_END_NAMESPACE #endif #ifndef FRAMELESSHELPER_MAKE_VERSION -# define FRAMELESSHELPER_MAKE_VERSION(Major, Minor, Patch, Tweak) \ - ((((Major) & 0xff) << 24) | (((Minor) & 0xff) << 16) | (((Patch) & 0xff) << 8) | ((Tweak) & 0xff)) +# define FRAMELESSHELPER_MAKE_VERSION(Major, Minor, Patch) \ + ((((Major) & 0xff) << 24) | (((Minor) & 0xff) << 16) | (((Patch) & 0xff) << 8)) #endif #ifndef FRAMELESSHELPER_EXTRACT_VERSION -# define FRAMELESSHELPER_EXTRACT_VERSION(Version, Major, Minor, Patch, Tweak) \ +# define FRAMELESSHELPER_EXTRACT_VERSION(Version, Major, Minor, Patch) \ { \ (Major) = (((Version) & 0xff) >> 24); \ (Minor) = (((Version) & 0xff) >> 16); \ (Patch) = (((Version) & 0xff) >> 8); \ - (Tweak) = ((Version) & 0xff); \ } #endif #ifndef FRAMELESSHELPER_CORE_NO_BUNDLE_RESOURCE // Call this function in your main() function if you built FramelessHelper as a static library. -extern "C" FRAMELESSHELPER_CORE_API void framelesshelpercore_initResource(); +FRAMELESSHELPER_CORE_API void framelesshelpercore_initResource(); #endif // FRAMELESSHELPER_CORE_NO_BUNDLE_RESOURCE FRAMELESSHELPER_BEGIN_NAMESPACE @@ -203,8 +202,10 @@ FRAMELESSHELPER_BEGIN_NAMESPACE #include "framelesshelper.version" [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION = - FRAMELESSHELPER_MAKE_VERSION(FRAMELESSHELPER_VERSION_MAJOR, FRAMELESSHELPER_VERSION_MINOR, - FRAMELESSHELPER_VERSION_PATCH, FRAMELESSHELPER_VERSION_TWEAK); + FRAMELESSHELPER_MAKE_VERSION( + FRAMELESSHELPER_VERSION_MAJOR, + FRAMELESSHELPER_VERSION_MINOR, + FRAMELESSHELPER_VERSION_PATCH); namespace Global { diff --git a/qmake/inc/core/framelesshelper.version b/qmake/inc/core/framelesshelper.version index 14cc5bb..a21e79b 100644 --- a/qmake/inc/core/framelesshelper.version +++ b/qmake/inc/core/framelesshelper.version @@ -28,17 +28,17 @@ // Also please do not include this file directly, // it's designed to be included by FramelessHelper's own headers. +#pragma once + #ifndef _FRAMELESSHELPER_VERSION_DEFINED_ #define _FRAMELESSHELPER_VERSION_DEFINED_ -#pragma once - [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MAJOR = 2; [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MINOR = 3; [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_PATCH = 5; -[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_TWEAK = 0; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "2.3.5.0\0"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "UNKNOWN\0"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILE_DATETIME_STR[] = "UNKNOWN\0"; +//[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_TWEAK = 0; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "2.3.5"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILE_DATETIME_STR[] = "UNKNOWN"; #endif // _FRAMELESSHELPER_VERSION_DEFINED_ diff --git a/src/core/framelesshelper.version.in b/src/core/framelesshelper.version.in index 4a391ce..061be9d 100644 --- a/src/core/framelesshelper.version.in +++ b/src/core/framelesshelper.version.in @@ -28,17 +28,17 @@ // Also please do not include this file directly, // it's designed to be included by FramelessHelper's own headers. +#pragma once + #ifndef _FRAMELESSHELPER_VERSION_DEFINED_ #define _FRAMELESSHELPER_VERSION_DEFINED_ -#pragma once - [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@; [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MINOR = @PROJECT_VERSION_MINOR@; [[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_PATCH = @PROJECT_VERSION_PATCH@; -[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_TWEAK = @PROJECT_VERSION_TWEAK@; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "@PROJECT_VERSION@\0"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "@PROJECT_VERSION_COMMIT@\0"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILE_DATETIME_STR[] = "@PROJECT_COMPILE_DATETIME@\0"; +//[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_TWEAK = @PROJECT_VERSION_TWEAK@; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "@PROJECT_VERSION@"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "@PROJECT_VERSION_COMMIT@"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILE_DATETIME_STR[] = "@PROJECT_COMPILE_DATETIME@"; #endif // _FRAMELESSHELPER_VERSION_DEFINED_ diff --git a/src/core/framelesshelpercore_global.cpp b/src/core/framelesshelpercore_global.cpp index be8fb2a..93f5a7c 100644 --- a/src/core/framelesshelpercore_global.cpp +++ b/src/core/framelesshelpercore_global.cpp @@ -71,9 +71,9 @@ QDebug operator<<(QDebug d, const FRAMELESSHELPER_PREPEND_NAMESPACE(VersionNumbe QDebug operator<<(QDebug d, const FRAMELESSHELPER_PREPEND_NAMESPACE(Global)::VersionInfo &ver) { const QDebugStateSaver saver(d); - int major = 0, minor = 0, patch = 0, tweak = 0; - FRAMELESSHELPER_EXTRACT_VERSION(ver.version, major, minor, patch, tweak) - const auto ver_num = FRAMELESSHELPER_PREPEND_NAMESPACE(VersionNumber){major, minor, patch, tweak}; + int major = 0, minor = 0, patch = 0; + FRAMELESSHELPER_EXTRACT_VERSION(ver.version, major, minor, patch) + const auto ver_num = FRAMELESSHELPER_PREPEND_NAMESPACE(VersionNumber){major, minor, patch}; d.nospace().noquote() << "VersionInfo(" << "version number: " << ver_num << ", " << "version string: " << ver.version_str << ", " @@ -102,7 +102,7 @@ QT_END_NAMESPACE // so we wrap it into a separate function outside of the namespace and // then call it instead inside the namespace, that's also the recommended // workaround provided by Qt's official documentation. -extern "C" void framelesshelpercore_initResource() +void framelesshelpercore_initResource() { Q_INIT_RESOURCE(framelesshelpercore); }