Code improvements

This commit is contained in:
Valentino Orlandi 2022-10-23 18:15:41 +02:00
parent 3ed82a8ba9
commit 24b0e8b599
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
3 changed files with 7 additions and 7 deletions

View File

@ -603,7 +603,7 @@ void MainWindow::readConfigs()
}*/
}
} catch ( const std::ios_base::failure&/* err*/ ) {
} catch ( const std::ios_base::failure& ) {
// failed reading
proceed = false;
err_msg = DialogSec::tr("An error occured while reading the configuration file");
@ -1752,7 +1752,7 @@ void MainWindow::on_button_LogFiles_ViewFile_clicked()
item = this->craplog.getLogFileItem(
this->ui->listLogFiles->selectedItems().takeFirst()->text(0) );
} catch (const GenericException& e) {
} catch ( const GenericException& ) {
// failed to find file
proceed = false;
DialogSec::errFileNotFound( QString::fromStdString( item.path ), true );
@ -1807,7 +1807,7 @@ void MainWindow::on_button_LogFiles_ViewFile_clicked()
// try reading as gzip compressed file
GZutils::readFile( item.path, content );
} catch (const GenericException) {
} catch ( const GenericException& ) {
// failed closing file pointer
throw;
@ -1819,7 +1819,7 @@ void MainWindow::on_button_LogFiles_ViewFile_clicked()
IOutils::readFile( item.path, content );
}
} catch (const GenericException/*& e*/) {
} catch ( const GenericException& ) {
// failed closing gzip file pointer
proceed = false;
// >> e.what() << //
@ -1827,7 +1827,7 @@ void MainWindow::on_button_LogFiles_ViewFile_clicked()
DialogSec::tr("Failed to read gzipped file"),
item.name) );
/*} catch (const std::ios_base::failure& err) {
/*} catch ( const std::ios_base::failure& err ) {
// failed reading as text
proceed = false;
// >> err.what() << //

View File

@ -936,7 +936,7 @@ void Craplog::joinLogLines()
QString::fromStdString( file.path )
).toStdString() );
} catch (const std::ios_base::failure& err) {
} catch ( const std::ios_base::failure& ) {
// failed reading as text
throw GenericException( QString("%1:\n%2").arg(
DialogSec::tr("An error accured while reading the file"),

View File

@ -100,7 +100,7 @@ std::string HashOps::digestFile( const std::string& file_path )
QString::fromStdString( file_path )
).toStdString() );
} catch (const std::ios_base::failure& err) {
} catch ( const std::ios_base::failure& ) {
// failed reading as text
throw GenericException( QString("%1:\n%2").arg(
DialogSec::tr("An error accured while reading the file"),