7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

More wxSing

This commit is contained in:
Marek Roszko 2023-01-16 23:14:38 -05:00
parent 358a05a2c8
commit d2c0f5fc2a
63 changed files with 240 additions and 238 deletions

View File

@ -234,16 +234,16 @@ wxString GetKeyName( const wxKeyEvent &aEvent )
wxString dump( const wxKeyEvent& aEvent )
{
wxString msg;
wxString eventType = "unknown";
wxString eventType = wxS( "unknown" );
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
eventType = "KeyDown";
eventType = wxS( "KeyDown" );
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
eventType = "KeyUp";
eventType = wxS( "KeyUp" );
else if( aEvent.GetEventType() == wxEVT_CHAR )
eventType = "Char";
eventType = wxS( "Char" );
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
eventType = "Hook";
eventType = wxS( "Hook" );
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
msg.Printf( "%7s %15s %5d %c%c%c%c"

View File

@ -108,7 +108,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
default:
case 0:
if( aResult )
wxFAIL_MSG( "uni_forward: invalid start byte" );
wxFAIL_MSG( wxS( "uni_forward: invalid start byte" ) );
return 0;
break;
@ -117,7 +117,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
if( ( s[1] & 0xc0 ) != 0x80 )
{
if( aResult )
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
return 0;
}
@ -136,7 +136,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
)
{
if( aResult )
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
return 0;
}
@ -156,7 +156,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
(s[0] == 0xF4 && s[1] > 0x8F) )
{
if( aResult )
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
return 0;
}

View File

@ -74,7 +74,7 @@ FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR( wxString* aValue ) :
// This list of characters follows the string from footprint.cpp which, in turn mimics the
// strings from lib_id.cpp
// TODO: Unify forbidden character lists
wxString illegalChars = "%$<>\t\n\r\"\\/:";
wxString illegalChars = wxS( "%$<>\t\n\r\"\\/:" );
SetCharExcludes( illegalChars );
}
@ -377,7 +377,7 @@ void KIUI::ValidatorTransferToWindowWithoutEvents( wxValidator& aValidator )
{
wxWindow* ctrl = aValidator.GetWindow();
wxCHECK_RET( ctrl != nullptr, "Transferring validator data without a control" );
wxCHECK_RET( ctrl != nullptr, wxS( "Transferring validator data without a control" ) );
wxEventBlocker orient_update_blocker( ctrl, wxEVT_ANY );
aValidator.TransferToWindow();

View File

@ -1155,7 +1155,7 @@ void VIEW::Redraw()
#ifdef KICAD_GAL_PROFILE
totalRealTime.Stop();
wxLogTrace( traceGalProfile, "VIEW::Redraw(): %.1f ms", totalRealTime.msecs() );
wxLogTrace( traceGalProfile, wxS( "VIEW::Redraw(): %.1f ms" ), totalRealTime.msecs() );
#endif /* KICAD_GAL_PROFILE */
}
@ -1471,7 +1471,7 @@ void VIEW::UpdateItems()
}
}
KI_TRACE( traceGalProfile, "View update: total items %u, geom %u anyUpdated %u\n", cntTotal,
KI_TRACE( traceGalProfile, wxS( "View update: total items %u, geom %u anyUpdated %u\n" ), cntTotal,
cntGeomUpdate, (unsigned) anyUpdated );
}

View File

@ -343,7 +343,7 @@ void BITMAP_BUTTON::SetIsSeparator()
void BITMAP_BUTTON::Check( bool aCheck )
{
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), "Button is not a checkButton." );
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), wxS( "Button is not a checkButton." ) );
if( aCheck && !hasFlag( wxCONTROL_CHECKED ) )
{
@ -361,7 +361,7 @@ void BITMAP_BUTTON::Check( bool aCheck )
bool BITMAP_BUTTON::IsChecked() const
{
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), "Button is not a checkButton." );
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), wxS( "Button is not a checkButton." ) );
return hasFlag( wxCONTROL_CHECKED );
}

View File

