From 08b7842c03e5bc5ba92b43306fe5f82827493250 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 10 Apr 2022 12:01:07 +0100 Subject: [PATCH] Fix compile warnings. --- kicad/pcm/dialogs/dialog_pcm_progress.h | 2 +- kicad/pcm/pcm_task_manager.cpp | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/kicad/pcm/dialogs/dialog_pcm_progress.h b/kicad/pcm/dialogs/dialog_pcm_progress.h index 2fe69efbb5..9bd73fb9a7 100644 --- a/kicad/pcm/dialogs/dialog_pcm_progress.h +++ b/kicad/pcm/dialogs/dialog_pcm_progress.h @@ -49,7 +49,7 @@ public: DIALOG_PCM_PROGRESS( wxWindow* parent, bool aShowDownloadSection = true ); ///< Safe to call from non-UI thread. Adds a message to detailed report window. - void Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ); + void Report( const wxString& aText, SEVERITY aSeverity ); ///< Safe to call from non-UI thread. Sets the download progress of the current zip entry. void SetDownloadProgress( uint64_t aDownloaded, uint64_t aTotal ); diff --git a/kicad/pcm/pcm_task_manager.cpp b/kicad/pcm/pcm_task_manager.cpp index f22604a0d6..bf8af22b96 100644 --- a/kicad/pcm/pcm_task_manager.cpp +++ b/kicad/pcm/pcm_task_manager.cpp @@ -95,7 +95,8 @@ void PCM_TASK_MANAGER::DownloadAndInstall( const PCM_PACKAGE& aPackage, const wx else { m_reporter->Report( wxString::Format( _( "Extracting package '%s'." ), - aPackage.identifier ) ); + aPackage.identifier ), + RPT_SEVERITY_INFO ); if( extract( file_path.GetFullPath(), aPackage.identifier, true ) ) { @@ -110,7 +111,8 @@ void PCM_TASK_MANAGER::DownloadAndInstall( const PCM_PACKAGE& aPackage, const wx } m_reporter->Report( wxString::Format( _( "Removing downloaded archive '%s'." ), - file_path.GetFullName() ) ); + file_path.GetFullName() ), + RPT_SEVERITY_INFO ); wxRemoveFile( file_path.GetFullPath() ); }; @@ -147,7 +149,8 @@ int PCM_TASK_MANAGER::downloadFile( const wxString& aFilePath, const wxString& u curl.SetFollowRedirects( true ); curl.SetTransferCallback( callback, 250000L ); - m_reporter->Report( wxString::Format( _( "Downloading package url: '%s'" ), url ) ); + m_reporter->Report( wxString::Format( _( "Downloading package url: '%s'" ), url ), + RPT_SEVERITY_INFO ); int code = curl.Perform(); @@ -247,7 +250,7 @@ bool PCM_TASK_MANAGER::extract( const wxString& aFilePath, const wxString& aPack if( m_reporter->IsCancelled() ) { - m_reporter->Report( _( "Aborting package installation." ) ); + m_reporter->Report( _( "Aborting package installation." ), RPT_SEVERITY_INFO ); return false; } @@ -357,7 +360,8 @@ void PCM_TASK_MANAGER::deletePackageDirectories( const wxString& aPackageId ) if( d.DirExists() ) { - m_reporter->Report( wxString::Format( _( "Removing directory %s" ), d.GetPath() ) ); + m_reporter->Report( wxString::Format( _( "Removing directory %s" ), d.GetPath() ), + RPT_SEVERITY_INFO ); if( !d.Rmdir( wxPATH_RMDIR_RECURSIVE ) ) { @@ -378,8 +382,8 @@ void PCM_TASK_MANAGER::Uninstall( const PCM_PACKAGE& aPackage ) m_pcm->MarkUninstalled( aPackage ); - m_reporter->Report( wxString::Format( _( "Package %s uninstalled" ), - aPackage.identifier ) ); + m_reporter->Report( wxString::Format( _( "Package %s uninstalled" ), aPackage.identifier ), + RPT_SEVERITY_INFO ); }; m_install_queue.push( task ); @@ -444,7 +448,7 @@ void PCM_TASK_MANAGER::RunQueue( wxWindow* aParent ) } while( ( !m_install_queue.empty() || !download_complete ) && !m_reporter->IsCancelled() ); - m_reporter->Report( _( "Done." ) ); + m_reporter->Report( _( "Done." ), RPT_SEVERITY_INFO ); m_reporter->SetFinished(); } );