QDebug operator<<(QDebug, QList<RTComElAttachment*> &);
RtcomEventLogger::RtcomEventLogger(const Settings &settings) :
- m_Settings(settings), mk_DBPath("/.rtcom-eventlogger/el-v1.db")
+ m_Settings(settings)
{
RTComEl *el(rtcom_el_new());
if(NULL != el)
}
RtcomEventLogger::RtcomEventLogger(const Settings &settings, const EventTypes::RtcomEvent &event) :
- m_Settings(settings), mk_DBPath("/.rtcom-eventlogger/el-v1.db")
+ m_Settings(settings)
{
}
void RtcomEventLogger::Reindex()
{
// Set up the database connection...
- QSqlDatabase db(QSqlDatabase::addDatabase( "QSQLITE" ));
+ QSqlDatabase db(QSqlDatabase::addDatabase("QSQLITE"));
- db.setDatabaseName( QDir::homePath() + mk_DBPath );
- if ( ! db.open() )
+ db.setDatabaseName(CurrentSettings().DBPath());
+ if(!db.open())
{
throw std::runtime_error("Cannot open database: Unable to establish database connection");
}