From 08ac4ece4bb2dd0d39c4e0be05ab04612ce372f9 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Sat, 23 Mar 2024 08:45:07 +0100 Subject: [PATCH] wxwidgets.cfg: Added support for more interfaces --- cfg/wxwidgets.cfg | 6 ++++ test/cfg/wxwidgets.cpp | 77 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index 3d4926b9185..366a90569ae 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -16,6 +16,12 @@ wxFileType wxTimeSpan wxDateSpan + wxFont + wxFontInfo + wxFontList + wxBrush + wxPen + wxPenList wxAcceleratorEntry wxVector wxArrayInt diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index 92a51af7d63..a6b6739e5ad 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -12,9 +12,12 @@ #include #include #include +#include +#include #include #include #include +#include #include #include #include @@ -42,6 +45,80 @@ #include #include +void unusedVariable_wxPenList() +{ + // cppcheck-suppress unusedVariable + wxPenList a; +} + +void unusedVariable_wxPen(const wxPenInfo &penInfo, const wxColour &colour, int width, const wxPenStyle style, const wxPen &pen) +{ + // cppcheck-suppress unusedVariable + wxPen a; + // cppcheck-suppress unreadVariable + wxPen b(penInfo); + // cppcheck-suppress unreadVariable + wxPen c(colour, width); + // cppcheck-suppress unreadVariable + wxPen d(colour, width, style); + // cppcheck-suppress unreadVariable + wxPen f(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