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..690933d6e2d 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,78 @@ #include #include +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