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.
This commit is contained in:
Ronny Krüger 2022-05-25 15:27:57 +02:00 committed by Vadim Zeitlin
parent 8ef6f9fa27
commit 18b519043e
2 changed files with 8 additions and 4 deletions

View File

@ -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(&micro);
tk.GetNextToken().ToLong(&revision);
}
}
return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro);
return wxVersionInfo("Microsoft Edge WebView2", major, minor, micro, revision);
}
// ----------------------------------------------------------------------------

View File

@ -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(&micro);
return wxVersionInfo("Internet Explorer", major, minor, micro);
tk.GetNextToken().ToLong(&revision);
return wxVersionInfo("Internet Explorer", major, minor, micro, revision);
}
//Convenience function for error conversion