diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp b/SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp new file mode 100644 index 0000000..bcd4890 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/db/attachguard.cpp @@ -0,0 +1,20 @@ +#include "attachguard.h" +#include "db/db.h" + +GuardedAttach::GuardedAttach(Db* db, Db* attachedDb, const QString& attachName) : + db(db), attachedDb(attachedDb), name(attachName) +{ +} + +GuardedAttach::~GuardedAttach() +{ + if (name.isNull()) + return; + + db->detach(attachedDb); +} + +QString GuardedAttach::getName() const +{ + return name; +} |
