wxwidgets.cfg: Improved support for some deprecated functions.
This commit is contained in:
parent
2ab347606a
commit
2ce8a3fc95
|
@ -1144,6 +1144,48 @@
|
||||||
</arg>
|
</arg>
|
||||||
<warn severity="style">This function is deprecated and kept mostly for backwards compatibility. Please override 'wxDataViewCustomRenderer::ActivateCell()' method instead in any new code.</warn>
|
<warn severity="style">This function is deprecated and kept mostly for backwards compatibility. Please override 'wxDataViewCustomRenderer::ActivateCell()' method instead in any new code.</warn>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- http://docs.wxwidgets.org/trunk/classwx_debug_context.html#aa2175db985d125950314331d790428c2-->
|
||||||
|
<!-- static int wxDebugContext::GetLevel() -->
|
||||||
|
<function name="wxDebugContext::GetLevel">
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<returnValue type="int"/>
|
||||||
|
<use-retval/>
|
||||||
|
<warn severity="style">This function is deprecated and is replaced by 'wxLog' functionality.</warn>
|
||||||
|
</function>
|
||||||
|
<!-- http://docs.wxwidgets.org/trunk/classwx_debug_context.html#ad96f255b65d4b0a3a6429ba9ce991ffb-->
|
||||||
|
<!-- static void wxDebugContext::SetLevel -->
|
||||||
|
<function name="wxDebugContext::SetLevel">
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<warn severity="style">This function is deprecated and is replaced by 'wxLog' functionality.</warn>
|
||||||
|
</function>
|
||||||
|
<!-- http://docs.wxwidgets.org/trunk/group__group__funcmacro__file.html#ga42358e18253927c01bfc5f48e6778075-->
|
||||||
|
<!-- void wxDos2UnixFilename (wxChar * s) -->
|
||||||
|
<function name="wxDos2UnixFilename">
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-null/>
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<warn severity="style">This function is deprecated. Construct a 'wxFileName' with 'wxPATH_DOS' and then use 'wxFileName::GetFullPath(wxPATH_UNIX)' instead.</warn>
|
||||||
|
</function>
|
||||||
|
<!-- http://docs.wxwidgets.org/trunk/group__group__funcmacro__file.html#ga2414d8f9b3d08370551b0609eef5f0db-->
|
||||||
|
<!-- wxString wxFileNameFromPath (const wxString & path) -->
|
||||||
|
<function name="wxFileNameFromPath">
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<returnValue type="wxString"/>
|
||||||
|
<use-retval/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<warn severity="style">This function is deprecated. Please use 'wxFileName::SplitPath()' instead..</warn>
|
||||||
|
</function>
|
||||||
<!-- Override macros which don't necessarily require semicolons at the end -->
|
<!-- Override macros which don't necessarily require semicolons at the end -->
|
||||||
<define name="DECLARE_CLASS(n)" value=""/>
|
<define name="DECLARE_CLASS(n)" value=""/>
|
||||||
<define name="DECLARE_DYNAMIC_CLASS(n)" value=""/>
|
<define name="DECLARE_DYNAMIC_CLASS(n)" value=""/>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
// Test library configuration for windows.cfg
|
// Test library configuration for wxwidgets.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=windows --enable=information --error-exitcode=1 --inline-suppr --suppress=missingIncludeSystem test/cfg/windows.cpp
|
// $ ./cppcheck --check-library --enable=information --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr '--template="{file}:{line}:{severity}:{id}:{message}"' --inconclusive --library=wxwidgets -f test/cfg/wxwidgets.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
#include <wx/icon.h>
|
#include <wx/icon.h>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/dataview.h>
|
#include <wx/dataview.h>
|
||||||
|
#include <wx/memory.h>
|
||||||
|
|
||||||
void validCode()
|
void validCode()
|
||||||
{
|
{
|
||||||
|
@ -91,7 +92,8 @@ void deprecatedFunctions(wxApp &a,
|
||||||
const wxString &s,
|
const wxString &s,
|
||||||
wxArtProvider *artProvider,
|
wxArtProvider *artProvider,
|
||||||
wxCalendarCtrl &calenderCtrl,
|
wxCalendarCtrl &calenderCtrl,
|
||||||
wxComboCtrl &comboCtrl)
|
wxComboCtrl &comboCtrl,
|
||||||
|
wxChar * path)
|
||||||
{
|
{
|
||||||
#ifdef __WXOSX__
|
#ifdef __WXOSX__
|
||||||
// cppcheck-suppress MacOpenFileCalled
|
// cppcheck-suppress MacOpenFileCalled
|
||||||
|
@ -120,6 +122,19 @@ void deprecatedFunctions(wxApp &a,
|
||||||
|
|
||||||
// cppcheck-suppress SetTextIndentCalled
|
// cppcheck-suppress SetTextIndentCalled
|
||||||
comboCtrl.SetTextIndent(0);
|
comboCtrl.SetTextIndent(0);
|
||||||
|
|
||||||
|
// cppcheck-suppress GetLevelCalled
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
|
wxDebugContext::GetLevel();
|
||||||
|
// cppcheck-suppress SetLevelCalled
|
||||||
|
wxDebugContext::SetLevel(42);
|
||||||
|
|
||||||
|
// cppcheck-suppress wxDos2UnixFilenameCalled
|
||||||
|
wxDos2UnixFilename(path);
|
||||||
|
|
||||||
|
// cppcheck-suppress wxFileNameFromPathCalled
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
|
wxFileNameFromPath(wxT("../test.c"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXGTK__)
|
#if defined(__WXMSW__) || defined(__WXGTK__)
|
||||||
|
|
Loading…
Reference in New Issue