ref #29 Fixing inialization conctructor main class worker.

This commit is contained in:
IgorekLoschinin 2021-05-13 21:11:41 +03:00
parent 53a30a2dd2
commit 58b1032099
2 changed files with 12 additions and 11 deletions

View File

@ -7,6 +7,7 @@
#include "config.h" #include "config.h"
#include "configparser.h" #include "configparser.h"
#include "signer.h"
#include "worker.h" #include "worker.h"
#include <quasarapp.h> #include <quasarapp.h>
@ -14,24 +15,24 @@
namespace CopyrighFixer { namespace CopyrighFixer {
Worker::Worker() { Worker::Worker() {
conf_ = new Config; _conf = new Config;
confParser_ = new ConfigParser; _confParser = new ConfigParser;
subscriber_ = new Signer; _subscriber = new Signer;
} }
Worker::~Worker() { Worker::~Worker() {
delete conf_; delete _conf;
delete confParser_; delete _confParser;
delete subscriber_; delete _subscriber;
} }
bool Worker::run() { bool Worker::run() {
if (!confParser_->parseOptions(*conf_)) { if (!_confParser->parseOptions(*_conf)) {
return false; return false;
} }
if (!subscriber_->checkSign(*conf_)) { if (!_subscriber->checkSign(*_conf)) {
return false; return false;
} }

View File

@ -38,9 +38,9 @@ public:
void printHelp() const; void printHelp() const;
protected: protected:
Config *conf_ = nullptr; Config *_conf = nullptr;
ConfigParser *confParser_ = nullptr; ConfigParser *_confParser = nullptr;
Signer *subscriber_ = nullptr; Signer *_subscriber = nullptr;
}; };