File: porting.dox

package info (click to toggle)
grantlee5 5.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,152 kB
  • sloc: cpp: 24,299; python: 413; sh: 108; ruby: 24; makefile: 20
file content (90 lines) | stat: -rw-r--r-- 2,661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

namespace Grantlee
{

/**

  @page porting_from_qt4 Porting from Qt4-based Grantlee

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

  @section buildsystem_changes Buildsystem changes

  @subsection grantlee_add_plugin_removed grantlee_add_plugin Removed

  The <tt>grantlee_add_plugin</tt> CMake macro has been removed. Users should
  now use the CMake command <tt>add_library(MODULE)</tt>, link to the %Grantlee
  Templates library, and use the <tt>grantlee_adjust_plugin_name</tt> macro
  with the created target.

  @subsection use_file_removed Grantlee_USE_FILE removed

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

  @verbatim
  include(${Grantlee_USE_FILE})
  @endverbatim

  from their buildsystems.

  @subsection use_imported_targets Use IMPORTED targets

  The CMake <a href="http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html">packages</a>
  shipped with %Grantlee contain
  <a href="http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#imported-targets">IMPORTED targets</a>
  which should be used with the <tt>target_link_libraries</tt> command. Variables such
  as <tt>Grantlee_TEMPLATES_LIBRARIES</tt> are no longer provided.

  Idiomatic use of %Grantlee in the buildsystem is now similar to:

  @verbatim
  find_package(Grantlee5 REQUIRED)

  add_executable(main main.cpp)
  target_link_libraries(main
    Grantlee5::Templates
  )
  @endverbatim

  @subsection package_numbered CMake Package name changed

  The previous major release of %Grantlee shipped a CMake package findable
  with

  @verbatim
  find_package(Grantlee REQUIRED)
  @endverbatim

  For %Grantlee 5.0 the package was renamed to include the major version
  number:

  @verbatim
  find_package(Grantlee5 REQUIRED)
  @endverbatim

  @section cpp_porting C++ porting

  @subsection initialize_removed GRANTLEE_METATYPE_INITIALIZE macro removed

  User code should simply remove the use of the macro.

  @subsection render_const 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.

  @subsection localized_template_loader LocalizedFileSystemTemplateLoader merged into FileSystemTemplateLoader

  Users of LocalizedFileSystemTemplateLoader can now use FileSystemTemplateLoader instead.

  @subsection ptr_typedefs QSharedPointer typedefs named "Ptr" have been removed.

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

*/

}