TetraIF migration and Unittest Implementation for it
Entire-Checkpoint: 14d1fef0cf36
This commit is contained in:
1 parent
a86f9b5bac
commit
ba212f9dce
78 files changed
+1611
-640
No files matched your search
@@ -43,13 +43,7 @@ PrtCnvDbThread::PrtCnvDbThread(const QString &dbDriver,
|
||||
const QString &dbPassword,
|
||||
PrtCnv::PrtCnvThreadStarter *a_parent)
|
||||
: PrtCnvThread(a_parent, "PrtCnvDbThread")
|
||||
, m_BattleFieldOpStateMutex(QMutex::Recursive)
|
||||
, m_MemberListByIdMutex(QMutex::Recursive)
|
||||
, m_CentralListMutex(QMutex::Recursive)
|
||||
, m_OldCentralAckCounter(0)
|
||||
, m_RadioListMutex(QMutex::Recursive)
|
||||
, m_SqlCmdListMutex(QMutex::Recursive)
|
||||
, m_BroadcastMapMutex(QMutex::Recursive)
|
||||
, m_DoClean(false)
|
||||
, m_DoWaitUntilSqlWritten(false)
|
||||
, m_DoStorePermanent(false)
|
||||
@@ -156,12 +150,12 @@ bool PrtCnvDbThread::createDatabase()
|
||||
closeDb();
|
||||
|
||||
m_db = QSqlDatabase::addDatabase(m_dbDriver, QStringLiteral("PrtCnv"));
|
||||
if (m_dbDriver == QLatin1String("QSQLITE"))
|
||||
if (m_dbDriver == QStringLiteral("QSQLITE"))
|
||||
{
|
||||
QString path = m_Config->getString(getName(), QStringLiteral("DatabaseFileName"), QStringLiteral("telegrams.db"));
|
||||
if (!QDir::isAbsolutePath(path))
|
||||
{
|
||||
path = QCoreApplication::applicationDirPath() + QLatin1String("/../") + path;
|
||||
path = QCoreApplication::applicationDirPath() + QStringLiteral("/../") + path;
|
||||
QFileInfo fi(path);
|
||||
QDir().mkpath(fi.absolutePath());
|
||||
}
|
||||
@@ -408,7 +402,7 @@ bool PrtCnvDbThread::createDatabase()
|
||||
ERROR_LOG(m_logger) << "Internal error: conversion of telegram with telId=" << radioTelegram.getTelID() << " from radio to central failed";
|
||||
}
|
||||
|
||||
if (m_db.driverName() == QLatin1String("QSQLITE"))
|
||||
if (m_db.driverName() == QStringLiteral("QSQLITE"))
|
||||
{
|
||||
q.exec(QStringLiteral("VACUUM;"));
|
||||
q.exec(QStringLiteral("PRAGMA journal_mode=WAL;"));
|
||||
|
||||
Reference in new issue
Block a user