Skip to content

Commit

Permalink
wxwidgets.cfg: Added support for more interfaces (#6174)
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy authored Mar 23, 2024
1 parent 9b1d804 commit 8dc5e0c
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cfg/wxwidgets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
<check>wxFileType</check>
<check>wxTimeSpan</check>
<check>wxDateSpan</check>
<check>wxFont</check>
<check>wxFontInfo</check>
<check>wxFontList</check>
<check>wxBrush</check>
<check>wxPen</check>
<check>wxPenList</check>
<check>wxAcceleratorEntry</check>
<check>wxVector</check>
<check>wxArrayInt</check>
Expand Down
75 changes: 75 additions & 0 deletions test/cfg/wxwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
#include <wx/wx.h>
#include <wx/accel.h>
#include <wx/app.h>
#include <wx/brush.h>
#include <wx/pen.h>
#include <wx/colour.h>
#include <wx/dc.h>
#include <wx/dynarray.h>
#include <wx/font.h>
#include <wx/log.h>
#include <wx/filefn.h>
#include <wx/geometry.h>
Expand Down Expand Up @@ -42,6 +45,78 @@
#include <wx/vector.h>
#include <wx/versioninfo.h>

void unusedVariable_wxPenList()
{
// cppcheck-suppress unusedVariable
wxPenList a;
}

void unusedVariable_wxPen(const wxColour &colour, int width, const wxPenStyle style, const wxPen &pen)
{
// cppcheck-suppress unusedVariable
wxPen a;
// cppcheck-suppress unreadVariable
wxPen b(colour, width);
// cppcheck-suppress unreadVariable
wxPen c(colour, width, style);
// cppcheck-suppress unreadVariable
wxPen d(pen);
}

void unusedVariable_wxBrush(const wxColour &color, const wxBrushStyle style, const wxBitmap &bmp, const wxBrush &brush)
{
// cppcheck-suppress unusedVariable
wxBrush a;
// cppcheck-suppress unreadVariable
wxBrush b(color, style);
// cppcheck-suppress unreadVariable
wxBrush c(bmp);
// cppcheck-suppress unreadVariable
wxBrush d(brush);
}

void unusedVariable_wxFontList()
{
// cppcheck-suppress unusedVariable
wxFontList a;
}

void unusedVariable_wxFontInfo(const double pointSize, const wxSize &sz)
{
// cppcheck-suppress unusedVariable
wxFontInfo a;
// cppcheck-suppress unreadVariable
wxFontInfo b(pointSize);
// cppcheck-suppress unreadVariable
wxFontInfo c(sz);
}

void unusedVariable_wxFont(const wxFont &font,
const wxFontInfo &fontInfo,
const int pointSize,
const wxFontFamily family,
const wxFontStyle style,
const wxFontWeight weight,
const bool underline,
const wxString &faceName,
const wxFontEncoding encoding)
{
// cppcheck-suppress unusedVariable
wxFont a;
// cppcheck-suppress unreadVariable
wxFont b(font);
// cppcheck-suppress unreadVariable
wxFont c(fontInfo);
// cppcheck-suppress unreadVariable
wxFont d(pointSize, family, style, weight);
// cppcheck-suppress unreadVariable
wxFont e(pointSize, family, style, weight, underline);
// cppcheck-suppress unreadVariable
wxFont f(pointSize, family, style, weight, underline, faceName);
// cppcheck-suppress unreadVariable
wxFont g(pointSize, family, style, weight, underline, faceName, encoding);
}

void unusedVariable_wxVector()
{
// cppcheck-suppress unusedVariable
Expand Down

0 comments on commit 8dc5e0c

Please sign in to comment.