MCPcopy Create free account
hub / github.com/codestation/qcma / SQLiteDB

Method SQLiteDB

common/sqlitedb.cpp:142–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 };
141
142SQLiteDB::SQLiteDB(QObject *obj_parent) :
143 Database(obj_parent)
144{
145 m_uuid = QSettings().value("lastAccountId", "ffffffffffffffff").toString();
146 thread = new QThread();
147 moveToThread(thread);
148 timer = new QTimer();
149 thread->start();
150 timer->setInterval(0);
151 timer->setSingleShot(true);
152 connect(timer, &QTimer::timeout, this, &SQLiteDB::process);
153
154 // fetch a configured database path if it exists
155 QString db_path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
156 db_path = QSettings().value("databasePath", db_path).toString();
157 QDir(QDir::root()).mkpath(db_path);
158
159 db = QSqlDatabase::addDatabase("QSQLITE");
160 db.setDatabaseName(db_path + QDir::separator() + "qcma.sqlite");
161}
162
163SQLiteDB::~SQLiteDB()
164{

Callers

nothing calls this directly

Calls 2

valueMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected