grantlee:grantlee.git
7 years agoAdd a trivial ctor.
Stephen Kelly [Tue, 14 Sep 2010 21:26:14 +0000 (23:26 +0200)]
Add a trivial ctor.

7 years agoDocument Grantlee::variantToList as deprecated.
Stephen Kelly [Mon, 13 Sep 2010 01:59:43 +0000 (03:59 +0200)]
Document Grantlee::variantToList as deprecated.

7 years agoReplace all use of Grantlee::variantToList with MetaType::toVariantList.
Stephen Kelly [Mon, 13 Sep 2010 01:58:19 +0000 (03:58 +0200)]
Replace all use of Grantlee::variantToList with MetaType::toVariantList.

7 years agoAdd support to MetaType for retrieving lists from containers in QVariants.
Stephen Kelly [Mon, 13 Sep 2010 01:50:18 +0000 (03:50 +0200)]
Add support to MetaType for retrieving lists from containers in QVariants.

7 years agoAdd API for converting a container in a QVariant into a QVariantList.
Stephen Kelly [Thu, 23 Sep 2010 01:33:34 +0000 (03:33 +0200)]
Add API for converting a container in a QVariant into a QVariantList.

7 years agoThe MetaType now allows third parties to define lookup behaviour for their own types.
Michael Jansen [Fri, 17 Sep 2010 19:39:09 +0000 (21:39 +0200)]
The MetaType now allows third parties to define lookup behaviour for their own types.

Add test to show it works.

7 years agoAdd a macro for easy definition of lookup functions.
Stephen Kelly [Sun, 12 Sep 2010 16:09:21 +0000 (18:09 +0200)]
Add a macro for easy definition of lookup functions.

7 years agoUse the Grantlee::MetaType for all variable part lookups.
Stephen Kelly [Sun, 12 Sep 2010 14:35:27 +0000 (16:35 +0200)]
Use the Grantlee::MetaType for all variable part lookups.

7 years agoAdd a method for determining if a type is already registered and register only once.
Stephen Kelly [Sun, 12 Sep 2010 21:06:09 +0000 (23:06 +0200)]
Add a method for determining if a type is already registered and register only once.

7 years agoAdd the CustomTypeRegistry.
Stephen Kelly [Sun, 12 Sep 2010 14:33:10 +0000 (16:33 +0200)]
Add the CustomTypeRegistry.

7 years agoAdd the start of the MetaType class.
Michael Jansen [Sun, 12 Sep 2010 14:26:55 +0000 (16:26 +0200)]
Add the start of the MetaType class.

7 years agoAdd support for generic lookup in sequential containers.
Stephen Kelly [Mon, 13 Sep 2010 01:17:36 +0000 (03:17 +0200)]
Add support for generic lookup in sequential containers.

7 years agoAdd api for finding an item by key in an associative container.
Stephen Kelly [Thu, 23 Sep 2010 01:17:53 +0000 (03:17 +0200)]
Add api for finding an item by key in an associative container.

7 years agoUse the ContainerAccessor to retrieve keys and values.
Stephen Kelly [Thu, 23 Sep 2010 01:10:17 +0000 (03:10 +0200)]
Use the ContainerAccessor to retrieve keys and values.

7 years agoAdd the ContainerAccessor for simple access to contained data.
Stephen Kelly [Thu, 23 Sep 2010 00:59:48 +0000 (02:59 +0200)]
Add the ContainerAccessor for simple access to contained data.

7 years agoTurn specific QVariantHash lookup into generic associative container lookup.
Stephen Kelly [Mon, 13 Sep 2010 01:07:42 +0000 (03:07 +0200)]
Turn specific QVariantHash lookup into generic associative container lookup.

7 years agoExpose the TypeAccessor template as a public interface.
Stephen Kelly [Sun, 12 Sep 2010 15:46:27 +0000 (17:46 +0200)]
Expose the TypeAccessor template as a public interface.

7 years agoAdd some missing docs.
Stephen Kelly [Thu, 7 Oct 2010 17:57:46 +0000 (19:57 +0200)]
Add some missing docs.

7 years agoSupport dynamic properties of QObjects.
Stephen Kelly [Wed, 28 Jul 2010 19:10:00 +0000 (21:10 +0200)]
Support dynamic properties of QObjects.

7 years agoGenerate the documentation as part of the release script.
Stephen Kelly [Wed, 6 Oct 2010 21:48:13 +0000 (23:48 +0200)]
Generate the documentation as part of the release script.

