From 18b519043e5273c7574e470d0fb2d454eea6d354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronny=20Kr=C3=BCger?= Date: Wed, 25 May 2022 15:27:57 +0200 Subject: [PATCH] Return complete versions of Edge and IE backends Since wxVersionInfo supports four parts now, we can return the complete version from the Edge and IE backends to clients. --- src/msw/webview_edge.cpp | 6 ++++-- src/msw/webview_ie.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/msw/webview_edge.cpp b/src/msw/webview_edge.cpp index 14738d3b30..5302691d2c 100644 --- a/src/msw/webview_edge.cpp +++ b/src/msw/webview_edge.cpp @@ -980,7 +980,8 @@ wxVersionInfo wxWebViewFactoryEdge::GetVersionInfo() { long major = 0, minor = 0, - micro = 0; + micro = 0, + revision = 0; if (wxWebViewEdgeImpl::Initialize()) { @@ -996,10 +997,11 @@ wxVersionInfo wxWebViewFactoryEdge::GetVersionInfo() tk.GetNextToken().ToLong(&major); tk.GetNextToken().ToLong(&minor); tk.GetNextToken().ToLong(µ); + tk.GetNextToken().ToLong(&revision); } } - return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro); + return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro, revision); } // ---------------------------------------------------------------------------- diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index ae092a0477..45afae0013 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -60,7 +60,8 @@ wxVersionInfo wxWebViewFactoryIE::GetVersionInfo() key.QueryValue("Version", value); long major = 0, minor = 0, - micro = 0; + micro = 0, + revision = 0; wxStringTokenizer tk(value, ". "); // Ignore the return value because if the version component is missing // or invalid (i.e. non-numeric), the only thing we can do is to ignore @@ -68,7 +69,8 @@ wxVersionInfo wxWebViewFactoryIE::GetVersionInfo() tk.GetNextToken().ToLong(&major); tk.GetNextToken().ToLong(&minor); tk.GetNextToken().ToLong(µ); - return wxVersionInfo("Internet Explorer", major, minor, micro); + tk.GetNextToken().ToLong(&revision); + return wxVersionInfo("Internet Explorer", major, minor, micro, revision); } //Convenience function for error conversion