Fix bug introduced in 684958b29c

This would stop the db schema from being reloaded when it actually
should be.

Also simplify code.
This commit is contained in:
Martin Kleusberg
2016-08-30 20:01:51 +02:00
parent 684958b29c
commit e7b12332f7
2 changed files with 17 additions and 13 deletions
+10
View File
@@ -140,6 +140,16 @@ private:
bool tryEncryptionSettings(const QString& filename, bool* encrypted, CipherDialog*& cipherSettings);
bool dontCheckForStructureUpdates;
class NoStructureUpdateChecks
{
public:
NoStructureUpdateChecks(DBBrowserDB& db) : m_db(db) { m_db.dontCheckForStructureUpdates = true; }
~NoStructureUpdateChecks() { m_db.dontCheckForStructureUpdates = false; }
private:
DBBrowserDB& m_db;
};
};
#endif