[glibmm] generate_extra_defs: Check for deprecated signals and properties
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] generate_extra_defs: Check for deprecated signals and properties
- Date: Thu, 10 Mar 2016 08:59:05 +0000 (UTC)
commit a6b07f16fd121077ee84d6789d61c7fbc9c7d1c6
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Mar 10 09:54:32 2016 +0100
generate_extra_defs: Check for deprecated signals and properties
tools/extra_defs_gen/generate_extra_defs.cc: Mark deprecated signals and
properties as such in the generated .defs file.
tools/extra_defs_gen/generate_extra_defs.cc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tools/extra_defs_gen/generate_extra_defs.cc b/tools/extra_defs_gen/generate_extra_defs.cc
index 38f2b05..3b5028d 100644
--- a/tools/extra_defs_gen/generate_extra_defs.cc
+++ b/tools/extra_defs_gen/generate_extra_defs.cc
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/* generate_extra_defs.cc
*
* Copyright (C) 2001 The Free Software Foundation
@@ -47,6 +45,7 @@ get_property_with_node_name(
bool bReadable = (flags & G_PARAM_READABLE) == G_PARAM_READABLE;
bool bWritable = (flags & G_PARAM_WRITABLE) == G_PARAM_WRITABLE;
bool bConstructOnly = (flags & G_PARAM_CONSTRUCT_ONLY) == G_PARAM_CONSTRUCT_ONLY;
+ bool bDeprecated = (flags & G_PARAM_DEPRECATED) == G_PARAM_DEPRECATED;
//#t and #f aren't documented, but I guess that it's correct based on the example in the .defs
// spec.
@@ -56,6 +55,8 @@ get_property_with_node_name(
strResult += " (readable " + (bReadable ? strTrue : strFalse) + ")\n";
strResult += " (writable " + (bWritable ? strTrue : strFalse) + ")\n";
strResult += " (construct-only " + (bConstructOnly ? strTrue : strFalse) + ")\n";
+ if (bDeprecated)
+ strResult += " (deprecated #t)\n"; // Default: not deprecated
strResult += ")\n\n"; // close (strNodeName
@@ -225,6 +226,9 @@ get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
strResult += " (when \"" + strWhen + "\")\n";
}
+ bool bDeprecated = (signalQuery.signal_flags & G_SIGNAL_DEPRECATED) == G_SIGNAL_DEPRECATED;
+ if (bDeprecated)
+ strResult += " (deprecated #t)\n"; // Default: not deprecated
// Loop through the list of parameters:
const GType* pParameters = signalQuery.param_types;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]