@ -120,7 +120,7 @@ COLOR_SWATCH::COLOR_SWATCH( wxWindow* aParent, const COLOR4D& aColor, int aID,
m_readOnly( false ),
m_supportsOpacity( true )
{
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, "SWATCH_EXPAND not supported in COLOR_SWATCH" );
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, wxS( "SWATCH_EXPAND not supported in COLOR_SWATCH" ) );
switch( aSwatchSize )
{

View File

@ -123,7 +123,7 @@ void FOOTPRINT_CHOICE::OnDrawItem( wxDC& aDC, wxRect const& aRect, int aItem, in
wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
{
if( SafeGetString( aItem ) == "" )
if( SafeGetString( aItem ) == wxS( "" ) )
return 11;
else
return wxOwnerDrawnComboBox::OnMeasureItem( aItem );
@ -132,7 +132,7 @@ wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
wxCoord FOOTPRINT_CHOICE::OnMeasureItemWidth( size_t aItem ) const
{
if( SafeGetString( aItem ) == "" )
if( SafeGetString( aItem ) == wxS( "" ) )
return GetTextRect().GetWidth() - 2;
else
return wxOwnerDrawnComboBox::OnMeasureItemWidth( aItem );
@ -150,7 +150,7 @@ void FOOTPRINT_CHOICE::TryVetoMouse( wxMouseEvent& aEvent )
{
int item = GetVListBoxComboPopup()->VirtualHitTest( aEvent.GetPosition().y );
if( SafeGetString( item ) != "" )
if( SafeGetString( item ) != wxS( "" ) )
aEvent.Skip();
}

View File

@ -139,14 +139,14 @@ bool FOOTPRINT_SELECT_WIDGET::UpdateList()
m_fp_sel_ctrl->Append( m_default_footprint.IsEmpty() ?
_( "No default footprint" ) :
"[" + _( "Default" ) + "] " + m_default_footprint,
wxS( "[" ) + _( "Default" ) + wxS( "] " ) + m_default_footprint,
new wxStringClientData( m_default_footprint ) );
if( !m_zero_filter )
{
for( FOOTPRINT_INFO& fpinfo : m_fp_filter )
{
wxString display_name( fpinfo.GetLibNickname() + ":" + fpinfo.GetFootprintName() );
wxString display_name( fpinfo.GetLibNickname() + wxS( ":" ) + fpinfo.GetFootprintName() );
m_fp_sel_ctrl->Append( display_name, new wxStringClientData( display_name ) );
++n_items;

View File

@ -139,11 +139,11 @@ void NUMBER_BADGE::computeSize()
// Determine the size using the string "m999{+}" where the 'm' on the front serves as a margin
// so the number isn't too close to the curved edge.
test = "m";
test = wxS( "m" );
test.Pad( len, '9' );
if( m_currentNumber > m_maxNumber )
test += "+";
test += wxS( "+" );
dc.SetFont( wxFont( m_textSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, BADGE_FONTWEIGHT ) );
wxSize size = dc.GetTextExtent( test );

View File

@ -255,7 +255,7 @@ void PROPERTIES_PANEL::update( const SELECTION& aSelection )
if( !converted )
{
wxFAIL_MSG( "Could not convert wxAny to wxVariant" );
wxFAIL_MSG( wxS( "Could not convert wxAny to wxVariant" ) );
available = false;
break;
}
@ -345,7 +345,7 @@ void PROPERTIES_PANEL::onCharHook( wxKeyEvent& aEvent )
m_grid->CommitChangesFromEditor();
/* don't skip this one; if we're not the last property we'll also go to the next row */
}
aEvent.Skip();
}

View File

@ -30,19 +30,19 @@
#include <wx/menu.h>
#include <wx/renderer.h>
#include <wx/settings.h>
#include <wx/version.h>
#include <wx/version.h>
#include <kiplatform/ui.h>
SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos, const wxSize& aSize ) :
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, "DropDownButton" ),
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, wxS( "DropDownButton" ) ),
m_label( aLabel )
{
if( aSize == wxDefaultSize )
{
#if wxCHECK_VERSION( 3, 1, 3 )
wxSize defaultSize = wxButton::GetDefaultSize( aParent );
#else
#else
wxSize defaultSize = wxButton::GetDefaultSize();
#endif

View File

@ -29,20 +29,20 @@
#include <wx/menu.h>
#include <wx/renderer.h>
#include <wx/settings.h>
#include <wx/version.h>
#include <wx/version.h>
#include <kiplatform/ui.h>
STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
const wxBitmap& aDummyBitmap, const wxPoint& aPos,
const wxSize& aSize, int aStyle ) :
wxPanel( aParent, aId, aPos, aSize, aStyle, "StdBitmapButton" )
wxPanel( aParent, aId, aPos, aSize, aStyle, wxS( "StdBitmapButton" ) )
{
if( aSize == wxDefaultSize )
{
#if wxCHECK_VERSION( 3, 1, 3 )
wxSize defaultSize = wxButton::GetDefaultSize( aParent );
#else
#else
wxSize defaultSize = wxButton::GetDefaultSize();
#endif
@ -56,7 +56,7 @@ STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
Bind( wxEVT_LEAVE_WINDOW, &STD_BITMAP_BUTTON::OnMouseLeave, this );
Bind( wxEVT_ENTER_WINDOW, &STD_BITMAP_BUTTON::OnMouseEnter, this );
Bind( wxEVT_SYS_COLOUR_CHANGED,
Bind( wxEVT_SYS_COLOUR_CHANGED,
wxSysColourChangedEventHandler( STD_BITMAP_BUTTON::onThemeChanged ),
this );
}

View File

@ -91,7 +91,7 @@ wxFont KIUI::GetMonospacedUIFont()
#ifdef __WXMAC__
// https://trac.wxwidgets.org/ticket/19210
if( font.GetFaceName().IsEmpty() )
font.SetFaceName( "Menlo" );
font.SetFaceName( wxS( "Menlo" ) );
#endif
return font;
@ -119,7 +119,7 @@ wxFont getGUIFont( wxWindow* aWindow, int aRelativeSize )
#ifdef __WXMAC__
// https://trac.wxwidgets.org/ticket/19210
if( font.GetFaceName().IsEmpty() )
font.SetFaceName( "San Francisco" );
font.SetFaceName( wxS( "San Francisco" ) );
// OSX 10.1 .. 10.9: Lucida Grande
// OSX 10.10: Helvetica Neue
// OSX 10.11 .. : San Francisco

View File

@ -301,7 +301,7 @@ void WIDGET_HOTKEY_LIST::updateFromClientData()
// mark unsaved changes
if( changed_hk.m_EditKeycode != changed_hk.m_Actions[ 0 ]->GetHotKey() )
label += " *";
label += wxS( " *" );
description.Replace( wxS( "\n" ), wxS( " " ) );
description.Replace( wxS( "\r" ), wxS( " " ) );
@ -467,7 +467,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
wxString command_header = _( "Command" );
if( !m_readOnly )
command_header << " " << _( "(double-click to edit)" );
command_header << wxS( " " ) << _( "(double-click to edit)" );
AppendColumn( command_header, 450, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
AppendColumn( _( "Hotkey" ), 120, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
@ -495,8 +495,8 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
std::vector<wxString> reserved_keys =
{
"Ctrl+Tab",
"Ctrl+Shift+Tab"
wxS( "Ctrl+Tab" ),
wxS( "Ctrl+Shift+Tab" )
};
for( const wxString& key : reserved_keys )
@ -506,7 +506,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
if( code )
m_reservedHotkeys[code] = key;
else
wxLogWarning( "Unknown reserved keycode %s\n", key );
wxLogWarning( wxS( "Unknown reserved keycode %s\n" ), key );
}
GetDataView()->SetIndent( 10 );

View File

@ -524,7 +524,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
size = GetRowLabelSize();
for( int row = 0; aContents && row < GetNumberRows(); row++ )
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + "M" ).x ) );
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + wxS( "M" ) ).x ) );
}
else
{
@ -537,14 +537,14 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
{
EnsureColLabelsVisible();
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + "M" ).x ) );
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + wxS( "M" ) ).x ) );
}
for( int row = 0; aContents && row < GetNumberRows(); row++ )
{
// If we have text, get the size. Otherwise, use a placeholder for the checkbox
if( GetTable()->CanGetValueAs( row, aCol, wxGRID_VALUE_STRING ) )
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + "M" ).x );
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + wxS( "M" ) ).x );
else
size = std::max( size, GetTextExtent( "MM" ).x );
}

