Coding policy fixes.

This commit is contained in:
Wayne Stambaugh 2023-12-19 14:29:17 -05:00
parent 76d1cc8150
commit 922aee1532
27 changed files with 200 additions and 109 deletions

View File

@ -318,7 +318,8 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
m_params.emplace_back( new PARAM<int>( aJsonPath + ".pos_y", &aWindow->state.pos_y, 0 ) );
m_params.emplace_back( new PARAM<unsigned int>( aJsonPath + ".display", &aWindow->state.display, 0 ) );
m_params.emplace_back( new PARAM<unsigned int>( aJsonPath + ".display",
&aWindow->state.display, 0 ) );
m_params.emplace_back( new PARAM_LIST<double>( aJsonPath + ".zoom_factors",
&aWindow->zoom_factors, {} ) );

View File

@ -43,7 +43,8 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath )
if( aAbsolutePath )
SetLocation( SETTINGS_LOC::NONE );
m_params.emplace_back( new PARAM<wxString>( "meta.name", &m_displayName, wxS( "KiCad Default" ) ) );
m_params.emplace_back( new PARAM<wxString>( "meta.name", &m_displayName,
wxS( "KiCad Default" ) ) );
m_params.emplace_back( new PARAM<bool>( "schematic.override_item_colors",
&m_overrideSchItemColors, false ) );
@ -318,7 +319,8 @@ bool COLOR_SETTINGS::migrateSchema0to1()
if( !Contains( "fpedit" ) )
{
wxLogTrace( traceSettings, wxT( "migrateSchema0to1: %s doesn't have fpedit settings; skipping." ),
wxLogTrace( traceSettings,
wxT( "migrateSchema0to1: %s doesn't have fpedit settings; skipping." ),
m_filename );
return true;
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -151,15 +151,16 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
if( var.GetDefinedInSettings() )
{
wxLogTrace( traceEnvVars,
wxS( "COMMON_SETTINGS: Env var %s was overridden externally, " )
"saving previously-loaded value %s",
wxS( "COMMON_SETTINGS: Env var %s was overridden "
"externally, saving previously-loaded value %s" ),
var.GetKey(), var.GetSettingsValue() );
value = var.GetSettingsValue();
}
else
{
wxLogTrace( traceEnvVars,
wxS( "COMMON_SETTINGS: Env var %s skipping save (external)" ),
wxS( "COMMON_SETTINGS: Env var %s skipping save "
"(external)" ),
var.GetKey() );
continue;
}
@ -189,7 +190,8 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
{
if( m_Env.vars[key].GetDefinedExternally() )
{
wxLogTrace( traceEnvVars, wxS( "COMMON_SETTINGS: %s is defined externally" ),
wxLogTrace( traceEnvVars,
wxS( "COMMON_SETTINGS: %s is defined externally" ),
key );
m_Env.vars[key].SetDefinedInSettings();
m_Env.vars[key].SetSettingsValue( val );
@ -197,14 +199,16 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
}
else
{
wxLogTrace( traceEnvVars, wxS( "COMMON_SETTINGS: Updating %s: %s -> %s"),
wxLogTrace( traceEnvVars,
wxS( "COMMON_SETTINGS: Updating %s: %s -> %s"),
key, m_Env.vars[key].GetValue(), val );
m_Env.vars[key].SetValue( val );
}
}
else
{
wxLogTrace( traceEnvVars, wxS( "COMMON_SETTINGS: Loaded new var: %s = %s" ),
wxLogTrace( traceEnvVars,
wxS( "COMMON_SETTINGS: Loaded new var: %s = %s" ),
key, val );
m_Env.vars[key] = ENV_VAR_ITEM( key, val );
}
@ -541,7 +545,8 @@ bool COMMON_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
{
if( envVarBlacklist.count( key ) )
{
wxLogTrace( traceSettings, wxT( "Migrate Env: %s is blacklisted; skipping." ), key );
wxLogTrace( traceSettings,
wxT( "Migrate Env: %s is blacklisted; skipping." ), key );
continue;
}
@ -551,7 +556,8 @@ bool COMMON_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
{
ptr.push_back( key.ToStdString() );
wxLogTrace( traceSettings, wxT( "Migrate Env: %s=%s" ), ptr.to_string(), value );
wxLogTrace( traceSettings, wxT( "Migrate Env: %s=%s" ),
ptr.to_string(), value );
( *m_internals )[ptr] = value.ToUTF8();
ptr.pop_back();
@ -617,7 +623,8 @@ void COMMON_SETTINGS::InitializeEnvironment()
}
else
{
wxLogTrace( traceEnvVars, wxS( "InitializeEnvironment: Setting entry %s to default %s" ),
wxLogTrace( traceEnvVars, wxS( "InitializeEnvironment: Setting entry %s to "
"default %s" ),
aKey, aDefault );
}
};

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -51,7 +51,8 @@ CVPCB_SETTINGS::CVPCB_SETTINGS() :
addParamsForWindow( &m_FootprintViewer, "footprint_viewer" );
m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom", &m_FootprintViewerZoom, 1.0 ) );
m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom", &m_FootprintViewerZoom,
1.0 ) );
m_params.emplace_back( new PARAM<bool>( "footprint_viewer.autozoom",
&m_FootprintViewerAutoZoomOnSelect, true ) );

View File

@ -199,7 +199,8 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
else
{
success = true;
wxLogTrace( traceSettings, wxT( "%s: migrated from legacy format" ), GetFullFilename() );
wxLogTrace( traceSettings, wxT( "%s: migrated from legacy format" ),
GetFullFilename() );
}
if( backed_up )
@ -296,7 +297,8 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
if( filever >= 0 && filever < m_schemaVersion )
{
wxLogTrace( traceSettings, wxT( "%s: attempting migration from version %d to %d" ),
wxLogTrace( traceSettings, wxT( "%s: attempting migration from version "
"%d to %d" ),
GetFullFilename(), filever, m_schemaVersion );
if( Migrate() )
@ -305,7 +307,8 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
}
else
{
wxLogTrace( traceSettings, wxT( "%s: migration failed!" ), GetFullFilename() );
wxLogTrace( traceSettings, wxT( "%s: migration failed!" ),
GetFullFilename() );
}
}
else if( filever > m_schemaVersion )
@ -326,7 +329,8 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
success = false;
wxLogTrace( traceSettings, wxT( "Json parse error reading %s: %s" ),
path.GetFullPath(), error.what() );
wxLogTrace( traceSettings, wxT( "Attempting migration in case file is in legacy format" ) );
wxLogTrace( traceSettings, wxT( "Attempting migration in case file is in legacy "
"format" ) );
migrateFromLegacy( path );
}
}
@ -338,7 +342,8 @@ bool JSON_SETTINGS::LoadFromFile( const wxString& aDirectory )
for( auto settings : m_nested_settings )
settings->LoadFromFile();
wxLogTrace( traceSettings, wxT( "Loaded <%s> with schema %d" ), GetFullFilename(), m_schemaVersion );
wxLogTrace( traceSettings, wxT( "Loaded <%s> with schema %d" ), GetFullFilename(),
m_schemaVersion );
// If we migrated, clean up the legacy file (with no extension)
if( m_writeFile && ( legacy_migrated || migrated ) )
@ -404,8 +409,8 @@ bool JSON_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
if( !m_createIfMissing && !path.FileExists() )
{
wxLogTrace( traceSettings,
wxT( "File for %s doesn't exist and m_createIfMissing == false; not saving" ),
GetFullFilename() );
wxT( "File for %s doesn't exist and m_createIfMissing == false; not saving" ),
GetFullFilename() );
return false;
}
@ -420,7 +425,8 @@ bool JSON_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
if( ( path.FileExists() && !path.IsFileWritable() ) ||
( !path.FileExists() && !path.IsDirWritable() ) )
{
wxLogTrace( traceSettings, wxT( "File for %s is read-only; not saving" ), GetFullFilename() );
wxLogTrace( traceSettings, wxT( "File for %s is read-only; not saving" ),
GetFullFilename() );
return false;
}
@ -433,13 +439,14 @@ bool JSON_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
if( !modified && !aForce && path.FileExists() )
{
wxLogTrace( traceSettings, wxT( "%s contents not modified, skipping save" ), GetFullFilename() );
wxLogTrace( traceSettings, wxT( "%s contents not modified, skipping save" ),
GetFullFilename() );
return false;
}
else if( !modified && !aForce && !m_createIfDefault )
{
wxLogTrace( traceSettings,
wxT( "%s contents still default and m_createIfDefault == false; not saving" ),
wxT( "%s contents still default and m_createIfDefault == false; not saving" ),
GetFullFilename() );
return false;
}
@ -841,7 +848,6 @@ void JSON_SETTINGS::ReleaseNestedSettings( NESTED_SETTINGS* aSettings )
// Specializations to allow conversion between wxString and std::string via JSON_SETTINGS API
template<> std::optional<wxString> JSON_SETTINGS::Get( const std::string& aPath ) const
{
if( std::optional<nlohmann::json> opt_json = GetJson( aPath ) )
@ -856,8 +862,8 @@ template<> void JSON_SETTINGS::Set<wxString>( const std::string& aPath, wxString
( *m_internals )[aPath] = aVal.ToUTF8();
}
// Specializations to allow directly reading/writing wxStrings from JSON
// Specializations to allow directly reading/writing wxStrings from JSON
void to_json( nlohmann::json& aJson, const wxString& aString )
{
aJson = aString.ToUTF8();
@ -892,5 +898,6 @@ ResultType JSON_SETTINGS::fetchOrDefault( const nlohmann::json& aJson, const std
template std::string JSON_SETTINGS::fetchOrDefault( const nlohmann::json& aJson,
const std::string& aKey, std::string aDefault );
template bool JSON_SETTINGS::fetchOrDefault( const nlohmann::json& aJson, const std::string& aKey,
bool aDefault );

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020, 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -26,6 +26,7 @@
///! Update the schema version whenever a migration is required
const int kicadSchemaVersion = 0;
const nlohmann::json PCM_DEFAULT_REPOSITORIES = nlohmann::json::array( {
nlohmann::json( {
{ "name", "KiCad official repository" },
@ -48,7 +49,8 @@ KICAD_SETTINGS::KICAD_SETTINGS() :
m_params.emplace_back(
new PARAM<wxString>( "system.last_received_update", &m_lastReceivedUpdate, "" ) );
m_params.emplace_back( new PARAM<bool>( "system.check_for_kicad_updates", &m_KiCadUpdateCheck, true ) );
m_params.emplace_back( new PARAM<bool>( "system.check_for_kicad_updates", &m_KiCadUpdateCheck,
true ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>(
"pcm.repositories",
@ -92,7 +94,8 @@ KICAD_SETTINGS::KICAD_SETTINGS() :
m_params.emplace_back( new PARAM<bool>( "pcm.lib_auto_remove", &m_PcmLibAutoRemove, true ) );
m_params.emplace_back( new PARAM<wxString>( "pcm.lib_prefix", &m_PcmLibPrefix, wxS( "PCM_" ) ) );
m_params.emplace_back( new PARAM<wxString>( "pcm.lib_prefix", &m_PcmLibPrefix,
wxS( "PCM_" ) ) );
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020, 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -24,6 +24,7 @@
#include <settings/nested_settings.h>
#include <locale_io.h>
NESTED_SETTINGS::NESTED_SETTINGS( const std::string& aName, int aVersion, JSON_SETTINGS* aParent,
const std::string& aPath ) :
JSON_SETTINGS( aName, SETTINGS_LOC::NESTED, aVersion ),
@ -61,7 +62,8 @@ bool NESTED_SETTINGS::LoadFromFile( const wxString& aDirectory )
}
catch( ... )
{
wxLogTrace( traceSettings, wxT( "NESTED_SETTINGS %s: Could not load from %s at %s" ),
wxLogTrace( traceSettings, wxT( "NESTED_SETTINGS %s: Could not load from "
"%s at %s" ),
m_filename, m_parent->GetFilename(), m_path );
}
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021, 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -94,7 +94,8 @@ JSON_SETTINGS* SETTINGS_MANAGER::registerSettings( JSON_SETTINGS* aSettings, boo
ptr->SetManager( this );
wxLogTrace( traceSettings, wxT( "Registered new settings object <%s>" ), ptr->GetFullFilename() );
wxLogTrace( traceSettings, wxT( "Registered new settings object <%s>" ),
ptr->GetFullFilename() );
if( aLoadNow )
ptr->LoadFromFile( GetPathForSettingsFile( ptr.get() ) );
@ -237,7 +238,8 @@ COLOR_SETTINGS* SETTINGS_MANAGER::loadColorSettingsByName( const wxString& aName
if( !fn.IsOk() || !fn.Exists() )
{
wxLogTrace( traceSettings, wxT( "Theme file %s.json not found, falling back to user" ), aName );
wxLogTrace( traceSettings, wxT( "Theme file %s.json not found, falling back to user" ),
aName );
return nullptr;
}
@ -532,7 +534,8 @@ bool SETTINGS_MANAGER::MigrateIfNeeded()
if( m_headless )
{
// Special case namely for cli
// Ensure the settings directory at least exists to prevent additional loading errors from subdirectories
// Ensure the settings directory at least exists to prevent additional loading errors
// from subdirectories.
// TODO review headless (unit tests) vs cli needs, this should be fine for unit tests though
if( !path.DirExists() )
{
@ -635,7 +638,8 @@ bool SETTINGS_MANAGER::GetPreviousVersionPaths( std::vector<wxString>* aPaths )
// If the env override is set, also check the default paths
if( wxGetEnv( wxT( "KICAD_CONFIG_HOME" ), nullptr ) )
base_paths.emplace_back( wxFileName( PATHS::CalculateUserSettingsPath( false, false ), wxS( "" ) ) );
base_paths.emplace_back( wxFileName( PATHS::CalculateUserSettingsPath( false, false ),
wxS( "" ) ) );
#ifdef __WXGTK__
// When running inside FlatPak, KIPLATFORM::ENV::GetUserConfigPath() will return a sandboxed
@ -765,6 +769,8 @@ wxString SETTINGS_MANAGER::GetColorSettingsPath()
return path.GetPath();
}
std::string SETTINGS_MANAGER::GetSettingsVersion()
{
// CMake computes the major.minor string for us.
@ -781,7 +787,8 @@ int SETTINGS_MANAGER::compareVersions( const std::string& aFirst, const std::str
if( !extractVersion( aFirst, &a_maj, &a_min ) || !extractVersion( aSecond, &b_maj, &b_min ) )
{
wxLogTrace( traceSettings, wxT( "compareSettingsVersions: bad input (%s, %s)" ), aFirst, aSecond );
wxLogTrace( traceSettings, wxT( "compareSettingsVersions: bad input (%s, %s)" ),
aFirst, aSecond );
return -1;
}
@ -1163,7 +1170,8 @@ bool SETTINGS_MANAGER::BackupProject( REPORTER& aReporter ) const
if( !target.DirExists() && !wxMkdir( target.GetPath() ) )
{
wxLogTrace( traceSettings, wxT( "Could not create project backup path %s" ), target.GetPath() );
wxLogTrace( traceSettings, wxT( "Could not create project backup path %s" ),
target.GetPath() );
return false;
}

View File

@ -224,7 +224,8 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCheckMultipleDrivers )
}
void CONNECTION_SUBGRAPH::getAllConnectedItems( std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>>& aItems,
void CONNECTION_SUBGRAPH::getAllConnectedItems( std::set<std::pair<SCH_SHEET_PATH,
SCH_ITEM*>>& aItems,
std::set<CONNECTION_SUBGRAPH*>& aSubgraphs )
{
CONNECTION_SUBGRAPH* sg = this;
@ -1370,8 +1371,8 @@ void CONNECTION_GRAPH::generateBusAliasMembers()
CONNECTION_SUBGRAPH* new_sg = new CONNECTION_SUBGRAPH( this );
// This connection cannot form a part of the item because the item is not, itself
// connected to this subgraph. It exists as part of a virtual item that may be connected
// to other items but is not in the schematic.
// connected to this subgraph. It exists as part of a virtual item that may be
// connected to other items but is not in the schematic.
SCH_CONNECTION* new_conn = new SCH_CONNECTION( item, subgraph->m_sheet );
new_conn->SetGraph( this );
new_conn->SetName( name );
@ -1399,7 +1400,8 @@ void CONNECTION_GRAPH::generateBusAliasMembers()
}
}
std::copy( new_subgraphs.begin(), new_subgraphs.end(), std::back_inserter( m_driver_subgraphs ) );
std::copy( new_subgraphs.begin(), new_subgraphs.end(),
std::back_inserter( m_driver_subgraphs ) );
}
void CONNECTION_GRAPH::generateGlobalPowerPinSubGraphs()
@ -2039,7 +2041,6 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
}
}
auto updateItemConnectionsTask =
[&]( CONNECTION_SUBGRAPH* subgraph ) -> size_t
{

View File

@ -208,12 +208,16 @@ bool EE_SELECTION_TOOL::Init()
m_isSymbolViewer = symbolViewerFrame != nullptr;
}
auto linesSelection = E_C::MoreThan( 0 ) && E_C::OnlyTypes( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T,
SCH_ITEM_LOCATE_GRAPHIC_LINE_T } );
auto wireOrBusSelection = E_C::Count( 1 ) && E_C::OnlyTypes( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T } );
auto linesSelection = E_C::MoreThan( 0 ) &&
E_C::OnlyTypes( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T,
SCH_ITEM_LOCATE_GRAPHIC_LINE_T } );
auto wireOrBusSelection = E_C::Count( 1 ) &&
E_C::OnlyTypes( { SCH_ITEM_LOCATE_WIRE_T,
SCH_ITEM_LOCATE_BUS_T } );
auto connectedSelection = E_C::Count( 1 ) && E_C::OnlyTypes( connectedTypes );
auto sheetSelection = E_C::Count( 1 ) && E_C::OnlyTypes( { SCH_SHEET_T } );
auto crossProbingSelection = E_C::MoreThan( 0 ) && E_C::HasTypes( { SCH_SYMBOL_T, SCH_PIN_T, SCH_SHEET_T } );
auto crossProbingSelection = E_C::MoreThan( 0 ) &&
E_C::HasTypes( { SCH_SYMBOL_T, SCH_PIN_T, SCH_SHEET_T } );
auto schEditSheetPageNumberCondition =
[&] ( const SELECTION& aSel )
@ -279,10 +283,12 @@ bool EE_SELECTION_TOOL::Init()
menu.AddItem( EE_ACTIONS::drawBus, schEditCondition && EE_CONDITIONS::Empty, 100 );
menu.AddSeparator( 100 );
menu.AddItem( ACTIONS::finishInteractive, SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus, 100 );
menu.AddItem( ACTIONS::finishInteractive,
SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus, 100 );
menu.AddItem( EE_ACTIONS::enterSheet, sheetSelection && EE_CONDITIONS::Idle, 150 );
menu.AddItem( EE_ACTIONS::selectOnPCB, crossProbingSelection && EE_CONDITIONS::Idle, 150 );
menu.AddItem( EE_ACTIONS::selectOnPCB,
crossProbingSelection && EE_CONDITIONS::Idle, 150 );
menu.AddItem( EE_ACTIONS::leaveSheet, belowRootSheetCondition, 150 );
menu.AddSeparator( 200 );
@ -308,7 +314,8 @@ bool EE_SELECTION_TOOL::Init()
m_frame->AddStandardSubMenus( m_menu );
m_disambiguateTimer.SetOwner( this );
Connect( wxEVT_TIMER, wxTimerEventHandler( EE_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
Connect( wxEVT_TIMER, wxTimerEventHandler( EE_SELECTION_TOOL::onDisambiguationExpire ),
nullptr, this );
return true;
}
@ -649,10 +656,18 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
switch( pin->GetOrientation() )
{
case PIN_ORIENTATION::PIN_LEFT: stub = VECTOR2I( 1 * wireGrid.x, 0 ); break;
case PIN_ORIENTATION::PIN_RIGHT: stub = VECTOR2I( -1 * wireGrid.x, 0 ); break;
case PIN_ORIENTATION::PIN_UP: stub = VECTOR2I( 0, 1 * wireGrid.y ); break;
case PIN_ORIENTATION::PIN_DOWN: stub = VECTOR2I( 0, -1 * wireGrid.y ); break;
case PIN_ORIENTATION::PIN_LEFT:
stub = VECTOR2I( 1 * wireGrid.x, 0 );
break;
case PIN_ORIENTATION::PIN_RIGHT:
stub = VECTOR2I( -1 * wireGrid.x, 0 );
break;
case PIN_ORIENTATION::PIN_UP:
stub = VECTOR2I( 0, 1 * wireGrid.y );
break;
case PIN_ORIENTATION::PIN_DOWN:
stub = VECTOR2I( 0, -1 * wireGrid.y );
break;
}
wire->SetEndPoint( pin->GetPosition() + stub );
@ -747,7 +762,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
commit.Push( wxS( "Label Pins" ) );
// Many users will want to drag these items to wire off of the pins, so pre-select them
// Many users will want to drag these items to wire off of the pins, so
// pre-select them.
ClearSelection();
AddItemsToSel( &newItems );
}
@ -1127,7 +1143,8 @@ bool EE_SELECTION_TOOL::selectPoint( EE_COLLECTOR& aCollector, const VECTOR2I& a
{
aCollector[i]->ClearFlags( flags );
// Need to update end shadows after ctrl-click unselecting one of two selected endpoints
// Need to update end shadows after ctrl-click unselecting one of two selected
// endpoints.
if( isLine )
getView()->Update( aCollector[i] );
@ -1297,7 +1314,6 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item );
// Lines are hard to hit. Give them a bit more slop to still be considered "exact".
if( line || ( shape && shape->GetShape() == SHAPE_T::POLY )
|| ( shape && shape->GetShape() == SHAPE_T::ARC ) )
{
@ -1356,7 +1372,8 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
if( line )
{
dist = KiROUND( DistanceLinePoint( line->GetStartPoint(), line->GetEndPoint(), pos ) );
dist = KiROUND( DistanceLinePoint( line->GetStartPoint(),
line->GetEndPoint(), pos ) );
}
else if( field )
{

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020, 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -191,7 +191,8 @@ private:
static bool getLegacy3DHollerith( const std::string& aString, size_t& aIndex,
wxString& aResult );
bool readLegacy3DResolverCfg( const wxString& aPath, std::vector<LEGACY_3D_SEARCH_PATH>& aSearchPaths );
bool readLegacy3DResolverCfg( const wxString& aPath,
std::vector<LEGACY_3D_SEARCH_PATH>& aSearchPaths );
public:
APPEARANCE m_Appearance;

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -160,7 +160,8 @@ void CLI::COMMAND::addDrawingSheetArg()
m_argParser.add_argument( ARG_DRAWING_SHEET )
.default_value( std::string() )
.help( UTF8STDSTR( _( "Path to drawing sheet, this overrides any existing project defined sheet when used" ) ) )
.help( UTF8STDSTR( _( "Path to drawing sheet, this overrides any existing project "
"defined sheet when used" ) ) )
.metavar( "SHEET_PATH" );
}
@ -173,7 +174,8 @@ void CLI::COMMAND::addDefineArg()
.default_value( std::vector<std::string>() )
.append()
.help( UTF8STDSTR(
_( "Overrides or adds project variables, can be used multiple times to declare multiple variables."
_( "Overrides or adds project variables, can be used multiple times to "
"declare multiple variables."
"\nUse in the format of '--define-var key=value' or '-D key=value'" ) ) )
.metavar( "KEY=VALUE" );
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -63,22 +63,24 @@ public:
protected:
/**
* Sets up the most common of args used across cli
* Set up the most common of args used across cli
*
* @param aInput Configures the input arg
* @param aOutput Configures the output arg
* @param aInputIsDir Configures whether the input arg description will be for a file or directory
* @param aOutputIsDir Configures whether the output arg description will be for a file or directory
* @param aInputIsDir Configures whether the input arg description will be for a file or
* directory
* @param aOutputIsDir Configures whether the output arg description will be for a file or
* directory
*/
void addCommonArgs( bool aInput, bool aOutput, bool aInputIsDir, bool aOutputIsDir );
/**
* Sets up the drawing sheet arg used by many of the export commands
* Set up the drawing sheet arg used by many of the export commands
*/
void addDrawingSheetArg();
/**
* Sets up the drawing sheet arg used by many of the export commands
* Set up the drawing sheet arg used by many of the export commands
*/
void addDefineArg();
@ -145,4 +147,4 @@ protected:
}
#endif
#endif

View File

@ -34,14 +34,16 @@
CLI::FP_EXPORT_SVG_COMMAND::FP_EXPORT_SVG_COMMAND() : PCB_EXPORT_BASE_COMMAND( "svg", true, true )
{
m_argParser.add_description( UTF8STDSTR( _( "Exports the footprint or entire footprint library to SVG" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Exports the footprint or entire footprint "
"library to SVG" ) ) );
addLayerArg( false );
addDefineArg();
m_argParser.add_argument( "-t", ARG_THEME )
.default_value( std::string() )
.help( UTF8STDSTR( _( "Color theme to use (will default to footprint editor settings)" ) ) );
.help( UTF8STDSTR( _( "Color theme to use (will default to footprint editor "
"settings)" ) ) );
m_argParser.add_argument( "--fp", ARG_FOOTPRINT )
.default_value( std::string() )

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -32,7 +32,8 @@
CLI::FP_UPGRADE_COMMAND::FP_UPGRADE_COMMAND() : PCB_EXPORT_BASE_COMMAND( "upgrade", true, true )
{
m_argParser.add_description( UTF8STDSTR( _( "Upgrades the footprint library to the current kicad version format" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Upgrades the footprint library to the current "
"kicad version format" ) ) );
m_argParser.add_argument( ARG_FORCE )
.help( UTF8STDSTR(

View File

@ -43,7 +43,8 @@ CLI::PCB_DRC_COMMAND::PCB_DRC_COMMAND() : COMMAND( "drc" )
addCommonArgs( true, true, false, false );
addDefineArg();
m_argParser.add_description( UTF8STDSTR( _( "Runs the Design Rules Check (DRC) on the PCB and creates a report" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Runs the Design Rules Check (DRC) on the PCB "
"and creates a report" ) ) );
m_argParser.add_argument( ARG_FORMAT )
.default_value( std::string( "report" ) )
@ -61,22 +62,26 @@ CLI::PCB_DRC_COMMAND::PCB_DRC_COMMAND() : COMMAND( "drc" )
.metavar( "UNITS" );
m_argParser.add_argument( ARG_SEVERITY_ALL )
.help( UTF8STDSTR( _( "Report all DRC violations, this is equivalent to including all the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all DRC violations, this is equivalent to including "
"all the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_ERROR )
.help( UTF8STDSTR( _( "Report all DRC error level violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all DRC error level violations, this can be combined "
"with the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_WARNING )
.help( UTF8STDSTR( _( "Report all DRC warning level violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all DRC warning level violations, this can be combined "
"with the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_EXCLUSIONS )
.help( UTF8STDSTR( _( "Report all excluded DRC violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all excluded DRC violations, this can be combined with "
"the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );

View File

@ -126,14 +126,16 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
if( m_format == JOB_EXPORT_PCB_3D::FORMAT::STEP )
{
m_argParser.add_argument( ARG_NO_OPTIMIZE_STEP )
.help( UTF8STDSTR( _( "Do not optimize STEP file (enables writing parametric curves)" ) ) )
.help( UTF8STDSTR( _( "Do not optimize STEP file (enables writing parametric "
"curves)" ) ) )
.implicit_value( true )
.default_value( false );
}
m_argParser.add_argument( ARG_USER_ORIGIN )
.default_value( std::string() )
.help( UTF8STDSTR( _( "User-specified output origin ex. 1x1in, 1x1inch, 25.4x25.4mm (default unit mm)" ) ) );
.help( UTF8STDSTR( _( "User-specified output origin ex. 1x1in, 1x1inch, 25.4x25.4mm "
"(default unit mm)" ) ) );
if( m_format == JOB_EXPORT_PCB_3D::FORMAT::VRML )
{
@ -149,7 +151,8 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
"empty, the models will be embedded in main exported VRML file" ) ) );
m_argParser.add_argument( ARG_VRML_MODELS_RELATIVE )
.help( UTF8STDSTR( _( "Used with --models-dir to output relative paths in the resulting file" ) ) )
.help( UTF8STDSTR( _( "Used with --models-dir to output relative paths in the "
"resulting file" ) ) )
.implicit_value( true )
.default_value( false );
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -72,7 +72,8 @@ CLI::PCB_EXPORT_BASE_COMMAND::PCB_EXPORT_BASE_COMMAND( const std::string& aName,
}
LSEQ CLI::PCB_EXPORT_BASE_COMMAND::convertLayerStringList( wxString& aLayerString, bool& aLayerArgSet ) const
LSEQ CLI::PCB_EXPORT_BASE_COMMAND::convertLayerStringList( wxString& aLayerString,
bool& aLayerArgSet ) const
{
LSEQ layerMask;

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -42,7 +42,8 @@ namespace CLI
struct PCB_EXPORT_BASE_COMMAND : public COMMAND
{
PCB_EXPORT_BASE_COMMAND( const std::string& aName, bool aInputIsDir = false, bool aOutputIsDir = false );
PCB_EXPORT_BASE_COMMAND( const std::string& aName, bool aInputIsDir = false,
bool aOutputIsDir = false );
protected:
int doPerform( KIWAY& aKiway ) override;

View File

@ -41,7 +41,8 @@
#define ARG_MAP_FORMAT "--map-format"
#define ARG_DRILL_ORIGIN "--drill-origin"
CLI::PCB_EXPORT_DRILL_COMMAND::PCB_EXPORT_DRILL_COMMAND() : PCB_EXPORT_BASE_COMMAND( "drill", false, true )
CLI::PCB_EXPORT_DRILL_COMMAND::PCB_EXPORT_DRILL_COMMAND() : PCB_EXPORT_BASE_COMMAND( "drill",
false, true )
{
m_argParser.add_description( UTF8STDSTR( _( "Generate Drill Files" ) ) );

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -46,12 +46,14 @@ CLI::PCB_EXPORT_GERBERS_COMMAND::PCB_EXPORT_GERBERS_COMMAND() :
m_argParser.add_argument( "--cl", ARG_COMMON_LAYERS )
.default_value( std::string() )
.help( UTF8STDSTR(
_( "Layers to include on each plot, comma separated list of untranslated layer names to include such as "
_( "Layers to include on each plot, comma separated list of untranslated "
"layer names to include such as "
"F.Cu,B.Cu" ) ) )
.metavar( "COMMON_LAYER_LIST" );
m_argParser.add_argument( ARG_USE_BOARD_PLOT_PARAMS )
.help( UTF8STDSTR( _( "Use the Gerber plot settings already configured in the board file" ) ) )
.help( UTF8STDSTR( _( "Use the Gerber plot settings already configured in the "
"board file" ) ) )
.implicit_value( true )
.default_value( false );
}

View File

@ -42,7 +42,8 @@ CLI::SCH_ERC_COMMAND::SCH_ERC_COMMAND() : COMMAND( "erc" )
addCommonArgs( true, true, false, false );
addDefineArg();
m_argParser.add_description( UTF8STDSTR( _( "Runs the Electrical Rules Check (ERC) on the schematic and creates a report" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Runs the Electrical Rules Check (ERC) on the "
"schematic and creates a report" ) ) );
m_argParser.add_argument( ARG_FORMAT )
.default_value( std::string( "report" ) )
@ -54,22 +55,26 @@ CLI::SCH_ERC_COMMAND::SCH_ERC_COMMAND() : COMMAND( "erc" )
_( "Report units; valid options: in, mm, mils" ) ) );
m_argParser.add_argument( ARG_SEVERITY_ALL )
.help( UTF8STDSTR( _( "Report all ERC violations, this is equivalent to including all the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all ERC violations, this is equivalent to including "
"all the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_ERROR )
.help( UTF8STDSTR( _( "Report all ERC error level violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all ERC error level violations, this can be combined "
"with the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_WARNING )
.help( UTF8STDSTR( _( "Report all ERC warning level violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all ERC warning level violations, this can be combined "
"with the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_SEVERITY_EXCLUSIONS )
.help( UTF8STDSTR( _( "Report all excluded ERC violations, this can be combined with the other severity arguments" ) ) )
.help( UTF8STDSTR( _( "Report all excluded ERC violations, this can be combined "
"with the other severity arguments" ) ) )
.implicit_value( true )
.default_value( false );
@ -108,6 +113,7 @@ int CLI::SCH_ERC_COMMAND::doPerform( KIWAY& aKiway )
{
ercJob->m_severity |= RPT_SEVERITY_EXCLUSION;
}
wxString units = From_UTF8( m_argParser.get<std::string>( ARG_UNITS ).c_str() );
if( units == wxS( "mm" ) )
@ -129,6 +135,7 @@ int CLI::SCH_ERC_COMMAND::doPerform( KIWAY& aKiway )
}
wxString format = From_UTF8( m_argParser.get<std::string>( ARG_FORMAT ).c_str() );
if( format == "report" )
{
ercJob->m_format = JOB_SCH_ERC::OUTPUT_FORMAT::REPORT;

View File

@ -27,7 +27,8 @@ namespace CLI
{
// Options for selecting presets of the export, e.g. GroupedByValue and CSV
#define ARG_PRESET "--preset"
#define ARG_PRESET_DESC "Use a named BOM preset setting from the schematic, e.g. \"Grouped By Value\"."
#define ARG_PRESET_DESC "Use a named BOM preset setting from the schematic, e.g. " \
"\"Grouped By Value\"."
#define ARG_FMT_PRESET "--format-preset"
#define ARG_FMT_PRESET_DESC "Use a named BOM format preset setting from the schematic, e.g. CSV."
@ -43,13 +44,15 @@ namespace CLI
#define ARG_REF_DELIMITER_DESC "Character to place between individual references."
#define ARG_REF_RANGE_DELIMITER "--ref-range-delimiter"
#define ARG_REF_RANGE_DELIMITER_DESC "Character to place in ranges of references. Leave blank for no ranges."
#define ARG_REF_RANGE_DELIMITER_DESC "Character to place in ranges of references. Leave " \
"blank for no ranges."
#define ARG_KEEP_TABS "--keep-tabs"
#define ARG_KEEP_TABS_DESC "Keep tab characters from input fields. Stripped by default."
#define ARG_KEEP_LINE_BREAKS "--keep-line-breaks"
#define ARG_KEEP_LINE_BREAKS_DESC "Keep line break characters from input fields. Stripped by default."
#define ARG_KEEP_LINE_BREAKS_DESC "Keep line break characters from input fields. Stripped " \
"by default."
//Options for controlling the fields and the grouping
#define ARG_FIELDS "--fields"

View File

@ -61,7 +61,8 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName,
{
m_argParser.add_argument( "-t", ARG_THEME )
.default_value( std::string() )
.help( UTF8STDSTR( _( "Color theme to use (will default to schematic settings)" ) ) )
.help( UTF8STDSTR( _( "Color theme to use (will default to schematic "
"settings)" ) ) )
.metavar( "THEME_NAME" );
m_argParser.add_argument( "-b", ARG_BLACKANDWHITE )
.help( UTF8STDSTR( _( ARG_BLACKANDWHITE_DESC ) ) )
@ -94,7 +95,8 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName,
m_argParser.add_argument( "-p", ARG_PAGES )
.default_value( std::string() )
.help( UTF8STDSTR( _( "List of page numbers separated by comma to print, blank or unspecified is equivalent to all pages" ) ) )
.help( UTF8STDSTR( _( "List of page numbers separated by comma to print, blank or "
"unspecified is equivalent to all pages" ) ) )
.metavar( "PAGE_LIST" );
if( aPlotFormat == SCH_PLOT_FORMAT::HPGL )

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -29,20 +29,24 @@
#include <macros.h>
#include <wx/tokenzr.h>
#define ARG_NO_BACKGROUND_COLOR "--no-background-color"
#define ARG_SYMBOL "--symbol"
#define ARG_INC_HIDDEN_PINS "--include-hidden-pins"
#define ARG_INC_HIDDEN_FIELDS "--include-hidden-fields"
CLI::SYM_EXPORT_SVG_COMMAND::SYM_EXPORT_SVG_COMMAND() : COMMAND( "svg" )
{
addCommonArgs( true, true, false, true );
m_argParser.add_description( UTF8STDSTR( _( "Exports the symbol or entire symbol library to SVG" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Exports the symbol or entire symbol library "
"to SVG" ) ) );
m_argParser.add_argument( "-t", ARG_THEME )
.default_value( std::string() )
.help( UTF8STDSTR( _( "Color theme to use (will default to symbol editor settings)" ) ) )
.help( UTF8STDSTR( _( "Color theme to use (will default to symbol editor "
"settings)" ) ) )
.metavar( "THEME_NAME" );
m_argParser.add_argument( "-s", ARG_SYMBOL )

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -28,13 +28,16 @@
#include <macros.h>
#define ARG_FORCE "--force"
CLI::SYM_UPGRADE_COMMAND::SYM_UPGRADE_COMMAND() : COMMAND( "upgrade" )
{
addCommonArgs( true, true, false, false );
m_argParser.add_description( UTF8STDSTR( _( "Upgrades the symbol library to the current kicad version format" ) ) );
m_argParser.add_description( UTF8STDSTR( _( "Upgrades the symbol library to the current "
"kicad version format" ) ) );
m_argParser.add_argument( ARG_FORCE )
.help( UTF8STDSTR(

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -26,8 +26,10 @@
#include <string_utils.h>
#include <build_version.h>
#define ARG_FORMAT "--format"
CLI::VERSION_COMMAND::VERSION_COMMAND() : COMMAND( "version" )
{
m_argParser.add_description( UTF8STDSTR( _( "Reports the version info in various formats" ) ) );
@ -44,8 +46,8 @@ int CLI::VERSION_COMMAND::doPerform( KIWAY& aKiway )
{
// were we redirected from the --version?
// m_argParser override for bool() returns false if we didnt parse any args normally
// we need to exit here early because it'll exception in the later arg handling code if we dont
// no arg provided also ends up here on the version command
// we need to exit here early because it'll exception in the later arg handling code
// if we don't no arg provided also ends up here on the version command
wxPrintf( "%s\n", GetMajorMinorPatchVersion() );
return EXIT_CODES::OK;
}