Command: Take SqliteDbService instead of connection string
此提交包含在:
@@ -6,19 +6,17 @@
|
||||
#include <QThreadStorage>
|
||||
#include <QVariant>
|
||||
#include "utils.h"
|
||||
#include "sqlitedbservice.h"
|
||||
class Command
|
||||
{
|
||||
protected:
|
||||
bool fileExistsInDatabase(QSqlDatabase &db, QString path);
|
||||
bool fileExistsInDatabase(QSqlDatabase &db, QString path, qint64 mtime);
|
||||
QByteArray readFile(QString path) const;
|
||||
SqliteDbService *dbService;
|
||||
QString dbConnectionString;
|
||||
QThreadStorage<QSqlDatabase> dbStore;
|
||||
|
||||
public:
|
||||
Command(QString dbConnectionString)
|
||||
Command(SqliteDbService &dbService)
|
||||
{
|
||||
this->dbConnectionString = dbConnectionString;
|
||||
this->dbService = &dbService;
|
||||
}
|
||||
|
||||
QSqlDatabase dbConnection();
|
||||
|
||||
新增問題並參考
封鎖使用者