View File

@ -189,20 +189,20 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
switch( aLine.severity )
{
case RPT_SEVERITY_ERROR:
retv = "<font color=#F04040 size=3>" + _( "Error:" ) + " </font>"
"<font size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#F04040 size=3>" ) + _( "Error:" ) + wxS( " </font>" )
wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_WARNING:
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
retv = wxS( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_INFO:
retv = "<font color=#909090 size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#909090 size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_ACTION:
retv = "<font color=#60D060 size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#60D060 size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
default:
retv = "<font size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
}
}
else
@ -210,26 +210,26 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
switch( aLine.severity )
{
case RPT_SEVERITY_ERROR:
retv = "<font color=#D00000 size=3>" + _( "Error:" ) + " </font>"
"<font size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#D00000 size=3>" ) + _( "Error:" ) + wxS( " </font>" )
wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_WARNING:
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
retv = wxS( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_INFO:
retv = "<font color=#808080 size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#808080 size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
case RPT_SEVERITY_ACTION:
retv = "<font color=#008000 size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font color=#008000 size=3>" ) + aLine.message + wxS( "</font><br>" );
break;
default:
retv = "<font size=3>" + aLine.message + "</font><br>";
retv = wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
}
}
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
// Roman cells. This keeps the line in a single cell.
retv.Replace( " ", "&nbsp;" );
retv.Replace( wxS( " " ), wxS( "&nbsp;" ) );
return retv;
}