7 years agoFix whitespace.
Stephen Kelly [Wed, 6 Oct 2010 21:47:23 +0000 (23:47 +0200)]
Fix whitespace.

7 years agoAlways start with a clean build.
Stephen Kelly [Wed, 6 Oct 2010 21:45:51 +0000 (23:45 +0200)]
Always start with a clean build.

7 years agoProvide a way to set exceptions to moc runs and use it for blockcontext.h
Stephen Kelly [Wed, 6 Oct 2010 20:59:38 +0000 (22:59 +0200)]
Provide a way to set exceptions to moc runs and use it for blockcontext.h

Fixes a build warning.

7 years agoSplit the unit test build into different macros.
Stephen Kelly [Wed, 6 Oct 2010 19:59:43 +0000 (21:59 +0200)]
Split the unit test build into different macros.

7 years agoDisable casting from QString to QUrl.
Stephen Kelly [Wed, 6 Oct 2010 19:26:32 +0000 (21:26 +0200)]
Disable casting from QString to QUrl.

7 years agoUpdate the license to be consistent with what is in the COPYING file.
Stephen Kelly [Wed, 6 Oct 2010 18:43:10 +0000 (20:43 +0200)]
Update the license to be consistent with what is in the COPYING file.

7 years agoAdd missing @headerfile directives.
Stephen Kelly [Wed, 29 Sep 2010 08:43:32 +0000 (10:43 +0200)]
Add missing @headerfile directives.

7 years agoDon't show the used files in the docs.
Stephen Kelly [Wed, 29 Sep 2010 01:09:08 +0000 (03:09 +0200)]
Don't show the used files in the docs.

7 years agoClean the regroup filter implementation up a bit.
Stephen Kelly [Tue, 28 Sep 2010 21:42:11 +0000 (23:42 +0200)]
Clean the regroup filter implementation up a bit.

7 years agoBump the patch version in the 0.1 branch.
Stephen Kelly [Sun, 26 Sep 2010 20:34:52 +0000 (22:34 +0200)]
Bump the patch version in the 0.1 branch.

7 years agoUse static data instead of static objects in the default tags. v0.1.6
Stephen Kelly [Sat, 25 Sep 2010 17:44:08 +0000 (19:44 +0200)]
Use static data instead of static objects in the default tags.

7 years agoFix includes.
Stephen Kelly [Sat, 25 Sep 2010 17:34:50 +0000 (19:34 +0200)]
Fix includes.

7 years agoUse static data instead of QLatin1String objects.
Stephen Kelly [Sat, 25 Sep 2010 17:31:55 +0000 (19:31 +0200)]
Use static data instead of QLatin1String objects.

7 years agoCreate the filter regexp in a static method, not at global scope.
Stephen Kelly [Sat, 25 Sep 2010 17:27:52 +0000 (19:27 +0200)]
Create the filter regexp in a static method, not at global scope.

7 years agoDefine static data instead of a static object.
Stephen Kelly [Sat, 25 Sep 2010 17:15:12 +0000 (19:15 +0200)]
Define static data instead of a static object.

7 years agoIncrease constness.
Stephen Kelly [Wed, 22 Sep 2010 22:23:31 +0000 (00:23 +0200)]
Increase constness.

7 years agoUse object as the parameter name here.
Stephen Kelly [Wed, 22 Sep 2010 19:52:40 +0000 (21:52 +0200)]
Use object as the parameter name here.

7 years agoUse property as the parameter name in all cases.
Stephen Kelly [Wed, 22 Sep 2010 19:51:40 +0000 (21:51 +0200)]
Use property as the parameter name in all cases.

7 years agoBuild with QT_STRICT_ITERATORS
Stephen Kelly [Sat, 18 Sep 2010 17:59:12 +0000 (19:59 +0200)]
Build with QT_STRICT_ITERATORS

7 years agoBuild everything but corelib without ASCII casts.
Stephen Kelly [Fri, 17 Sep 2010 19:15:51 +0000 (21:15 +0200)]
Build everything but corelib without ASCII casts.

7 years agoCompile full template specializations into the library
Stephen Kelly [Sun, 12 Sep 2010 15:44:02 +0000 (17:44 +0200)]
Compile full template specializations into the library

This allows them to be included in multiple translation units.

7 years agoPut the TypeAccessors in the Grantlee namespace.
Stephen Kelly [Sun, 12 Sep 2010 16:58:02 +0000 (18:58 +0200)]
Put the TypeAccessors in the Grantlee namespace.

7 years agoMove the MetaEnumVariable handling to a template specialization.
Stephen Kelly [Sun, 12 Sep 2010 01:58:56 +0000 (03:58 +0200)]
Move the MetaEnumVariable handling to a template specialization.

