replaced pointer by smart pointers

This commit is contained in:
2018-12-28 14:17:47 +01:00
parent 07205459d8
commit d4b4a37847
7 changed files with 77 additions and 68 deletions

View File

@@ -23,9 +23,10 @@ class WindowRace : public QMainWindow {
Q_OBJECT
public:
explicit WindowRace(DataBase * db, QWidget * parent = 0);
explicit WindowRace(std::shared_ptr<DataBase> db,
QWidget * parent = nullptr);
~WindowRace();
void setWindowRennliste(WindowRennliste * ptrInstance);
void setWindowRennliste(std::shared_ptr<WindowRennliste> ptrInstance);
void setDriverAndCar(vector<QString> vec);
void setDriverAndCarId(vector<QString> vec);
@@ -37,8 +38,8 @@ class WindowRace : public QMainWindow {
void closeEvent(QCloseEvent * event);
bool started;
Countdown * countdown;
HardwareSetup * Hardware;
std::shared_ptr<Countdown> countdown;
std::shared_ptr<HardwareSetup> Hardware;
Ui::WindowRace * ui;
Counter counterShell;
Counter counterDea;
@@ -51,12 +52,12 @@ class WindowRace : public QMainWindow {
long getMinimum(std::vector<long> a);
QString timeWrapper(long zahl);
long countdownValue; // in sec
Ampel * startAmpelThread;
std::shared_ptr<Ampel> startAmpelThread;
int ampelCounter;
bool paused;
DataBase * db;
std::shared_ptr<DataBase> db;
bool finished;
WindowRennliste * wRennliste;
std::shared_ptr<WindowRennliste> wRennliste;
bool wRennlisteSeted;
int fahrzeit;
int renn_id;