View File

@ -88,23 +88,23 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
{
// The "all files" wildcard is different on different systems
wxString filter;
filter << " (" << wxFileSelectorDefaultWildcardStr << ")|"
filter << wxS( " (" ) << wxFileSelectorDefaultWildcardStr << wxS( ")|" )
<< wxFileSelectorDefaultWildcardStr;
return filter;
}
wxString files_filter = " (";
wxString files_filter = wxS( " (" );
// Add extensions to the info message:
for( const std::string& ext : aExts )
{
if( files_filter.length() > 2 )
files_filter << "; ";
files_filter << wxS( "; " );
files_filter << "*." << ext;
}
files_filter << ")|*.";
files_filter << wxS( ")|*." );
// Add extensions to the filter list, using a formatted string (GTK specific):
bool first = true;
@ -112,7 +112,7 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
for( const std::string& ext : aExts )
{
if( !first )
files_filter << ";*.";
files_filter << wxS( ";*." );
first = false;

View File

@ -80,7 +80,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_tcFilterString = nullptr;
m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() );
m_initialized = false;
m_aboutTitle = "CvPcb";
m_aboutTitle = wxS( "CvPcb" );
// Give an icon
wxIcon icon;

View File

@ -127,13 +127,13 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
m_auimgr.SetManagedWindow( this );
CreateInfoBar();
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) )
.Top().Layer( 6 ) );
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( wxS( "OptToolbar" ) )
.Left().Layer( 3 ) );
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
.Center() );
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxS( "MsgPanel" ) )
.Bottom().Layer( 6 ) );
FinishAUIInitialization();

View File

