mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
SqlDatabase: Make it non-copyable.
This commit is contained in:
parent
6d81e5c87a
commit
5640cbf653
3 changed files with 5 additions and 5 deletions
|
@ -99,7 +99,7 @@ sqlite3* SqlDatabase::sqliteDb()
|
|||
|
||||
/* =========================================================================================== */
|
||||
|
||||
SqlQuery::SqlQuery( SqlDatabase db )
|
||||
SqlQuery::SqlQuery( SqlDatabase& db )
|
||||
:_db(db.sqliteDb()),
|
||||
_stmt(0)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ SqlQuery::~SqlQuery()
|
|||
}
|
||||
}
|
||||
|
||||
SqlQuery::SqlQuery(const QString& sql, SqlDatabase db)
|
||||
SqlQuery::SqlQuery(const QString& sql, SqlDatabase& db)
|
||||
:_db(db.sqliteDb()),
|
||||
_stmt(0)
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace Mirall {
|
|||
|
||||
class OWNCLOUDSYNC_EXPORT SqlDatabase
|
||||
{
|
||||
Q_DISABLE_COPY(SqlDatabase)
|
||||
public:
|
||||
explicit SqlDatabase();
|
||||
|
||||
|
@ -48,8 +49,8 @@ class OWNCLOUDSYNC_EXPORT SqlQuery
|
|||
Q_DISABLE_COPY(SqlQuery)
|
||||
public:
|
||||
explicit SqlQuery();
|
||||
explicit SqlQuery(SqlDatabase db);
|
||||
explicit SqlQuery(const QString& sql, SqlDatabase db);
|
||||
explicit SqlQuery(SqlDatabase& db);
|
||||
explicit SqlQuery(const QString& sql, SqlDatabase& db);
|
||||
|
||||
~SqlQuery();
|
||||
QString error() const;
|
||||
|
|
|
@ -359,7 +359,6 @@ void SyncJournalDb::close()
|
|||
_possibleUpgradeFromMirall_1_5 = false;
|
||||
|
||||
_db.close();
|
||||
_db = SqlDatabase(); // avoid the warning SqlDatabasePrivate::removeDatabase: connection [...] still in use
|
||||
_avoidReadFromDbOnNextSyncFilter.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue