Added base classes for plugin UI.
This commit is contained in:
@@ -48,6 +48,16 @@ public:
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
void update(QSharedPointer<T> entity) {
|
||||
odb::database *db = Context::instance().db();
|
||||
|
||||
Q_ASSERT(db);
|
||||
|
||||
Transaction tx;
|
||||
db->update(entity);
|
||||
tx.commit();
|
||||
}
|
||||
|
||||
QSharedPointer<T> loadById(int id) {
|
||||
odb::database *db = Context::instance().db();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user