[atkmm] Fix build when _WRAP_ENUM generates enum class



commit 5c9556ee1bfe611ca81c52517494046804d419cf
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Apr 11 19:40:00 2017 +0200

    Fix build when _WRAP_ENUM generates enum class
    
    Bug 86864

 atk/src/atk_docs_override.xml |    5 ++++-
 atk/src/relation.hg           |    6 ++----
 atk/src/text.hg               |    4 +---
 3 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/atk/src/atk_docs_override.xml b/atk/src/atk_docs_override.xml
index 05a355d..ee9cd62 100644
--- a/atk/src/atk_docs_override.xml
+++ b/atk/src/atk_docs_override.xml
@@ -1,5 +1,8 @@
 <root>
-
+<substitute_type_name from="GObject" to="Glib::Object" />
+<substitute_enumerator_name from_prefix="ATK_RELATION_" to_prefix="Atk::RelationType::" />
+<!-- These are preprocessor defines. Don't substitute. -->
+<substitute_enumerator_name from_prefix="ATK_ATTRIBUTE_" to_prefix="ATK_ATTRIBUTE_" />
 
 <function name="atk_text_get_run_attributes">
 <description>
diff --git a/atk/src/relation.hg b/atk/src/relation.hg
index 6ba57c2..96c4081 100644
--- a/atk/src/relation.hg
+++ b/atk/src/relation.hg
@@ -1,5 +1,3 @@
-/* $Id: relation.hg,v 1.3 2005/01/05 18:21:30 murrayc Exp $ */
-
 /* Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -27,7 +25,7 @@ namespace Atk
 {
 
 _CC_INCLUDE(atk/atk-enum-types.h)
-_WRAP_ENUM(RelationType, AtkRelationType)
+_WRAP_ENUM(RelationType, AtkRelationType, s#^NULL$#NONE#)
 
 class Object;
 
@@ -45,7 +43,7 @@ protected:
 
 public:
   _WRAP_CREATE(const std::vector<Glib::RefPtr<Atk::Object>>& targets,
-               RelationType relationship = RELATION_NULL)
+               RelationType relationship = RelationType::NONE)
 
   _WRAP_METHOD(RelationType get_relation_type() const, atk_relation_get_relation_type)
 
diff --git a/atk/src/text.hg b/atk/src/text.hg
index b324c47..5bb0270 100644
--- a/atk/src/text.hg
+++ b/atk/src/text.hg
@@ -1,5 +1,3 @@
-/* $Id: text.hg,v 1.7 2005/01/05 18:21:30 murrayc Exp $ */
-
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -80,7 +78,7 @@ private:
 
 public:
   TextAttribute() : attribute_ (0) {}
-  TextAttribute(BuiltinTextAttribute attribute) : attribute_ (attribute) {}
+  TextAttribute(BuiltinTextAttribute attribute) : attribute_(static_cast<int>(attribute)) {}
 
   // Behave like an ordinary enum.
   explicit TextAttribute(int attribute) : attribute_ (attribute) {}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]