7 years agoVerfiy that QStringList lookup works.
Stephen Kelly [Sun, 12 Sep 2010 14:25:01 +0000 (16:25 +0200)]
Verfiy that QStringList lookup works.

7 years agoMake the q_ptr const.
Stephen Kelly [Sun, 12 Sep 2010 02:05:50 +0000 (04:05 +0200)]
Make the q_ptr const.

7 years agoClean up includes in the loader tags plugin.
Stephen Kelly [Sat, 11 Sep 2010 14:32:05 +0000 (16:32 +0200)]
Clean up includes in the loader tags plugin.

7 years agoClean up includes in the default tags plugin.
Stephen Kelly [Sat, 11 Sep 2010 14:31:39 +0000 (16:31 +0200)]
Clean up includes in the default tags plugin.

7 years agoClean up includes in the defaultfilters plugin
Stephen Kelly [Sat, 11 Sep 2010 14:31:25 +0000 (16:31 +0200)]
Clean up includes in the defaultfilters plugin

7 years agoClean up includes in the gui library.
Stephen Kelly [Sat, 11 Sep 2010 14:31:02 +0000 (16:31 +0200)]
Clean up includes in the gui library.

7 years agoFix includes in the core library.
Stephen Kelly [Sat, 11 Sep 2010 12:54:52 +0000 (14:54 +0200)]
Fix includes in the core library.

Grantlee includes should always come before Qt includes.

7 years agoMake this test build.
Stephen Kelly [Fri, 10 Sep 2010 13:12:41 +0000 (15:12 +0200)]
Make this test build.

7 years agoAdd missing licence headers.
Stephen Kelly [Fri, 10 Sep 2010 01:19:07 +0000 (03:19 +0200)]
Add missing licence headers.

7 years agoDon't load scriptable plugins when Engine::loadDefaultPlugins is called.
Stephen Kelly [Fri, 10 Sep 2010 00:21:12 +0000 (02:21 +0200)]
Don't load scriptable plugins when Engine::loadDefaultPlugins is called.

That causes memory management issues to to a combination of
implementation of QtScript support and not enough QSharedPointers.

7 years agoRevert "Plug one more memory leak."
Stephen Kelly [Thu, 9 Sep 2010 20:26:04 +0000 (22:26 +0200)]
Revert "Plug one more memory leak."

This reverts commit 5864582024c37bf04b5a82f7f1a920bb0a721fe2.

The scriptable library is already a QObject with a parent, so already memory managed.

7 years agoPlug one more memory leak.
Stephen Kelly [Sun, 29 Aug 2010 18:26:22 +0000 (20:26 +0200)]
Plug one more memory leak.

7 years agoDon't create a new ScriptableLibraryContainer each a Template is created.
Stephen Kelly [Sun, 29 Aug 2010 13:33:21 +0000 (15:33 +0200)]
Don't create a new ScriptableLibraryContainer each a Template is created.

Load each one time per url instead.

7 years agoDon't create a new ScriptableTagsLibrary each time a Template is created.
Stephen Kelly [Sun, 29 Aug 2010 12:54:24 +0000 (14:54 +0200)]
Don't create a new ScriptableTagsLibrary each time a Template is created.

7 years agoSimplify the allocation here. Fix crash on Windows.
Stephen Kelly [Sun, 29 Aug 2010 12:59:32 +0000 (14:59 +0200)]
Simplify the allocation here. Fix crash on Windows.

7 years agoBump the patch version in the 0.1 branch.
Stephen Kelly [Fri, 27 Aug 2010 08:51:52 +0000 (10:51 +0200)]
Bump the patch version in the 0.1 branch.

7 years agoMake it possible again to build grantlee with Qt 4.5. v0.1.5
Stephen Kelly [Mon, 23 Aug 2010 15:54:32 +0000 (17:54 +0200)]
Make it possible again to build grantlee with Qt 4.5.

7 years agoAdd some missing files
Stephen Kelly [Fri, 20 Aug 2010 14:22:21 +0000 (16:22 +0200)]
Add some missing files

7 years agoInclude the Grantlee USE file when building the default filters.
Stephen Kelly [Sun, 8 Aug 2010 22:34:51 +0000 (00:34 +0200)]
Include the Grantlee USE file when building the default filters.

This fixes issues hit when building in release mode.

7 years agoMake it possible for the scripted filters to inject QObjects and arrays to scripts.
Janne Hakonen [Wed, 4 Aug 2010 20:35:10 +0000 (22:35 +0200)]
Make it possible for the scripted filters to inject QObjects and arrays to scripts.

