| |
---|
| | |
---|
| | loadSettings(); |
---|
| | |
---|
| | QDir dir; |
---|
| | if (!dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))) { |
---|
| | if (dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))) { |
---|
| | m_cacheDirectory = QDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)); |
---|
| | } else { |
---|
| | m_cacheDirectory = dir; |
---|
| | } |
---|
| | if (!dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation))) { |
---|
| | if (dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation))) { |
---|
| | m_dataDirectory = QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)); |
---|
| | } else { |
---|
| | m_dataDirectory = dir; |
---|
| | } |
---|
| | m_db = QSqlDatabase::addDatabase("QSQLITE"); |
---|
| | m_db.setDatabaseName(m_dataDirectory.absolutePath() + "/" + SAORI_SQLFILE); |
---|
| | m_db.open(); |
---|
| | } |
---|
| | |
---|
| | SaoriApplication::~SaoriApplication() |
---|
| | { |
---|
| | saveInstancesSettings(); |
---|
| | saveAccountsSettings(); |
---|
| | m_db.close(); |
---|
| | } |
---|
| | |
---|
| | Saoridon *SaoriApplication::findInstance(QUrl instance) |
---|
| | { |
---|
| |
---|
| | |