diff options
| author | Michal Hruby <michal.mhr@gmail.com> | 2012-08-20 19:41:49 +0100 |
|---|---|---|
| committer | Michal Hruby <michal.mhr@gmail.com> | 2012-08-20 19:41:49 +0100 |
| commit | 49585637b8ac60f98e45ba784dc44632af73c56b (patch) | |
| tree | 6a2cfd1505f64a34876461922620ff737b21fa8f /unity-shared | |
| parent | 574d73a41ef9bb443f6d1ef5752b007e3e30592b (diff) | |
Fix tests
(bzr r2479.2.10)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/IconLoader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unity-shared/IconLoader.cpp b/unity-shared/IconLoader.cpp index e5cc7c669..7d236cb19 100644 --- a/unity-shared/IconLoader.cpp +++ b/unity-shared/IconLoader.cpp @@ -587,6 +587,16 @@ IconLoader::Impl::Impl() * apply immediately. */ cache_.clear(); }); + + // make sure the AnnotatedIcon type is registered, so we can deserialize it +#if GLIB_CHECK_VERSION(2, 34, 0) + g_type_ensure(unity_protocol_annotated_icon_get_type()); +#else + // we need to fool the compiler cause get_type is marked as G_GNUC_CONST, + // which isn't exactly true + volatile GType proto_icon = unity_protocol_annotated_icon_get_type(); + g_type_name(proto_icon); +#endif } int IconLoader::Impl::LoadFromIconName(std::string const& icon_name, |