7 years agoAdd a Decorator to implement caching of Templates.
Stephen Kelly [Wed, 28 Jul 2010 23:31:10 +0000 (01:31 +0200)]
Add a Decorator to implement caching of Templates.

7 years agoPort the loader tags to RenderContext.
Stephen Kelly [Tue, 3 Aug 2010 10:04:32 +0000 (12:04 +0200)]
Port the loader tags to RenderContext.

This involves the creation of a BlockContext and rewriting inheritance handling.

7 years agoRemove bogus tests. Template blocks can not be nested.
Stephen Kelly [Tue, 3 Aug 2010 10:11:19 +0000 (12:11 +0200)]
Remove bogus tests. Template blocks can not be nested.

7 years agoMore constness.
Stephen Kelly [Tue, 3 Aug 2010 09:45:31 +0000 (11:45 +0200)]
More constness.

7 years agoRemove unused method.
Stephen Kelly [Tue, 3 Aug 2010 09:17:58 +0000 (11:17 +0200)]
Remove unused method.

7 years agoPort the cycle tag to RenderContext.
Stephen Kelly [Wed, 28 Jul 2010 20:29:17 +0000 (22:29 +0200)]
Port the cycle tag to RenderContext.

Fixes a state-leak bug when rendering a single template multiple times.

7 years agoAdd the RenderContext class.
Stephen Kelly [Wed, 28 Jul 2010 20:25:11 +0000 (22:25 +0200)]
Add the RenderContext class.

This makes thread safe and cachable templates possible, though caching
might have to wait for version 0.2

7 years agoAdd a convenience typedef
Stephen Kelly [Wed, 28 Jul 2010 20:19:49 +0000 (22:19 +0200)]
Add a convenience typedef

7 years agoConvert the RingIterator to use stl style iterators instead of java style.
Stephen Kelly [Wed, 28 Jul 2010 20:15:40 +0000 (22:15 +0200)]
Convert the RingIterator to use stl style iterators instead of java style.

The important difference is that stl style const_iterators have a default ctor.

7 years agoMake more use of const.
Stephen Kelly [Wed, 28 Jul 2010 20:22:19 +0000 (22:22 +0200)]
Make more use of const.

7 years agoCreate the html apidox in the apidox directory instead of apidocs/html.
Stephen Kelly [Wed, 28 Jul 2010 19:32:32 +0000 (21:32 +0200)]
Create the html apidox in the apidox directory instead of apidocs/html.

7 years agoFix template method which can not have even compiled before.
Stephen Kelly [Sat, 31 Jul 2010 12:27:04 +0000 (14:27 +0200)]
Fix template method which can not have even compiled before.

7 years agoBump the patch version in the 0.1 branch.
Stephen Kelly [Wed, 28 Jul 2010 19:19:17 +0000 (21:19 +0200)]
Bump the patch version in the 0.1 branch.

7 years agoPut the version number in the name of the qch docs file. v0.1.4
Stephen Kelly [Wed, 28 Jul 2010 19:02:11 +0000 (21:02 +0200)]
Put the version number in the name of the qch docs file.

7 years agoFix the licence of these files to LGPLv2+ instead of LGPLv3 only.
Stephen Kelly [Wed, 28 Jul 2010 18:59:15 +0000 (20:59 +0200)]
Fix the licence of these files to LGPLv2+ instead of LGPLv3 only.

7 years agoRemember the plugin_install_dir used when installing the package.
Michael Jansen [Mon, 26 Jul 2010 12:49:21 +0000 (14:49 +0200)]
Remember the plugin_install_dir used when installing the package.

This fixes the problem that grantlee failed to find its standard plugins
sometimes. More precisely if it wasn't installed into the same prefix as
qt (QCoreApplication::instance()->libraryPaths()) and QT_PLUGIN_DIRECTORY
did not contain the install prefix of grantlee.

With the current setup it's possible to add to the pluginPaths()

paths = engine->pluginPaths();
paths << "additional_path";  // Append
engine->setPluginPaths(path);

QStringList paths;
paths << "additional path";
paths << "additional path 2";
paths << engine->pluginPaths(); // Prepend
engine->setPluginPaths(path);

or completely overwrite the paths;

7 years agoMove the check for invalid template variable names.
Stephen Kelly [Tue, 27 Jul 2010 20:09:25 +0000 (22:09 +0200)]
Move the check for invalid template variable names.

