Grantlee
5.2.0
|
Several porting steps are necessary when porting code from Grantlee 0.5 to Grantlee 5.0 and later.
The grantlee_add_plugin
CMake macro has been removed. Users should now use the CMake command add_library(MODULE)
, link to the Grantlee Templates library, and use the grantlee_adjust_plugin_name
macro with the created target.
The Grantlee_USE_FILE is obsolete and has been removed. Users should remove code such as
include(${Grantlee_USE_FILE})
from their buildsystems.
The CMake packages shipped with Grantlee contain IMPORTED targets which should be used with the target_link_libraries
command. Variables such as Grantlee_TEMPLATES_LIBRARIES
are no longer provided.
Idiomatic use of Grantlee in the buildsystem is now similar to:
find_package(Grantlee5 REQUIRED) add_executable(main main.cpp) target_link_libraries(main Grantlee5::Templates )
The previous major release of Grantlee shipped a CMake package findable with
find_package(Grantlee REQUIRED)
For Grantlee 5.0 the package was renamed to include the major version number:
find_package(Grantlee5 REQUIRED)
User code should simply remove the use of the macro.
The virtual method render on Grantlee::Node is now const
. User code which creates custom plugins and overrides the render method must be updated to add the const
too.
Users of LocalizedFileSystemTemplateLoader
can now use FileSystemTemplateLoader instead.
Replace uses of FileSystemTemplateLoader::Ptr
with QSharedPointer<FileSystemTemplateLoader> for example.