Add an example to wxVersionInfo (PR #25525)

46 views
Skip to first unread message

Blake-Madden

unread,
Jun 14, 2025, 9:24:08 AM6/14/25
to wx-...@googlegroups.com, Subscribed

I think this example is useful in particular because it shows which submodules (at least at this moment) support version info. It is also useful as it shows the libraries where you have to call this a little differently (e.g., wxGetZlibVersionInfo(), wxWebView::GetBackendVersionInfo()).


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/25525

Commit Summary

  • 83b2e91 Add an example to wxVersionInfo

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525@github.com>

VZ

unread,
Jun 16, 2025, 1:17:26 PM6/16/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25525)

This looks a bit complicated for an example, but I could be overthinking this. Do the other think we should have it?

Maybe it would be useful to include this somewhere else, although it's going to be hard to find a sample linking to all these libraries. Maybe put it into a "manual only" test?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/c2977416838@github.com>

Blake-Madden

unread,
Jun 23, 2025, 7:07:31 AM6/23/25
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#25525)

I could provide a much simpler example of creating a wxVersionInfo for something like Lua. Let me know if you prefer that.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/c2995987682@github.com>

VZ

unread,
Jun 23, 2025, 9:55:37 AM6/23/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25525)

I think a simpler example would be better, thanks!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/c2996601568@github.com>

Joris Dauphin

unread,
Jun 23, 2025, 12:48:01 PM6/23/25
to wx-...@googlegroups.com, Subscribed

@Jarod42 commented on this pull request.


In interface/wx/versioninfo.h:

> +    std::vector<wxString> allLibInfo;
+    allLibInfo.push_back(formatLibInfo(wxGetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxTIFFHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxJPEGHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxPNGHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWEBPHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxRegEx::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxXmlDocument::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxStyledTextCtrl::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWebSession::GetDefault().GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxGetZlibVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWebView::GetBackendVersionInfo()));
⬇️ Suggested change
-    std::vector<wxString> allLibInfo;
-    allLibInfo.push_back(formatLibInfo(wxGetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxTIFFHandler::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxJPEGHandler::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxPNGHandler::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxWEBPHandler::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxRegEx::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxXmlDocument::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxStyledTextCtrl::GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxWebSession::GetDefault().GetLibraryVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxGetZlibVersionInfo()));
-    allLibInfo.push_back(formatLibInfo(wxWebView::GetBackendVersionInfo()));
+    std::vector<wxString> allLibInfo {
+        formatLibInfo(wxGetLibraryVersionInfo()),
+        formatLibInfo(wxTIFFHandler::GetLibraryVersionInfo()),
+        formatLibInfo(wxJPEGHandler::GetLibraryVersionInfo()),
+        formatLibInfo(wxPNGHandler::GetLibraryVersionInfo()),
+        formatLibInfo(wxWEBPHandler::GetLibraryVersionInfo()),
+        formatLibInfo(wxRegEx::GetLibraryVersionInfo()),
+        formatLibInfo(wxXmlDocument::GetLibraryVersionInfo()),
+        formatLibInfo(wxStyledTextCtrl::GetLibraryVersionInfo()),
+        formatLibInfo(wxWebSession::GetDefault().GetLibraryVersionInfo()),
+        formatLibInfo(wxGetZlibVersionInfo()),
+        formatLibInfo(wxWebView::GetBackendVersionInfo())};

unless C++03 support is really required ;-)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/review/2950778577@github.com>

Blake-Madden

unread,
Jun 24, 2025, 6:26:31 AM6/24/25
to wx-...@googlegroups.com, Subscribed

@Blake-Madden commented on this pull request.


In interface/wx/versioninfo.h:

> +    std::vector<wxString> allLibInfo;
+    allLibInfo.push_back(formatLibInfo(wxGetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxTIFFHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxJPEGHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxPNGHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWEBPHandler::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxRegEx::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxXmlDocument::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxStyledTextCtrl::GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWebSession::GetDefault().GetLibraryVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxGetZlibVersionInfo()));
+    allLibInfo.push_back(formatLibInfo(wxWebView::GetBackendVersionInfo()));

Old habits die hard :-)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/review/2953156215@github.com>

Blake-Madden

unread,
Jun 24, 2025, 6:32:30 AM6/24/25
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/before/83b2e91f16c76b70fd4f089ecacaf6bdc5998bfa/after/296b8fb951d11f07332e2a7a4156eb6dacf17f07@github.com>

Blake-Madden

unread,
Jun 24, 2025, 6:34:02 AM6/24/25
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#25525)

Alright, much simpler example is in there now. And it actually flows better with the previous paragraph too.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/c2999737028@github.com>

VZ

unread,
Jun 24, 2025, 11:01:21 AM6/24/25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25525)

Thanks, will push soon.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/c3000857165@github.com>

VZ

unread,
Jun 24, 2025, 11:22:12 AM6/24/25
to wx-...@googlegroups.com, Subscribed

Closed #25525 via c5a7b63.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25525/issue_event/18297466260@github.com>

Reply all
Reply to author
Forward
0 new messages