Database-backup support

This commit is contained in:
Valentino Orlandi 2022-08-23 00:51:18 +02:00
parent bfd8fef56f
commit cd647c30f9
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
2 changed files with 12 additions and 2 deletions

View File

@ -658,6 +658,10 @@ const bool& Craplog::isParsing()
{
return this->parsing;
}
const bool& Craplog::editedDatabase()
{
return this->db_edited;
}
// performances
const int& Craplog::getPerfSize()
@ -730,6 +734,10 @@ void Craplog::run()
}
if ( this->proceed == true ) {
// succesfully updated the database
if ( this->parsed_size > 0 ) {
this->db_edited = true;
}
// insert the hashes of the used files
this->hashOps.insertUsedHashes( this->db_hashes_path, this->used_files_hashes, this->current_WS );
}
@ -1089,7 +1097,7 @@ void Craplog::makeCharts( const QChart::ChartTheme& theme, const std::unordered_
sizeBreakdown->setAnimationOptions( QChart::AllAnimations );
sizeBreakdown->setTitle( size_chart_name );
sizeBreakdown->setTitleFont( fonts.at("main") );
if ( this->total_size > 0 ) {
if ( this->proceed && this->total_size > 0 ) {
sizeBreakdown->legend()->setAlignment( Qt::AlignRight );
sizeBreakdown->addBreakdownSeries( parsedSize_donut, Qt::GlobalColor::darkCyan, fonts.at("main_small") );
sizeBreakdown->addBreakdownSeries( ignoredSize_donut, Qt::GlobalColor::gray, fonts.at("main_small") );

View File

@ -97,6 +97,7 @@ public:
warnlistMoveDown( const int& web_server_id, const int& log_field_id, const std::string& item );
// job related
const bool& editedDatabase();
const bool checkStuff();
void startWorking(),
stopWorking(),
@ -129,6 +130,7 @@ private:
db_hashes_path;
// job related
bool db_edited = false;
bool working = false,
parsing = false,
proceed = false;
@ -138,7 +140,7 @@ private:
perf_size = 0,
total_size = 0,
parsed_size = 0,
warnlisted_size = 0,
warnlisted_size = 0,
blacklisted_size = 0;
// chart related
const QString printableSize( const int& bytes );