Commit 0bd33a20 authored by Karel Slaný's avatar Karel Slaný

Deleted unused SQLiteDb::deleteDb().

parent ac2edd6f
......@@ -357,23 +357,6 @@ bool SQLiteDb::reopenDb(const QString &newFileName,
return reopen_ret;
}
bool SQLiteDb::deleteDb(const QString &LocDir)
{
/* Close database. */
m_db.close();
/* Backup old file name. */
QString oldFileName = fileName();
QFileInfo fi(oldFileName);
QString fileName = fi.fileName();
QString newFileName =
LocDir + QDir::separator() + QDir::toNativeSeparators(fileName);
/* Erase target if exists. */
return QFile::remove(newFileName);
}
bool SQLiteDb::moveDb(const QString &newFileName,
const QList<class SQLiteTbl *> &tables)
{
......
......@@ -150,14 +150,6 @@ protected:
bool reopenDb(const QString &newFileName,
const QList<class SQLiteTbl *> &tables);
/*!
* @brief Delete database from location.
*
* @param[in] LocDir New location name.
* @return True on success.
*/
bool deleteDb(const QString &LocDir);
/*!
* @brief Move db.
*
......
......@@ -113,11 +113,6 @@ bool FileDb::reopenDb(const QString &newFileName)
return SQLiteDb::reopenDb(newFileName, listOfTables());
}
bool FileDb::deleteDb(const QString &LocDir)
{
return SQLiteDb::deleteDb(LocDir);
}
bool FileDb::deleteFilesFromDb(qint64 dmId)
{
QSqlQuery query(m_db);
......
......@@ -83,14 +83,6 @@ public:
*/
bool reopenDb(const QString &newFileName);
/*!
* @brief Delete database from location.
*
* @param[in] LocDir New location name.
* @return True on success.
*/
bool deleteDb(const QString &LocDir);
/*!
* @brief Delete all files related to message with given id.
*
......
......@@ -102,7 +102,7 @@ bool FileDbContainer::deleteDb(FileDb *db)
/* Close database. */
delete db;
if (fileName == FileDb::memoryLocation) {
if (fileName == SQLiteDb::memoryLocation) {
return true;
}
......
......@@ -66,11 +66,6 @@ bool MessageDb::reopenDb(const QString &newFileName)
return SQLiteDb::reopenDb(newFileName, listOfTables());
}
bool MessageDb::deleteDb(const QString &LocDir)
{
return SQLiteDb::deleteDb(LocDir);
}
bool MessageDb::deleteMsgFromDb(qint64 msgId)
{
QSqlQuery query(m_db);
......
......@@ -71,14 +71,6 @@ public:
*/
bool reopenDb(const QString &newFileName);
/*!
* @brief Delete database from location.
*
* @param[in] LocDir New location name.
* @return True on success.
*/
bool deleteDb(const QString &LocDir);
/*!
* @brief Delete message from db.
*
......
......@@ -103,7 +103,7 @@ bool MsgDbContainer::deleteDb(MessageDb *db)
/* Close database. */
delete db;
if (fileName == MessageDb::memoryLocation) {
if (fileName == SQLiteDb::memoryLocation) {
return true;
}
......
......@@ -90,11 +90,6 @@ fail:
return false;
}
bool ZfoDb::deleteDb(const QString &LocDir)
{
return SQLiteDb::deleteDb(LocDir);
}
void ZfoDb::deleteZfo(qint64 msgId, bool isTestAccount, int zfoSize)
{
QSqlQuery query(m_db);
......
......@@ -41,14 +41,6 @@ public:
explicit ZfoDb(const QString &connectionName);
/*!
* @brief Delete database from location.
*
* @param[in] LocDir New location name.
* @return True on success.
*/
bool deleteDb(const QString &LocDir);
/*!
* @brief Delete zfo from database.
*
......
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