@ -158,7 +158,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
for( const FOOTPRINT_INFO& i : filter )
{
msg.Printf( "%3d %s:%s",
msg.Printf( wxS( "%3d %s:%s" ),
int( newList.GetCount() + 1 ),
i.GetLibNickname(),
i.GetFootprintName() );
@ -211,7 +211,7 @@ void FOOTPRINTS_LISTBOX::OnLeftDClick( wxListEvent& event )
void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event )
{
wxLogTrace( kicadTraceKeyEvent, "FOOTPRINTS_LISTBOX::OnChar %s", dump( event ) );
wxLogTrace( kicadTraceKeyEvent, wxS( "FOOTPRINTS_LISTBOX::OnChar %s" ), dump( event ) );
int key = event.GetKeyCode();

View File

@ -142,7 +142,7 @@ END_EVENT_TABLE()
void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
{
wxLogTrace( kicadTraceKeyEvent, "LIBRARY_LISTBOX::OnChar %s", dump( event ) );
wxLogTrace( kicadTraceKeyEvent, wxS( "LIBRARY_LISTBOX::OnChar %s" ), dump( event ) );
int key = event.GetKeyCode();

View File

@ -82,7 +82,7 @@ void ITEMS_LISTBOX_BASE::UpdateLineWidth( unsigned aLine, wxClientDC& dc )
str = OnGetItemText( aLine, 0 );
else
str = GetItemText( aLine, 0 );
str += " ";
str += wxS( " " );
dc.GetTextExtent( str, &w, nullptr );
newWidth += w;

View File

@ -71,7 +71,7 @@ void CVPCB_MAINFRAME::doReCreateMenuBar()
// We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
// Mac, and it needs the wxID_PREFERENCES id to find it.
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
prefsMenu->Add( _( "Preferences..." ) + wxS( "\tCtrl+," ),
_( "Show preferences for all open tools" ),
wxID_PREFERENCES,
BITMAPS::preference );

View File

@ -35,7 +35,7 @@
SYMBOLS_LISTBOX::SYMBOLS_LISTBOX( CVPCB_MAINFRAME* parent, wxWindowID id ) :
ITEMS_LISTBOX_BASE( parent, id ),
ITEMS_LISTBOX_BASE( parent, id ),
m_warningAttr( std::make_unique<wxListItemAttr>() )
{
m_warningAttr->SetBackgroundColour( KIPLATFORM::UI::IsDarkTheme()
@ -101,7 +101,7 @@ void SYMBOLS_LISTBOX::AppendWarning( int index )
void SYMBOLS_LISTBOX::RemoveWarning( int index )
{
if( auto const found{ std::find( m_symbolWarning.begin(), m_symbolWarning.end(), index ) };
if( auto const found{ std::find( m_symbolWarning.begin(), m_symbolWarning.end(), index ) };
found != m_symbolWarning.end() )
{
m_symbolWarning.erase( found );
@ -121,7 +121,7 @@ wxListItemAttr* SYMBOLS_LISTBOX::OnGetItemAttr( long item ) const
{
return m_warningAttr.get();
}
return nullptr;
return nullptr;
}
@ -144,7 +144,7 @@ void SYMBOLS_LISTBOX::SetSelection( int index, bool State )
void SYMBOLS_LISTBOX::OnChar( wxKeyEvent& event )
{
wxLogTrace( kicadTraceKeyEvent, "SYMBOLS_LISTBOX::OnChar %s", dump( event ) );
wxLogTrace( kicadTraceKeyEvent, wxS( "SYMBOLS_LISTBOX::OnChar %s" ), dump( event ) );
int key = event.GetKeyCode();

View File

@ -150,7 +150,7 @@ public:
for( unsigned field_idx = 0; field_idx < m_fields.size(); ++field_idx )
{
SCH_FIELD* field = m_fields[field_idx];
if( !field->IsVisible() || !field->CanAutoplace() )
continue;
@ -248,7 +248,7 @@ protected:
case PIN_UP: return SIDE_BOTTOM;
case PIN_DOWN: return SIDE_TOP;
default:
wxFAIL_MSG( "Invalid pin orientation" );
wxFAIL_MSG( wxS( "Invalid pin orientation" ) );
return SIDE_LEFT;
}
}
@ -278,7 +278,7 @@ protected:
*/
void getPossibleCollisions( std::vector<SCH_ITEM*>& aItems )
{
wxCHECK_RET( m_screen, "getPossibleCollisions() with null m_screen" );
wxCHECK_RET( m_screen, wxS( "getPossibleCollisions() with null m_screen" ) );
BOX2I symbolBox = m_symbol->GetBodyAndPinsBoundingBox();
std::vector<SIDE_AND_NPINS> sides = getPreferredSides();
@ -670,7 +670,7 @@ protected:
field_xcoord = aFieldBox.GetRight();
break;
default:
wxFAIL_MSG( "Unexpected value for SCH_FIELD::GetHorizJustify()" );
wxFAIL_MSG( wxS( "Unexpected value for SCH_FIELD::GetHorizJustify()" ) );
field_xcoord = aFieldBox.Centre().x; // Most are centered
}
@ -739,7 +739,7 @@ const AUTOPLACER::SIDE AUTOPLACER::SIDE_RIGHT( 1, 0 );
void SCH_SYMBOL::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual )
{
if( aManual )
wxASSERT_MSG( aScreen, "A SCH_SCREEN pointer must be given for manual autoplacement" );
wxASSERT_MSG( aScreen, wxS( "A SCH_SCREEN pointer must be given for manual autoplacement" ) );
AUTOPLACER autoplacer( this, aScreen );
autoplacer.DoAutoplace( aManual );

Some files were not shown because too many files have changed in this diff Show More