-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabasecheckthread.h
More file actions
30 lines (27 loc) · 950 Bytes
/
Copy pathdatabasecheckthread.h
File metadata and controls
30 lines (27 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef FINAL_DATABASECHECKTHREAD_H
#define FINAL_DATABASECHECKTHREAD_H
#include <QThread>
#include <QSemaphore>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QDebug>
#define NUMBER QString::number
class databaseCheckThread:public QThread{
Q_OBJECT
public:
databaseCheckThread(QSemaphore *mutex_cntfinish, QSemaphore *mutex_db, QSqlDatabase *db,QStringList *import_dates, int *cnt_finish):
mutex_cntfinish(mutex_cntfinish),mutex_db(mutex_db),import_dates(import_dates),cnt_finish(cnt_finish),db(db){}
/*~databaseCheckThread(){qDebug()<<"Destructor of databaseCheckThread called!";}*/
private:
void run();
QSemaphore *mutex_cntfinish;
QSemaphore *mutex_db;
QSqlDatabase *db;
int *cnt_finish;
QStringList *import_dates;
signals:
void success(databaseCheckThread *thread);
void fail(databaseCheckThread *thread);
};
#endif //FINAL_DATABASECHECKTHREAD_H