Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxwidgets.cfg: Added support for wxVersionInfo #6140

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions cfg/wxwidgets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<check>wxSize</check>
<check>wxPoint</check>
<check>wxRealPoint</check>
<check>wxVersionInfo</check>
</unusedvar>
<operatorEqVarError>
</operatorEqVarError>
Expand Down Expand Up @@ -17004,4 +17005,108 @@ wxItemKind kind = wxITEM_NORMAL) -->
<arg nr="2" direction="in">
</arg>
</function>
<!-- bool wxVersionInfo::AtLeast( int major, int minor = 0, int micro = 0 ) const -->
<function name="wxVersionInfo::AtLeast">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<const/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" default="0" direction="in">
<not-uninit/>
</arg>
<arg nr="3" default="0" direction="in">
<not-uninit/>
</arg>
</function>
<!-- const wxString & wxVersionInfo::GetCopyright( void ) const -->
<function name="wxVersionInfo::GetCopyright">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- const wxString & wxVersionInfo::GetDescription( void ) const -->
<function name="wxVersionInfo::GetDescription">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMajor( void ) const -->
<function name="wxVersionInfo::GetMajor">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMicro( void ) const -->
<function name="wxVersionInfo::GetMicro">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMinor( void ) const -->
<function name="wxVersionInfo::GetMinor">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- const wxString & wxVersionInfo::GetName( void ) const -->
<function name="wxVersionInfo::GetName">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetRevision( void ) const -->
<function name="wxVersionInfo::GetRevision">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- wxString wxVersionInfo::GetVersionString( void ) const -->
<function name="wxVersionInfo::GetVersionString">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxString"/>
<use-retval/>
<const/>
</function>
<!-- bool wxVersionInfo::HasCopyright( void ) const -->
<function name="wxVersionInfo::HasCopyright">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<use-retval/>
<const/>
</function>
<!-- bool wxVersionInfo::HasDescription( void ) const -->
<function name="wxVersionInfo::HasDescription">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<use-retval/>
<const/>
</function>
<!-- wxString wxVersionInfo::ToString( void ) const -->
<function name="wxVersionInfo::ToString">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxString"/>
<use-retval/>
<const/>
</function>
</def>
19 changes: 19 additions & 0 deletions test/cfg/wxwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@
#include <wx/textctrl.h>
#include <wx/gdicmn.h>
#include <wx/propgrid/property.h>
#include <wx/versioninfo.h>

void unreadVariable_wxVersionInfo(const wxString &name, const int major, const int minor, const int micro, const wxString &description, const wxString &copyright)
{
// cppcheck-suppress unreadVariable
wxVersionInfo a;
// cppcheck-suppress unreadVariable
wxVersionInfo b(name);
// cppcheck-suppress unreadVariable
wxVersionInfo c(name, major);
// cppcheck-suppress unreadVariable
wxVersionInfo d(name, major, minor);
// cppcheck-suppress unreadVariable
wxVersionInfo e(name, major, minor, micro);
// cppcheck-suppress unreadVariable
wxVersionInfo f(name, major, minor, micro, description);
// cppcheck-suppress unreadVariable
wxVersionInfo g(name, major, minor, micro, description, copyright);
}

void unreadVariable_wxSize(const wxSize &s)
{
Expand Down
Loading