Commit e483110c authored by Martin Straka's avatar Martin Straka

Move some db files back to original location

parent 4af312b7
......@@ -92,6 +92,8 @@ SOURCES += \
src/dialogues/widget_message_dialogue.cpp \
src/files.cpp \
src/io/filesystem.cpp \
src/io/sqlite/db.cpp \
src/io/sqlite/table.cpp \
src/isds/isds_conversion.cpp \
src/locker.cpp \
src/log/log.cpp \
......@@ -113,14 +115,12 @@ SOURCES += \
src/settings.cpp \
src/setwrapper.cpp \
src/sqlite/account_db.cpp \
src/sqlite/db.cpp \
src/sqlite/dbs.cpp \
src/sqlite/db_tables.cpp \
src/sqlite/file_db_container.cpp \
src/sqlite/file_db.cpp \
src/sqlite/message_db_container.cpp \
src/sqlite/message_db.cpp \
src/sqlite/table.cpp \
src/sqlite/zfo_db.cpp \
src/worker/emitter.cpp \
src/worker/pool.cpp \
......@@ -147,6 +147,8 @@ HEADERS += \
src/dialogues/widget_message_dialogue.h \
src/files.h \
src/io/filesystem.h \
src/io/sqlite/db.h \
src/io/sqlite/table.h \
src/isds/isds_conversion.h \
src/locker.h \
src/log/log.h \
......@@ -168,14 +170,12 @@ HEADERS += \
src/settings.h \
src/setwrapper.h \
src/sqlite/account_db.h \
src/sqlite/db.h \
src/sqlite/dbs.h \
src/sqlite/db_tables.h \
src/sqlite/file_db_container.h \
src/sqlite/file_db.h \
src/sqlite/message_db_container.h \
src/sqlite/message_db.h \
src/sqlite/table.h \
src/sqlite/zfo_db.h \
src/worker/emitter.h \
src/worker/pool.h \
......
......@@ -27,9 +27,9 @@
#include <QSqlQuery>
#include <QVariant>
#include "src/io/sqlite/db.h"
#include "src/io/sqlite/table.h"
#include "src/log/log.h"
#include "src/sqlite/db.h"
#include "src/sqlite/table.h"
const QString SQLiteDb::memoryLocation(":memory:");
const QString SQLiteDb::dbDriverType("QSQLITE");
......
......@@ -26,8 +26,8 @@
#include <QSqlQuery>
#include <QVariant>
#include "src/io/sqlite/table.h"
#include "src/log/log.h"
#include "src/sqlite/table.h"
SQLiteTbl::SQLiteTbl(const QString &name,
const QVector< QPair<QString, enum EntryType> > &attrs,
......
......@@ -331,17 +331,6 @@ int main(int argc, char *argv[])
evntsTbl.reloadLocalisedDescription();
msgZfoTbl.reloadLocalisedDescription();
/* Load accounts from settings to account model. */
{
QSettings settings(Settings::settingsPath(),
QSettings::IniFormat);
accountModelPtr->loadAccountsFromSettings(settings);
/*
* No need to load counters here as some messages are likely
* to be deleted.
*/
}
/* init and open account database */
AccountDb globAccountDb("ACCOUNTS");
globAccountDbPtr = &globAccountDb;
......@@ -364,6 +353,17 @@ int main(int argc, char *argv[])
ZfoDb globZfoDb("ZFOS");
globZfoDbPtr = &globZfoDb;
/* Load accounts from settings to account model. */
{
QSettings settings(Settings::settingsPath(),
QSettings::IniFormat);
accountModelPtr->loadAccountsFromSettings(settings);
/*
* No need to load counters here as some messages are likely
* to be deleted.
*/
}
/*
* Open ZFO database, the second parameter means: true = zfo db will
* store in disk, false = only in memory
......
......@@ -27,8 +27,8 @@
#include <QList>
#include <QString>
#include "src/io/sqlite/db.h"
#include "src/net/db_wrapper.h"
#include "src/sqlite/db.h"
/*!
* @brief Encapsulates account database.
......
......@@ -24,7 +24,7 @@
#ifndef _DB_TABLES_H_
#define _DB_TABLES_H_
#include "src/sqlite/table.h"
#include "src/io/sqlite/table.h"
/*
* Account database.
......
......@@ -29,9 +29,9 @@
#include "src/common.h"
#include "src/files.h"
#include "src/io/sqlite/db.h"
#include "src/messages.h"
#include "src/models/filemodel.h"
#include "src/sqlite/db.h"
/*!
* @brief Encapsulates message database.
......
......@@ -29,8 +29,8 @@
#include <QString>
#include "src/common.h"
#include "src/io/sqlite/db.h"
#include "src/messages.h"
#include "src/sqlite/db.h"
class MessageListModel; /* Forward declaration. */
......
......@@ -27,8 +27,8 @@
#include <QList>
#include <QString>
#include "src/io/sqlite/db.h"
#include "src/common.h"
#include "src/sqlite/db.h"
/* Zfo db filename */
#define ZFO_DB_NAME "zfo.db"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment