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: Improved support for more data structures from wx #6143

Merged
merged 1 commit into from
Mar 18, 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
6 changes: 6 additions & 0 deletions cfg/wxwidgets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<check>wxRealPoint</check>
<check>wxVersionInfo</check>
<check>wxRegion</check>
<check>wxRegEx</check>
<check>wxPosition</check>
<check>wxFileType</check>
<check>wxTimeSpan</check>
<check>wxDateSpan</check>
<check>wxAcceleratorEntry</check>
</unusedvar>
<operatorEqVarError>
</operatorEqVarError>
Expand Down
68 changes: 67 additions & 1 deletion test/cfg/wxwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//

#include <wx/wx.h>
#include <wx/accel.h>
#include <wx/app.h>
#include <wx/dc.h>
#include <wx/log.h>
Expand All @@ -19,9 +20,11 @@
#include <wx/icon.h>
#include <wx/bitmap.h>
#include <wx/dataview.h>
#include <wx/datetime.h>
#include <wx/memory.h>
#include <wx/frame.h>
#include <wx/menu.h>
#include <wx/mimetype.h>
#include <wx/regex.h>
#include <wx/region.h>
#include <wx/stattext.h>
Expand All @@ -30,9 +33,72 @@
#include <wx/textctrl.h>
#include <wx/gdicmn.h>
#include <wx/propgrid/property.h>
#include <wx/position.h>
#include <wx/versioninfo.h>

void unreadVariable(const wxCoord x, const wxPoint &pt, const wxRect &rect, const wxRegion &region, const wxBitmap &bmp)
void unreadVariable_wxAcceleratorEntry()
{
// cppcheck-suppress unreadVariable
wxAcceleratorEntry a;
}

void unreadVariable_wxDateSpan(const int x)
{
// cppcheck-suppress unreadVariable
wxDateSpan a;
// cppcheck-suppress unreadVariable
wxDateSpan b{x};
// cppcheck-suppress unreadVariable
wxDateSpan c{x, x};
// cppcheck-suppress unreadVariable
wxDateSpan d{x, x, x};
// cppcheck-suppress unreadVariable
wxDateSpan e{x, x, x, x};
}

void unreadVariable_wxTimeSpan(const long x, const wxLongLong y)
{
// cppcheck-suppress unreadVariable
wxTimeSpan a;
// cppcheck-suppress unreadVariable
wxTimeSpan b{};
// cppcheck-suppress unreadVariable
wxTimeSpan c{x};
// cppcheck-suppress unreadVariable
wxTimeSpan d{x, x};
// cppcheck-suppress unreadVariable
wxTimeSpan e{x, x, y};
// cppcheck-suppress unreadVariable
wxTimeSpan f{x, x, y, y};
}

void unreadVariable_wxFileType(const wxFileTypeInfo &info)
{
// cppcheck-suppress unreadVariable
wxFileType a(info);
}

void unreadVariable_wxPosition(const int x)
{
// cppcheck-suppress unreadVariable
wxPosition a;
// cppcheck-suppress unreadVariable
wxPosition b{};
// cppcheck-suppress unreadVariable
wxPosition c{x,x};
}

void unreadVariable_wxRegEx(const wxString &expr, const int flags)
{
// cppcheck-suppress unreadVariable
wxRegEx a;
// cppcheck-suppress unreadVariable
wxRegEx b{expr};
// cppcheck-suppress unreadVariable
wxRegEx c{expr, flags};
}

void unreadVariable_wxRegion(const wxCoord x, const wxPoint &pt, const wxRect &rect, const wxRegion &region, const wxBitmap &bmp)
{
// cppcheck-suppress unreadVariable
wxRegion a;
Expand Down
Loading