Grantlee  5.1.0
Porting from Qt4-based Grantlee

Several porting steps are necessary when porting code from Grantlee 0.5 to Grantlee 5.0.

Buildsystem changes

grantlee_add_plugin Removed

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.

Grantlee_USE_FILE removed

The Grantlee_USE_FILE is obsolete and has been removed. Users should remove code such as

include(${Grantlee_USE_FILE})

from their buildsystems.

Use IMPORTED targets

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
)

CMake Package name changed

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)

C++ porting

GRANTLEE_METATYPE_INITIALIZE macro removed

User code should simply remove the use of the macro.

Grantlee::Node::render method is now const

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.

LocalizedFileSystemTemplateLoader merged into FileSystemTemplateLoader

Users of LocalizedFileSystemTemplateLoader can now use FileSystemTemplateLoader instead.

QSharedPointer typedefs named "Ptr" have been removed.

Replace uses of FileSystemTemplateLoader::Ptr with QSharedPointer<FileSystemTemplateLoader> for example.