From 3f1a90c8a4ae809786b52246ea36150e6375294d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 17 Aug 2016 09:37:51 +0200 Subject: [PATCH] 3D viewer; Fix a few incorrect use of ToUTF8() in log and error messages. Only noticeable when messages contain non ASCII7 chars. --- 3d-viewer/3d_cache/3d_cache.cpp | 10 +++++----- 3d-viewer/3d_canvas/cinfo3d_visu.cpp | 2 +- 3d-viewer/3d_canvas/eda_3d_canvas.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/3d-viewer/3d_cache/3d_cache.cpp b/3d-viewer/3d_cache/3d_cache.cpp index a75bc63877..3a8a2e0eef 100644 --- a/3d-viewer/3d_cache/3d_cache.cpp +++ b/3d-viewer/3d_cache/3d_cache.cpp @@ -212,7 +212,7 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach { // the model cannot be found; we cannot proceed wxLogTrace( MASK_3D_CACHE, " * [3D model] could not find model '%s'\n", - aModelFile.ToUTF8() ); + aModelFile.GetData() ); return NULL; } @@ -441,7 +441,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem ) if( m_CacheDir.empty() ) { wxString errmsg = "cannot load cached model; config directory unknown"; - wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.ToUTF8() ); + wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.GetData() ); return false; } @@ -452,7 +452,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem ) { wxString errmsg = "cannot open file"; wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n", - errmsg.ToUTF8(), fname.ToUTF8() ); + errmsg.GetData(), fname.GetData() ); return false; } @@ -512,7 +512,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem ) if( m_CacheDir.empty() ) { wxString errmsg = "cannot load cached model; config directory unknown"; - wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.ToUTF8() ); + wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.GetData() ); return false; } @@ -524,7 +524,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem ) if( !wxFileName::FileExists( fname ) ) { wxString errmsg = _( "path exists but is not a regular file" ); - wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n", errmsg.ToUTF8(), + wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n", errmsg.GetData(), fname.ToUTF8() ); return false; diff --git a/3d-viewer/3d_canvas/cinfo3d_visu.cpp b/3d-viewer/3d_canvas/cinfo3d_visu.cpp index f663617ddb..35465b99b9 100644 --- a/3d-viewer/3d_canvas/cinfo3d_visu.cpp +++ b/3d-viewer/3d_canvas/cinfo3d_visu.cpp @@ -486,7 +486,7 @@ void CINFO3D_VISU::createBoardPolygon() errmsg.append( _( "Unable to calculate the board outlines." ) ); errmsg.append( wxT( "\n" ) ); errmsg.append( _( "Therefore use the board boundary box." ) ); - wxLogMessage( "%s", errmsg.ToUTF8() ); + wxLogMessage( "%s", errmsg.GetData() ); } m_board_poly.BooleanSubtract( allLayerHoles, SHAPE_POLY_SET::PM_FAST ); diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index c88823aaef..b97cbe942e 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -192,7 +192,7 @@ bool EDA_3D_CANVAS::initializeOpenGL() { const wxString msgError = (const char*) glewGetErrorString( err ); - wxLogMessage( "%s", msgError.ToUTF8() ); + wxLogMessage( msgError ); return false; }