don't assert at startup because of the static initialization of a wxLocale object requires a valid wxAppTraits object; init the locale later, in TestDefaultLang()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -987,7 +987,10 @@ static void TestFileSetTimes()
|
|||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/utils.h" // for wxSetEnv
|
#include "wx/utils.h" // for wxSetEnv
|
||||||
|
|
||||||
static wxLocale gs_localeDefault(wxLANGUAGE_ENGLISH);
|
static wxLocale gs_localeDefault;
|
||||||
|
// NOTE: don't init it here as it needs a wxAppTraits object
|
||||||
|
// and thus must be init-ed after creation of the wxInitializer
|
||||||
|
// class in the main()
|
||||||
|
|
||||||
// find the name of the language from its value
|
// find the name of the language from its value
|
||||||
static const wxChar *GetLangName(int lang)
|
static const wxChar *GetLangName(int lang)
|
||||||
@@ -1236,6 +1239,8 @@ static void TestDefaultLang()
|
|||||||
{
|
{
|
||||||
wxPuts(_T("*** Testing wxLocale::GetSystemLanguage ***"));
|
wxPuts(_T("*** Testing wxLocale::GetSystemLanguage ***"));
|
||||||
|
|
||||||
|
gs_localeDefault.Init(wxLANGUAGE_ENGLISH);
|
||||||
|
|
||||||
static const wxChar *langStrings[] =
|
static const wxChar *langStrings[] =
|
||||||
{
|
{
|
||||||
NULL, // system default
|
NULL, // system default
|
||||||
|
Reference in New Issue
Block a user