X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cd224780190db13304caa7d6a26dd2897d9761a..6b03a638a437316e47f02a896d3ad664d59c6ddb:/utils/ifacecheck/src/xmlparser.cpp diff --git a/utils/ifacecheck/src/xmlparser.cpp b/utils/ifacecheck/src/xmlparser.cpp index 54522205f1..3942535b1f 100644 --- a/utils/ifacecheck/src/xmlparser.cpp +++ b/utils/ifacecheck/src/xmlparser.cpp @@ -97,6 +97,7 @@ void wxType::SetTypeFromString(const wxString& t) // fix this to avoid false positives m_strTypeClean.Replace("wxDateTime::", ""); m_strTypeClean.Replace("wxStockGDI::", ""); // same story for some other classes + m_strTypeClean.Replace("wxHelpEvent::", ""); } bool wxType::IsOk() const @@ -168,6 +169,11 @@ void wxArgumentType::SetDefaultValue(const wxString& defval, const wxString& def // fix this to avoid false positives m_strDefaultValueForCmp.Replace("wxDateTime::", ""); m_strDefaultValueForCmp.Replace("wxStockGDI::", ""); // same story for some other classes + m_strDefaultValueForCmp.Replace("wxHelpEvent::", ""); // same story for some other classes + + m_strDefaultValueForCmp.Replace("wxGet_wxConvLocal()", "wxConvLocal"); + + m_strDefaultValueForCmp.Replace("* GetColour(COLOUR_BLACK)", "*wxBLACK"); // ADHOC-FIX: if (m_strDefaultValueForCmp.Contains("wxGetTranslation")) @@ -186,6 +192,21 @@ bool wxArgumentType::operator==(const wxArgumentType& m) const (m_strDefaultValueForCmp.IsNumber() || m.m_strDefaultValueForCmp.IsNumber())) return true; + // fix for default values which were replaced by gcc-xml with their numeric values + // (at this point we know that m_strTypeClean == m.m_strTypeClean): + if (m_strTypeClean == "long" || m_strTypeClean == "int") + { + if ((m_strDefaultValueForCmp.IsNumber() && m.m_strDefaultValueForCmp.StartsWith("wx")) || + (m.m_strDefaultValueForCmp.IsNumber() && m_strDefaultValueForCmp.StartsWith("wx"))) + { + if (g_verbose) + LogMessage("Supposing '%s' default value to be the same of '%s'...", + m_strDefaultValueForCmp, m.m_strDefaultValueForCmp); + + return true; + } + } + if (m_strDefaultValueForCmp != m.m_strDefaultValueForCmp) { // maybe the default values are numbers.