7 years agoMake the add filter be able to add other types together by concatenation or extending
Stephen Kelly [Tue, 27 Jul 2010 18:07:11 +0000 (20:07 +0200)]
Make the add filter be able to add other types together by concatenation or extending

7 years agoMake the list handling more flexible
Stephen Kelly [Tue, 27 Jul 2010 18:35:34 +0000 (20:35 +0200)]
Make the list handling more flexible

7 years agoMore tests of the if tag.
Stephen Kelly [Tue, 27 Jul 2010 17:53:51 +0000 (19:53 +0200)]
More tests of the if tag.

7 years agoUpdate the jsescape filter to be JSON safe.
Stephen Kelly [Tue, 27 Jul 2010 17:52:45 +0000 (19:52 +0200)]
Update the jsescape filter to be JSON safe.

7 years agoActually include the title filter in the library and fix its behaviour.
Stephen Kelly [Tue, 27 Jul 2010 17:51:01 +0000 (19:51 +0200)]
Actually include the title filter in the library and fix its behaviour.

7 years agoSupport accessing the objectName() and children() of QObjects.
Stephen Kelly [Mon, 26 Jul 2010 12:48:08 +0000 (14:48 +0200)]
Support accessing the objectName() and children() of QObjects.

7 years agoRefactor the QObject* handling in Variable into a TypeAccessor specialization.
Stephen Kelly [Mon, 26 Jul 2010 12:08:28 +0000 (14:08 +0200)]
Refactor the QObject* handling in Variable into a TypeAccessor specialization.

7 years agoPut the remains of QVariantHash handling into the TypeAccessor for it.
Stephen Kelly [Mon, 26 Jul 2010 12:50:49 +0000 (14:50 +0200)]
Put the remains of QVariantHash handling into the TypeAccessor for it.

7 years agoUse explicit latin1 in the tests.
Stephen Kelly [Sun, 25 Jul 2010 14:58:32 +0000 (16:58 +0200)]
Use explicit latin1 in the tests.

7 years agoUse explicit latin1 for literals.
Stephen Kelly [Sun, 25 Jul 2010 11:24:41 +0000 (13:24 +0200)]
Use explicit latin1 for literals.

7 years agoMake it possible to compile Grantlee if Qt is built with QT_NO_CAST_FROM_ASCII
Stephen Kelly [Sat, 24 Jul 2010 20:46:30 +0000 (22:46 +0200)]
Make it possible to compile Grantlee if Qt is built with QT_NO_CAST_FROM_ASCII

7 years agoUse a UTF-8 decoder to read template and script files.
Stephen Kelly [Sat, 24 Jul 2010 20:36:43 +0000 (22:36 +0200)]
Use a UTF-8 decoder to read template and script files.

7 years agoAdd a conversion to ASCII which is more suited to slugifying.
Stephen Kelly [Sat, 24 Jul 2010 20:23:46 +0000 (22:23 +0200)]
Add a conversion to ASCII which is more suited to slugifying.

QString::toAscii creates replacement chars which we do not want.

7 years agoUse explicit latin1 encoding for QMetaObject literals generated from C++.
Stephen Kelly [Sat, 24 Jul 2010 15:23:47 +0000 (17:23 +0200)]
Use explicit latin1 encoding for QMetaObject literals generated from C++.

Uft8 is used for Q_PROPERTY names because they can seemingly be anything.

7 years agos/at( 0 )/first()/g
Stephen Kelly [Fri, 23 Jul 2010 22:53:51 +0000 (00:53 +0200)]
s/at( 0 )/first()/g

7 years agoMore explicit latin1 in the plugins.
Stephen Kelly [Fri, 23 Jul 2010 22:29:10 +0000 (00:29 +0200)]
More explicit latin1 in the plugins.

7 years agoMore explict latin1.
Stephen Kelly [Fri, 23 Jul 2010 22:12:22 +0000 (00:12 +0200)]
More explict latin1.

7 years agoUse QStringBuilder in the Lexer.
Stephen Kelly [Fri, 23 Jul 2010 21:42:01 +0000 (23:42 +0200)]
Use QStringBuilder in the Lexer.

7 years agoUse QStringBuilder to create the static regexp for filter expression.
Stephen Kelly [Fri, 23 Jul 2010 21:12:04 +0000 (23:12 +0200)]
Use QStringBuilder to create the static regexp for filter expression.

Also be explicit about latin1 encoding of string literals.

7 years agoExplicitly use latin1 more.
Stephen Kelly [Fri, 23 Jul 2010 20:39:28 +0000 (22:39 +0200)]
Explicitly use latin1 more.