Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mobile Datovka
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Datovka projects
mobile Datovka
Commits
0bd33a20
Commit
0bd33a20
authored
Dec 11, 2017
by
Karel Slaný
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted unused SQLiteDb::deleteDb().
parent
ac2edd6f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2 additions
and
66 deletions
+2
-66
src/io/sqlite/db.cpp
src/io/sqlite/db.cpp
+0
-17
src/io/sqlite/db.h
src/io/sqlite/db.h
+0
-8
src/sqlite/file_db.cpp
src/sqlite/file_db.cpp
+0
-5
src/sqlite/file_db.h
src/sqlite/file_db.h
+0
-8
src/sqlite/file_db_container.cpp
src/sqlite/file_db_container.cpp
+1
-1
src/sqlite/message_db.cpp
src/sqlite/message_db.cpp
+0
-5
src/sqlite/message_db.h
src/sqlite/message_db.h
+0
-8
src/sqlite/message_db_container.cpp
src/sqlite/message_db_container.cpp
+1
-1
src/sqlite/zfo_db.cpp
src/sqlite/zfo_db.cpp
+0
-5
src/sqlite/zfo_db.h
src/sqlite/zfo_db.h
+0
-8
No files found.
src/io/sqlite/db.cpp
View file @
0bd33a20
...
...
@@ -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
)
{
...
...
src/io/sqlite/db.h
View file @
0bd33a20
...
...
@@ -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.
*
...
...
src/sqlite/file_db.cpp
View file @
0bd33a20
...
...
@@ -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
);
...
...
src/sqlite/file_db.h
View file @
0bd33a20
...
...
@@ -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.
*
...
...
src/sqlite/file_db_container.cpp
View file @
0bd33a20
...
...
@@ -102,7 +102,7 @@ bool FileDbContainer::deleteDb(FileDb *db)
/* Close database. */
delete
db
;
if
(
fileName
==
Fil
eDb
::
memoryLocation
)
{
if
(
fileName
==
SQLit
eDb
::
memoryLocation
)
{
return
true
;
}
...
...
src/sqlite/message_db.cpp
View file @
0bd33a20
...
...
@@ -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
);
...
...
src/sqlite/message_db.h
View file @
0bd33a20
...
...
@@ -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.
*
...
...
src/sqlite/message_db_container.cpp
View file @
0bd33a20
...
...
@@ -103,7 +103,7 @@ bool MsgDbContainer::deleteDb(MessageDb *db)
/* Close database. */
delete
db
;
if
(
fileName
==
Messag
eDb
::
memoryLocation
)
{
if
(
fileName
==
SQLit
eDb
::
memoryLocation
)
{
return
true
;
}
...
...
src/sqlite/zfo_db.cpp
View file @
0bd33a20
...
...
@@ -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
);
...
...
src/sqlite/zfo_db.h
View file @
0bd33a20
...
...
@@ -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.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment